.rollstock-search {
  position: relative;
}

.rollstock-search-results {
  background: #fff;
  border: 1px solid #e8e3dd;
  box-shadow: 0 18px 50px rgba(17, 17, 17, 0.12);
  display: none;
  left: 0;
  max-height: min(70vh, 620px);
  overflow: auto;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 100;
}

.rollstock-search-results.is-open {
  display: block;
}

.rollstock-search-group > strong {
  background: #f7f3ed;
  color: #5b5750;
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 10px 14px;
  text-transform: uppercase;
}

.rollstock-search-result,
.rollstock-search-term {
  align-items: center;
  color: #151515;
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
}

.rollstock-search-result {
  grid-template-columns: 1fr auto;
}

.rollstock-search-main,
.rollstock-search-term {
  align-items: center;
  color: inherit;
  display: grid;
  gap: 12px;
  grid-template-columns: 54px 1fr auto;
  min-width: 0;
  text-decoration: none;
}

.rollstock-search-result + .rollstock-search-result,
.rollstock-search-term + .rollstock-search-term {
  border-top: 1px solid #f0ece7;
}

.rollstock-search-result:hover,
.rollstock-search-result:focus-within,
.rollstock-search-term:hover,
.rollstock-search-term:focus {
  background: #fff7f2;
}

.rollstock-search-main img,
.rollstock-search-term img,
.rollstock-search-term-icon {
  aspect-ratio: 1;
  background: #f6f3ee;
  object-fit: contain;
  width: 54px;
}

.rollstock-search-term-icon {
  align-items: center;
  color: #ff4b21;
  display: inline-flex;
  font-size: 24px;
  font-weight: 900;
  justify-content: center;
}

.rollstock-search-main strong,
.rollstock-search-main small,
.rollstock-search-main b,
.rollstock-search-term strong,
.rollstock-search-term small {
  display: block;
}

.rollstock-search-main span,
.rollstock-search-term span {
  min-width: 0;
}

.rollstock-search-main strong,
.rollstock-search-term strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rollstock-search-main small,
.rollstock-search-term small {
  color: #747474;
  font-size: 12px;
  margin-top: 3px;
}

.rollstock-search-main b {
  color: #5f5f5f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  margin-top: 4px;
}

.rollstock-search-main em {
  color: #111;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.rollstock-search-add {
  background: #ff4b21;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  min-width: 72px;
  padding: 9px 10px;
  text-align: center;
  text-decoration: none;
}

.rollstock-search-add:hover,
.rollstock-search-add:focus {
  background: #111;
  color: #fff;
}

.rollstock-search-all,
.rollstock-search-empty {
  display: block;
  padding: 14px;
}

