/* Categorías y catálogo: la estructura de LoQuiero (lp-store-catalog-facets) con los colores de Shops Digital.
   Las mismas medidas que la cabecera de LoQuiero: si cambian allá, cambian acá. */

/* Cabecera: de borde a borde, con la ruta, el título, la cantidad y las categorías. */
.sd-cat-cabeza {
  background: linear-gradient(118deg, #072e34 0%, var(--loq-brand-navy, #0b3f47) 46%, #0f5964 100%);
  color: #e8f1f2;
}

.sd-cat-cabeza__interior {
  width: min(calc(100% - 32px), var(--gds-container-max, 1376px));
  margin-inline: auto;
  padding: 16px 0 12px;
}

.sd-cat-ruta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  line-height: 1.4;
}

.sd-cat-ruta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -13px;
  color: inherit;
  text-decoration: none;
}

.sd-cat-ruta a:hover {
  color: #fff;
  text-decoration: underline;
}

.sd-cat-titulo {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: clamp(28px, 22px + 1.6vw, 40px);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.1;
  text-transform: none;
  text-wrap: balance;
}

.sd-cat-bajada {
  max-width: 62ch;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  line-height: 1.45;
  text-wrap: pretty;
}

.sd-cat-bajada strong {
  color: #fff;
  font-weight: 500;
}

/* Las demás categorías a un toque. 44 px para tocar, 36 para ver: el borde es transparente. */
.sd-cat-rapidas {
  display: flex;
  gap: 8px;
  margin: 12px -16px 0;
  padding-inline: 16px 36px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
}

.sd-cat-rapidas::-webkit-scrollbar {
  display: none;
}

.sd-cat-rapida {
  display: inline-flex;
  flex: none;
  align-items: center;
  box-sizing: border-box;
  height: 44px;
  padding: 0 14px;
  border: solid transparent;
  border-width: 4px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1) padding-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .12s ease;
}

.sd-cat-rapida:hover {
  background-color: rgba(255, 255, 255, .18);
  color: #fff;
}

.sd-cat-rapida.is-active,
.sd-cat-rapida.is-active:hover {
  background-color: #fff;
  box-shadow: none;
  color: var(--loq-brand-navy, #0b3f47);
}

.sd-cat-rapida:focus-visible,
.sd-cat-ruta a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Franja: los tres datos que deciden la compra. */
.sd-cat-franja {
  padding: 14px 16px 0;
}

.sd-cat-franja ul {
  display: flex;
  max-width: var(--gds-container-max, 1376px);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.sd-cat-franja li {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0 6px;
}

.sd-cat-franja li + li {
  border-left: 1px solid #e4e5e8;
}

.sd-cat-icono {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--loq-brand-navy, #0b3f47);
}

.sd-cat-franja strong {
  display: block;
  color: #111316;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.sd-cat-franja span {
  display: block;
  margin-top: 1px;
  color: #5d6169;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

/* Barra: cuántos hay y en qué orden, sobre los productos. */
.sd-cat-barra__interior {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(calc(100% - 32px), var(--gds-container-max, 1376px));
  margin: 16px auto 12px;
}

@media (max-width: 1199px) {
  .sd-cat-barra__interior {
    justify-content: flex-end;
  }

  .sd-cat-barra__total {
    display: none;
  }
}

.sd-cat-barra__total {
  margin: 0;
  color: #5d6169;
  font-size: 14px;
  line-height: 1.4;
}

.sd-cat-orden {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
}

.sd-cat-orden .sd-cat-icono {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: #111316;
  pointer-events: none;
}

.sd-cat-orden select {
  height: 44px;
  min-width: 190px;
  margin: 0;
  padding: 0 38px 0 40px;
  border: 1px solid #e2e2e5;
  border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
  color: #111316;
  font: inherit;
  font-size: 14px;
  appearance: none;
  cursor: pointer;
}

.sd-cat-orden select:focus-visible {
  border-color: #0b0c10;
  outline: 2px solid #0b0c10;
  outline-offset: 0;
}

/* La grilla arranca pegada a la barra. */
body.sd-categoria .loq-category-results > .loq-block--main-grid:first-of-type {
  margin-top: 0 !important;
}

/* Celular: la franja va en su propia fila después de los primeros productos (la ubica sd-categorias.js), así los
   productos quedan arriba. Hasta entonces no ocupa lugar. */
@media (max-width: 767px) {
  .sd-cat-franja {
    display: none;
    padding: 4px 0;
  }

  .loq-cards-grid > .sd-cat-franja {
    display: block;
    grid-column: 1 / -1;
  }

  .sd-cat-franja li {
    gap: 5px;
    padding: 0 4px;
  }

  .sd-cat-franja .sd-cat-icono {
    width: 16px;
    height: 16px;
  }

  .sd-cat-franja strong {
    font-size: 11px;
  }

  .sd-cat-franja span {
    font-size: 10px;
  }

  .sd-cat-barra__interior {
    margin-block: 12px 10px;
  }

  .sd-cat-orden select {
    min-width: 0;
  }
}

@media (min-width: 768px) {
  .sd-cat-cabeza__interior {
    width: min(calc(100% - 48px), var(--gds-container-max, 1376px));
    padding: 24px 0 20px;
  }

  .sd-cat-bajada {
    margin-top: 8px;
    font-size: 16px;
  }

  .sd-cat-rapidas {
    flex-wrap: wrap;
    margin: 14px 0 0;
    padding-inline: 0;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .sd-cat-franja {
    padding-inline: 24px;
  }

  .sd-cat-barra__interior {
    width: min(calc(100% - 48px), var(--gds-container-max, 1376px));
    margin-block: 20px 16px;
  }
}

@media (min-width: 1200px) {
  .sd-cat-cabeza__interior {
    padding: 28px 0 24px;
  }

  .sd-cat-bajada__total {
    display: none;
  }

  .sd-cat-franja {
    padding-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sd-cat-rapida {
    transition: none;
  }
}