.rollstock-search-all {
  background: #111;
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.rollstock-search-empty {
  color: #666;
}

.rollstock-search-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.rollstock-search-history button {
  background: #fff;
  border: 1px solid #ded8cf;
  color: #111;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
}

.rollstock-filter-shell {
  margin-bottom: 24px;
  position: relative;
}

.has-rollstock-filters-open {
  overflow: hidden;
}

.rollstock-filter-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.rollstock-filter-open {
  background: #111;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: none;
  font-weight: 900;
  min-height: 42px;
  padding: 0 16px;
}

.rollstock-filter-open span {
  background: #ff4b21;
  display: inline-grid;
  margin-left: 8px;
  min-width: 22px;
  place-items: center;
}

.rollstock-active-filters {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
}

.rollstock-active-filters a {
  align-items: center;
  background: #fff7f2;
  border: 1px solid #ffd6c8;
  color: #151515;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  text-decoration: none;
}

.rollstock-active-filters span {
  color: #ff4b21;
  font-weight: 900;
}

.rollstock-filter-panel-head {
  display: none;
}

.rollstock-filters {
  align-items: stretch;
  border: 1px solid #e8e3dd;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.rollstock-filter-group {
  border: 0;
  border-right: 1px solid #e8e3dd;
  margin: 0;
  min-width: 0;
  padding: 16px;
}

.rollstock-filter-group legend {
  color: #222;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 10px;
  padding: 0;
}

.rollstock-filter-options {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
}

.rollstock-filter-option {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
  line-height: 1.3;
}

.rollstock-filter-option input {
  accent-color: #ff4b21;
}

.rollstock-filter-option span,
.rollstock-filter-price span {
  color: #333;
  font-size: 13px;
}

.rollstock-filter-option em {
  color: #8a857e;
  font-size: 12px;
  font-style: normal;
}

.rollstock-filter-price-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rollstock-filter-price input,
.rollstock-filter-order select {
  border: 1px solid #d9d4cc;
  min-height: 42px;
  padding: 0 10px;
  width: 100%;
}

.rollstock-filter-actions {
  align-content: center;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.rollstock-filter-actions button,
.rollstock-filters-reset {
  align-items: center;
  border: 0;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

.rollstock-filter-actions button {
  background: #111;
  color: #fff;
  cursor: pointer;
}

.rollstock-filters-reset {
  color: #111;
}

.rollstock-filter-shell.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.rollstock-filter-shell.is-loading::after {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e8e3dd;
  color: #111;
  content: "Actualizando catalogo...";
  font-weight: 900;
  left: 50%;
  padding: 12px 16px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.rollstock-dispatch {
  display: grid;
  gap: 18px;
}

.rollstock-dispatch-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rollstock-dispatch-summary div,
.rollstock-dispatch-zones article {
  border: 1px solid #e8e3dd;
  padding: 18px;
}

.rollstock-dispatch-summary span,
.rollstock-dispatch-zones p {
  color: #777;
  display: block;
  font-size: 13px;
  margin: 0 0 5px;
}

.rollstock-dispatch-summary strong {
  font-size: 26px;
}

.rollstock-dispatch-conditions {
  margin: 0;
  padding-left: 20px;
}

.rollstock-dispatch-conditions li + li {
  margin-top: 6px;
}

.rollstock-dispatch-zones {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rollstock-dispatch-zones h3 {
  margin: 0 0 8px;
}

.rollstock-dispatch-zones span {
  color: #333;
  line-height: 1.5;
}

.rollstock-tiered-price-note {
  color: #e53720;
  display: block;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
  margin-top: 6px;
}

.rollstock-tiered-loop-hint {
  background: #fff3ef;
  border: 1px solid #ffd0c5;
  color: #b82414;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  margin: 8px 0 0;
  padding: 6px 8px;
}

.rollstock-tiered-pricing {
  border: 1px solid #e8e3dd;
  margin: 18px 0;
  padding: 16px;
}

.rollstock-tiered-pricing h3 {
  font-size: 18px;
  margin: 0 0 12px;
}

.rollstock-tiered-pricing table {
  border-collapse: collapse;
  margin: 0;
  width: 100%;
}

.rollstock-tiered-pricing th,
.rollstock-tiered-pricing td {
  border-bottom: 1px solid #eee7df;
  padding: 10px;
  text-align: left;
}

.rollstock-tiered-pricing th {
  background: #f8f5f1;
  color: #111;
  font-size: 12px;
  text-transform: uppercase;
}

.rollstock-tiered-pricing p {
  color: #5f5a55;
  font-size: 13px;
  margin: 12px 0 0;
}

.rollstock-search-stats {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rollstock-search-stats li {
  align-items: center;
  border: 1px solid #e8e3dd;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
}

@media (max-width: 1100px) {
  .rollstock-filters {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .rollstock-search-results {
    left: 50%;
    max-height: 80vh;
    position: fixed;
    right: auto;
    top: 74px;
    transform: translateX(-50%);
    width: min(94vw, 620px);
  }

  .rollstock-search-main,
  .rollstock-search-term {
    grid-template-columns: 48px 1fr;
  }

  .rollstock-search-main em {
    grid-column: 2;
  }

  .rollstock-search-result {
    grid-template-columns: 1fr;
  }

  .rollstock-search-add {
    margin-left: 60px;
  }

  .rollstock-filter-open {
    display: inline-flex;
  }

  .rollstock-filter-panel {
    background: rgba(17, 17, 17, 0.35);
    bottom: 0;
    display: none;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 999;
  }

  .rollstock-filter-shell.is-open .rollstock-filter-panel {
    display: block;
  }

  .rollstock-filter-panel-head {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e8e3dd;
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 16px;
    position: absolute;
    right: 0;
    top: 0;
    width: min(92vw, 420px);
    z-index: 2;
  }

  .rollstock-filter-panel-head button {
    background: #111;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    min-height: 36px;
    padding: 0 12px;
  }

  .rollstock-filters {
    background: #fff;
    bottom: 0;
    display: block;
    max-width: 420px;
    overflow: auto;
    padding-top: 68px;
    position: absolute;
    right: 0;
    top: 0;
    width: 92vw;
  }

  .rollstock-filter-group {
    border-bottom: 1px solid #e8e3dd;
    border-right: 0;
  }

  .rollstock-filter-options {
    max-height: none;
  }

  .rollstock-dispatch-summary,
  .rollstock-dispatch-zones {
    grid-template-columns: 1fr;
  }
}
