/* ═══════════════════════════════════════════════════════════════════════════
   TIENDA · Dawn-inspired, full-width grid + filter drawer
   ═══════════════════════════════════════════════════════════════════════════ */

.shop-page {
  --sh-color-foreground: rgb(18, 18, 18);
  --sh-color-foreground-75: rgba(18, 18, 18, 0.72);
  --sh-color-foreground-55: rgba(18, 18, 18, 0.55);
  --sh-color-foreground-30: rgba(18, 18, 18, 0.3);
  --sh-color-foreground-10: rgba(18, 18, 18, 0.1);
  --sh-color-foreground-05: rgba(18, 18, 18, 0.05);
  --sh-color-background: rgb(255, 255, 255);
  --sh-color-background-2: rgb(243, 243, 243);
  --sh-color-sale: rgb(192, 32, 38);
  --sh-border-radius: 0px;
  --sh-duration-default: 200ms;
  --sh-duration-long: 650ms;
  --sh-duration-drawer: 320ms;
  --sh-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --sh-font-heading: "Assistant", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --sh-font-body: "Assistant", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --shop-columns: 3;
  --shop-columns-mobile: 2;
}

body:has(.shop-page) .site-header-wrapper,
body:has(.shop-page) header,
body:has(.shop-page) .site-header {
  box-shadow: none !important;
}

body.shop-drawer-open { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.shop-page {
  padding: 3rem 0 6rem;
  background: var(--sh-color-background);
  color: var(--sh-color-foreground);
  font-family: var(--sh-font-body);
}

.shop-page__container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 900px)  { .shop-page__container { padding: 0 3rem; } }
@media (min-width: 1400px) { .shop-page__container { padding: 0 4rem; } }

/* ═══════════════════════════════════════════════════════════════════════════
   CABECERA
   ═══════════════════════════════════════════════════════════════════════════ */
.shop-header { text-align: center; margin-bottom: 2rem; }

.shop-header .breadcrumb {
  background: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  justify-content: center;
  display: inline-flex;
  flex-wrap: wrap;
  color: var(--sh-color-foreground-55);
}

.shop-header .breadcrumb-item { color: var(--sh-color-foreground-55); }

.shop-header .breadcrumb-item + .breadcrumb-item::before {
  content: "—";
  color: var(--sh-color-foreground-30);
  padding: 0 0.5rem;
}

.shop-header .breadcrumb-item a {
  color: var(--sh-color-foreground-75);
  text-decoration: none;
  transition: color var(--sh-duration-default) var(--sh-ease);
}

.shop-header .breadcrumb-item a:hover { color: var(--sh-color-foreground); }
.shop-header .breadcrumb-item.active  { color: var(--sh-color-foreground); }

.shop-header .section-title,
.shop-page__title {
  font-family: var(--sh-font-heading);
  font-size: clamp(2rem, 4vw + 1rem, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: var(--sh-color-foreground);
}

.shop-header__divider {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--sh-color-foreground);
  margin: 1.5rem auto 0;
  border: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOOLBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--sh-color-foreground-10);
  border-bottom: 1px solid var(--sh-color-foreground-10);
}

/* Botón filtros (izquierda) */
.shop-toolbar__filters {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  background: transparent;
  border: none;
  color: var(--sh-color-foreground);
  font-family: var(--sh-font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity var(--sh-duration-default) var(--sh-ease);
  flex-shrink: 0;
}

.shop-toolbar__filters:hover { opacity: 0.65; }
.shop-toolbar__filters i { font-size: 1rem; line-height: 1; }
.shop-toolbar__filters .shop-toolbar__count {
  font-weight: 400;
  color: var(--sh-color-foreground-55);
}

/* Texto del botón: "Filtrar" en desktop, "Filtrar y ordenar" en móvil */
.shop-toolbar__filters-text--mobile { display: none; }
@media (max-width: 899px) {
  .shop-toolbar__filters-text--desktop { display: none; }
  .shop-toolbar__filters-text--mobile  { display: inline; }
}

/* Lado derecho */
.shop-toolbar__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .shop-toolbar__right { gap: 0.75rem; }
}

/* ─── Botones de vista (OCULTOS — para tienda-filters.js) ────────────────── */
.view-options {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SORT DROPDOWN CUSTOM (solo desktop)
   ═══════════════════════════════════════════════════════════════════════════ */
.sort-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 899px) {
  .sort-dropdown { display: none; }
}

.sort-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.875rem;
  background: var(--sh-color-background);
  border: 1px solid var(--sh-color-foreground-30);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--sh-font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--sh-color-foreground);
  transition: border-color var(--sh-duration-default) var(--sh-ease);
  white-space: nowrap;
  min-width: 180px;
}

.sort-dropdown__trigger:hover {
  border-color: var(--sh-color-foreground);
}

.sort-dropdown[data-open="true"] .sort-dropdown__trigger {
  border-color: var(--sh-color-foreground);
  box-shadow: 0 0 0 1px var(--sh-color-foreground);
}

.sort-dropdown__label {
  color: var(--sh-color-foreground-55);
  font-weight: 400;
}

.sort-dropdown__value {
  font-weight: 500;
  color: var(--sh-color-foreground);
  flex: 1;
  text-align: left;
}

.sort-dropdown__chevron {
  width: 10px;
  height: 6px;
  transition: transform var(--sh-duration-default) var(--sh-ease);
  flex-shrink: 0;
}

.sort-dropdown[data-open="true"] .sort-dropdown__chevron {
  transform: rotate(180deg);
}

/* Menu */
.sort-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  min-width: 100%;
  width: max-content;
  max-width: 280px;
  background: var(--sh-color-background);
  border: 1px solid var(--sh-color-foreground-10);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  z-index: 100;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 180ms var(--sh-ease),
              transform 180ms var(--sh-ease);
}

.sort-dropdown[data-open="true"] .sort-dropdown__menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sort-dropdown__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--sh-color-foreground-75);
  cursor: pointer;
  transition: background var(--sh-duration-default) var(--sh-ease),
              color var(--sh-duration-default) var(--sh-ease);
  white-space: nowrap;
}

.sort-dropdown__option:hover {
  background: var(--sh-color-background-2);
  color: var(--sh-color-foreground);
}

.sort-dropdown__option.is-selected {
  color: var(--sh-color-foreground);
  font-weight: 500;
}

.sort-dropdown__option.is-selected::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 7px;
  border-left: 1.5px solid var(--sh-color-foreground);
  border-bottom: 1.5px solid var(--sh-color-foreground);
  transform: rotate(-45deg) translate(2px, -1px);
}

.sort-dropdown__option:focus-visible {
  outline: 2px solid var(--sh-color-foreground);
  outline-offset: -2px;
}

/* Separador entre dropdown sort y columnas (solo desktop) */
@media (min-width: 900px) {
  .columns-toggle--desktop::before {
    content: "";
    display: block;
    width: 1px;
    height: 20px;
    background: var(--sh-color-foreground-10);
    margin-right: 0.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SELECTOR DE COLUMNAS
   ═══════════════════════════════════════════════════════════════════════════ */
.columns-toggle {
  display: none;
  align-items: center;
  gap: 0.125rem;
}

.columns-toggle--desktop { display: none; }
.columns-toggle--mobile  { display: inline-flex; }

@media (min-width: 900px) {
  .columns-toggle--desktop { display: inline-flex; }
  .columns-toggle--mobile  { display: none; }
}

.columns-toggle__btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  color: var(--sh-color-foreground-30);
  cursor: pointer;
  transition: color var(--sh-duration-default) var(--sh-ease);
}

.columns-toggle__btn:hover                { color: var(--sh-color-foreground-55); }
.columns-toggle__btn[aria-pressed="true"] { color: var(--sh-color-foreground); }

.columns-toggle__btn svg { display: block; width: 16px; height: 16px; }

/* Separador antes del total (solo desktop) */
.shop-toolbar__total {
  font-size: 0.85rem;
  color: var(--sh-color-foreground-55);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .shop-toolbar__total {
    display: inline-flex;
    align-items: center;
  }
  .shop-toolbar__total::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 20px;
    background: var(--sh-color-foreground-10);
    margin-right: 1rem;
  }
}

@media (max-width: 899px) { .shop-toolbar__total { display: none; } }

/* ═══════════════════════════════════════════════════════════════════════════
   FILTROS ACTIVOS (chips)
   ═══════════════════════════════════════════════════════════════════════════ */
.active-filters {
  margin: 0 0 1.5rem !important;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--sh-color-foreground-10);
}

.active-filters > small,
.active-filters .text-muted {
  display: inline-block;
  font-size: 0.7rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sh-color-foreground-55) !important;
  margin: 0 0.75rem 0 0 !important;
  font-weight: 500;
}

.filter-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem !important;
  vertical-align: middle;
}

.filter-tags .badge,
.filter-tags > .badge.bg-dark {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem !important;
  background: transparent !important;
  color: var(--sh-color-foreground) !important;
  border: 1px solid var(--sh-color-foreground-30);
  border-radius: 0 !important;
  padding: 0.35rem 0.7rem !important;
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--sh-duration-default) var(--sh-ease);
  margin: 0 !important;
}

.filter-tags .badge:hover {
  border-color: var(--sh-color-foreground);
  background: var(--sh-color-foreground) !important;
  color: var(--sh-color-background) !important;
}

.filter-tags .badge i { font-size: 0.85rem !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   GRID DE PRODUCTOS
   ═══════════════════════════════════════════════════════════════════════════ */
.products-grid.row {
  display: grid !important;
  grid-template-columns: repeat(var(--shop-columns-mobile, 2), 1fr);
  gap: 2rem 1rem;
  margin: 0 !important;
}

.products-grid.row > .no-products-wrapper {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .products-grid.row {
    grid-template-columns: repeat(var(--shop-columns, 3), 1fr);
    gap: 4rem 2rem;
  }
}

.products-grid > [class*="col-"] {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
}

.products-grid.list-view { grid-template-columns: 1fr !important; gap: 2rem !important; }
.products-grid.list-view > [class*="col-"] .card {
  display: grid !important;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 600px) {
  .products-grid.list-view > [class*="col-"] .card { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT CARD
   ═══════════════════════════════════════════════════════════════════════════ */
.products-grid .card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  height: auto !important;
  overflow: visible;
  transition: opacity var(--sh-duration-default) var(--sh-ease);
}

.products-grid .card:hover { transform: none; box-shadow: none !important; }

.products-grid .product-image-container {
  position: relative;
  overflow: hidden;
  background: var(--sh-color-background-2);
  aspect-ratio: 1 / 1;
  margin-bottom: 1.25rem;
}

.products-grid .card-img-top,
.products-grid .novedad-img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  transition: transform var(--sh-duration-long) var(--sh-ease),
              opacity var(--sh-duration-default) var(--sh-ease);
}

@media (hover: hover) {
  .products-grid .card:hover .card-img-top,
  .products-grid .card:hover .novedad-img { transform: scale(1.04); }
}

.products-grid .product-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background var(--sh-duration-default) var(--sh-ease);
  pointer-events: none;
}

@media (hover: hover) {
  .products-grid .card:hover .product-image-overlay { background: rgba(0, 0, 0, 0.04); }
}

.products-grid .product-image-container .badge.bg-danger {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  z-index: 2;
  background: var(--sh-color-foreground) !important;
  color: var(--sh-color-background) !important;
  font-size: 0.7rem !important;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.products-grid .btn-fav,
.products-grid .btn-favorite {
  position: absolute !important;
  top: 0.875rem !important;
  right: 0.875rem !important;
  width: 42px !important;
  height: 42px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  background: var(--sh-color-background) !important;
  border: 1px solid var(--sh-color-foreground-10) !important;
  border-radius: 50% !important;
  cursor: pointer;
  z-index: 3;
  backdrop-filter: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all var(--sh-duration-default) var(--sh-ease) !important;
}

.products-grid .btn-fav i {
  font-size: 1rem;
  color: var(--sh-color-foreground);
  transition: color var(--sh-duration-default) var(--sh-ease),
              transform var(--sh-duration-default) var(--sh-ease);
}

.products-grid .btn-fav .bi-heart-fill { color: var(--sh-color-sale); }

@media (hover: hover) {
  .products-grid .btn-fav:hover {
    background: var(--sh-color-foreground) !important;
    border-color: var(--sh-color-foreground) !important;
  }
  .products-grid .btn-fav:hover i {
    color: var(--sh-color-background) !important;
    transform: scale(1.1);
  }
}

.products-grid .btn-fav.active   { background: var(--sh-color-background) !important; }
.products-grid .btn-fav.active i { color: var(--sh-color-sale) !important; }

.products-grid .card-body { padding: 0 0.25rem !important; background: transparent; }

.products-grid .card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--sh-font-heading);
  font-size: 1.05rem !important;
  font-weight: 400;
  line-height: 1.4;
  color: var(--sh-color-foreground) !important;
  text-decoration: none !important;
  letter-spacing: 0.01em;
  margin: 0 0 0.625rem !important;
  transition: color var(--sh-duration-default) var(--sh-ease);
}

.products-grid .card-title:hover {
  color: var(--sh-color-foreground-75) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.products-grid .product-price {
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: var(--sh-color-foreground) !important;
  letter-spacing: 0.01em;
  margin: 0 0 1rem !important;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.products-grid .product-price .original-price {
  font-weight: 400 !important;
  text-decoration: line-through;
  color: var(--sh-color-foreground-55) !important;
  font-size: 0.875rem !important;
  margin-left: 0 !important;
}

.products-grid .product-price .original-price.d-block {
  display: block !important;
  width: 100%;
}

.products-grid .product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.products-grid .btn-add-cart {
  flex: 1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1rem !important;
  background: transparent !important;
  color: var(--sh-color-foreground) !important;
  border: 1px solid var(--sh-color-foreground) !important;
  border-radius: 0 !important;
  font-family: var(--sh-font-body);
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: all var(--sh-duration-default) var(--sh-ease) !important;
  overflow: hidden;
  box-shadow: none !important;
}

.products-grid .btn-add-cart::before { content: none !important; }

.products-grid .btn-add-cart:hover {
  background: var(--sh-color-foreground) !important;
  color: var(--sh-color-background) !important;
}

.products-grid .btn-add-cart:disabled {
  background: var(--sh-color-foreground) !important;
  color: var(--sh-color-background) !important;
  opacity: 0.6;
  cursor: default;
}

.products-grid .btn-quick-view { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER DRAWER
   ═══════════════════════════════════════════════════════════════════════════ */
.filter-drawer {
  --sh-color-foreground: rgb(18, 18, 18);
  --sh-color-foreground-75: rgba(18, 18, 18, 0.72);
  --sh-color-foreground-55: rgba(18, 18, 18, 0.55);
  --sh-color-foreground-30: rgba(18, 18, 18, 0.3);
  --sh-color-foreground-10: rgba(18, 18, 18, 0.1);
  --sh-color-foreground-05: rgba(18, 18, 18, 0.05);
  --sh-color-background: rgb(255, 255, 255);
  --sh-color-background-2: rgb(243, 243, 243);
  --sh-color-sale: rgb(192, 32, 38);
  --sh-border-radius: 0px;
  --sh-duration-default: 200ms;
  --sh-duration-long: 650ms;
  --sh-duration-drawer: 320ms;
  --sh-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --sh-font-heading: "Assistant", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --sh-font-body: "Assistant", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  position: fixed;
  inset: 0;
  z-index: 1080;
  visibility: hidden;
  pointer-events: none;
  font-family: var(--sh-font-body);
  color: var(--sh-color-foreground);
}

.filter-drawer.is-open { visibility: visible; pointer-events: auto; }

.filter-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background var(--sh-duration-drawer) var(--sh-ease);
  cursor: pointer;
}

.filter-drawer.is-open .filter-drawer__backdrop { background: rgba(0, 0, 0, 0.4); }

.filter-drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--sh-color-background);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--sh-duration-drawer) var(--sh-ease);
  box-shadow: 1px 0 24px rgba(0, 0, 0, 0.04);
}

.filter-drawer.is-open .filter-drawer__panel { transform: translateX(0); }

.filter-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--sh-color-foreground-10);
  flex-shrink: 0;
  background: var(--sh-color-background);
}

.filter-drawer__title {
  font-family: var(--sh-font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--sh-color-foreground);
}

.filter-drawer__close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--sh-color-foreground);
  cursor: pointer;
  transition: opacity var(--sh-duration-default) var(--sh-ease);
}

.filter-drawer__close:hover { opacity: 0.6; }
.filter-drawer__close i { font-size: 1.1rem; line-height: 1; }

.filter-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  background: var(--sh-color-background);
  -webkit-overflow-scrolling: touch;
}

.filter-drawer__footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid var(--sh-color-foreground-10);
  background: var(--sh-color-background);
  flex-shrink: 0;
}

.filter-drawer__footer .btn-drawer {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1rem;
  font-family: var(--sh-font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 0;
  cursor: pointer;
  transition: all var(--sh-duration-default) var(--sh-ease);
}

.filter-drawer__footer .btn-drawer--ghost {
  background: transparent;
  color: var(--sh-color-foreground);
  border: 1px solid var(--sh-color-foreground);
}
.filter-drawer__footer .btn-drawer--ghost:hover {
  background: var(--sh-color-foreground);
  color: var(--sh-color-background);
}

.filter-drawer__footer .btn-drawer--primary {
  background: var(--sh-color-foreground);
  color: var(--sh-color-background);
  border: 1px solid var(--sh-color-foreground);
}
.filter-drawer__footer .btn-drawer--primary:hover {
  background: transparent;
  color: var(--sh-color-foreground);
}

/* ═══════════════════════════════════════════════════════════════════════════
   GRUPOS DE FILTRO (dentro del drawer)
   ═══════════════════════════════════════════════════════════════════════════ */
.filter-group {
  border-bottom: 1px solid var(--sh-color-foreground-10);
  padding: 0 0 1.5rem;
  margin-bottom: 1.5rem !important;
}

.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0 !important;
}

/* Filter-group de "Ordenar por": SOLO visible en móvil */
.filter-group--sort-mobile {
  display: block;
}

@media (min-width: 900px) {
  .filter-group--sort-mobile { display: none; }
}

.filter-title {
  font-family: var(--sh-font-heading);
  font-weight: 500;
  color: var(--sh-color-foreground);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

/* Select nativo dentro del drawer (sort-select mobile) */
.filter-group .form-select,
.filter-group #sort-select {
  width: 100%;
  padding: 0.75rem 2.25rem 0.75rem 1rem !important;
  font-family: var(--sh-font-body);
  font-size: 0.9rem !important;
  font-weight: 400;
  color: var(--sh-color-foreground) !important;
  background-color: var(--sh-color-background) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23121212' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 10px 6px !important;
  border: 1px solid var(--sh-color-foreground-30) !important;
  border-radius: 0 !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.filter-group .form-select:focus,
.filter-group #sort-select:focus {
  outline: none !important;
  border-color: var(--sh-color-foreground) !important;
  box-shadow: 0 0 0 1px var(--sh-color-foreground) !important;
}

.search-box { position: relative; }

.search-box input,
.search-box .form-control {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-family: var(--sh-font-body);
  font-size: 0.9rem;
  color: var(--sh-color-foreground);
  background: var(--sh-color-background);
  border: 1px solid var(--sh-color-foreground-30);
  border-radius: 0;
  transition: border-color var(--sh-duration-default) var(--sh-ease),
              box-shadow var(--sh-duration-default) var(--sh-ease);
}

.search-box input:focus,
.search-box .form-control:focus {
  outline: none;
  border-color: var(--sh-color-foreground);
  box-shadow: 0 0 0 1px var(--sh-color-foreground);
}

.search-box input::placeholder { color: var(--sh-color-foreground-55); }

.search-box .search-icon {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sh-color-foreground-55);
  font-size: 0.95rem;
  pointer-events: none;
}

.provider-list, .category-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  max-height: 240px;
  overflow-y: auto;
}

.provider-item, .category-item {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  color: var(--sh-color-foreground-75) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 400;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  transition: color var(--sh-duration-default) var(--sh-ease);
  cursor: pointer;
}

.provider-item:hover, .category-item:hover {
  color: var(--sh-color-foreground) !important;
  background: transparent !important;
}

.provider-item.active, .category-item.active {
  color: var(--sh-color-foreground) !important;
  font-weight: 500;
  background: transparent !important;
}

.provider-item.active > span,
.category-item.active > span {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.provider-item .count, .category-item .count {
  font-size: 0.8rem;
  color: var(--sh-color-foreground-55);
  font-weight: 400;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin-left: 0.5rem;
}

.price-filter .form-control {
  padding: 0.65rem 0.75rem;
  font-family: var(--sh-font-body);
  font-size: 0.9rem;
  color: var(--sh-color-foreground);
  background: var(--sh-color-background);
  border: 1px solid var(--sh-color-foreground-30) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.price-filter .form-control:focus {
  outline: none !important;
  border-color: var(--sh-color-foreground) !important;
  box-shadow: 0 0 0 1px var(--sh-color-foreground) !important;
}

.price-filter #apply-price-filter,
.price-filter .btn-dark {
  width: 100%;
  margin-top: 0.75rem !important;
  padding: 0.75rem 1rem !important;
  background: var(--sh-color-foreground) !important;
  color: var(--sh-color-background) !important;
  border: 1px solid var(--sh-color-foreground) !important;
  border-radius: 0 !important;
  font-family: var(--sh-font-body);
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  cursor: pointer;
  transition: all var(--sh-duration-default) var(--sh-ease) !important;
  box-shadow: none !important;
}

.price-filter #apply-price-filter:hover {
  background: transparent !important;
  color: var(--sh-color-foreground) !important;
}

.quick-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 0.875rem;
  background: var(--sh-color-background);
  color: var(--sh-color-foreground) !important;
  border: 1px solid var(--sh-color-foreground-30) !important;
  border-radius: 0 !important;
  font-family: var(--sh-font-body);
  font-size: 0.85rem;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: all var(--sh-duration-default) var(--sh-ease);
}

.quick-filter-btn:hover { border-color: var(--sh-color-foreground) !important; }

.quick-filter-btn.active {
  background: var(--sh-color-foreground) !important;
  border-color: var(--sh-color-foreground) !important;
  color: var(--sh-color-background) !important;
}

.quick-filter-btn i { font-size: 0.9rem; }

.quick-filter-btn .badge {
  margin-left: auto !important;
  background: var(--sh-color-background) !important;
  color: var(--sh-color-foreground) !important;
  font-size: 0.65rem !important;
  padding: 0.15rem 0.4rem !important;
  border-radius: 0 !important;
  font-weight: 500;
}

.quick-filter-btn.active .badge {
  background: var(--sh-color-background) !important;
  color: var(--sh-color-foreground) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINACIÓN
   ═══════════════════════════════════════════════════════════════════════════ */
.pagination {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 4rem 0 0 !important;
  padding: 0;
  justify-content: center;
  list-style: none;
}

.pagination .page-item { margin: 0; }

.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  background: transparent !important;
  border: none !important;
  color: var(--sh-color-foreground-75) !important;
  font-family: var(--sh-font-body);
  font-size: 0.9rem !important;
  font-weight: 400;
  text-decoration: none;
  border-radius: 0 !important;
  transition: color var(--sh-duration-default) var(--sh-ease) !important;
  box-shadow: none !important;
}

.pagination .page-link:hover {
  background: transparent !important;
  color: var(--sh-color-foreground) !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pagination .page-item.active .page-link {
  color: var(--sh-color-foreground) !important;
  font-weight: 500 !important;
  background: transparent !important;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.pagination .page-item.disabled .page-link {
  color: var(--sh-color-foreground-30) !important;
  cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
  text-decoration: none;
  color: var(--sh-color-foreground-30) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ESTADO VACÍO
   ═══════════════════════════════════════════════════════════════════════════ */
.no-products {
  text-align: center;
  padding: 5rem 1.5rem !important;
  max-width: 480px;
  margin: 0 auto !important;
  animation: shopFadeIn 0.6s var(--sh-ease) forwards;
}

.no-products i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 2rem !important;
  border-radius: 50%;
  background: var(--sh-color-background-2);
  color: var(--sh-color-foreground) !important;
  font-size: 2rem !important;
  line-height: 1;
}

.no-products h4 {
  font-family: var(--sh-font-heading);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 1rem !important;
  color: var(--sh-color-foreground);
}

.no-products p {
  font-size: 1rem !important;
  color: var(--sh-color-foreground-75) !important;
  margin: 0 0 2rem !important;
  line-height: 1.6;
}

.no-products .btn,
.no-products .btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem !important;
  background: var(--sh-color-foreground) !important;
  color: var(--sh-color-background) !important;
  border: 1px solid var(--sh-color-foreground) !important;
  border-radius: 0 !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  transition: all var(--sh-duration-default) var(--sh-ease) !important;
}

.no-products .btn:hover {
  background: transparent !important;
  color: var(--sh-color-foreground) !important;
}

/* ═══════════════════════════════════════════════
   ESTADO AGOTADO EN PRODUCT CARDS
   ═══════════════════════════════════════════════ */

/* Badge "Agotado" — gris, no rojo */
.products-grid .product-image-container .badge.product-out-badge {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  z-index: 2;
  background: var(--sh-color-background) !important;
  color: var(--sh-color-foreground) !important;
  border: 1px solid var(--sh-color-foreground);
  font-size: 0.7rem !important;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

/* Imagen ligeramente atenuada cuando está agotado */
.products-grid .card.is-out-of-stock .novedad-img,
.products-grid .card.is-out-of-stock .card-img-top {
  opacity: 0.7;
  filter: grayscale(0.15);
  transition: opacity var(--sh-duration-default) var(--sh-ease),
              filter var(--sh-duration-default) var(--sh-ease);
}

/* Botón "Añadir al carrito" deshabilitado (simples) */
.products-grid .btn-add-cart.is-disabled,
.products-grid .btn-add-cart[disabled] {
  background: var(--sh-color-background) !important;
  color: var(--sh-color-foreground-55) !important;
  border-color: var(--sh-color-foreground-30) !important;
  cursor: not-allowed !important;
  pointer-events: none;
  opacity: 1;       /* anulamos el opacity:0.6 del :disabled previo */
}

.products-grid .btn-add-cart.is-disabled:hover,
.products-grid .btn-add-cart[disabled]:hover {
  background: var(--sh-color-background) !important;
  color: var(--sh-color-foreground-55) !important;
}

/* "Ver producto" en variables agotadas → mismo aspecto pero sigue siendo clicable */
.products-grid .btn-add-cart.is-disabled-look {
  background: var(--sh-color-background) !important;
  color: var(--sh-color-foreground-55) !important;
  border-color: var(--sh-color-foreground-30) !important;
}

.products-grid .btn-add-cart.is-disabled-look:hover {
  background: var(--sh-color-foreground-05) !important;
  color: var(--sh-color-foreground) !important;
  border-color: var(--sh-color-foreground) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMACIONES
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes shopFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.products-grid > [class*="col-"] {
  animation: shopFadeIn 0.45s var(--sh-ease) forwards;
  opacity: 0;
}

.products-grid > [class*="col-"]:nth-child(1) { animation-delay: 0.05s; }
.products-grid > [class*="col-"]:nth-child(2) { animation-delay: 0.10s; }
.products-grid > [class*="col-"]:nth-child(3) { animation-delay: 0.15s; }
.products-grid > [class*="col-"]:nth-child(4) { animation-delay: 0.20s; }
.products-grid > [class*="col-"]:nth-child(5) { animation-delay: 0.25s; }
.products-grid > [class*="col-"]:nth-child(6) { animation-delay: 0.30s; }
.products-grid > [class*="col-"]:nth-child(7) { animation-delay: 0.35s; }
.products-grid > [class*="col-"]:nth-child(8) { animation-delay: 0.40s; }
.products-grid > [class*="col-"]:nth-child(9) { animation-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE FINAL
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 899px) {
  .shop-page   { padding: 2rem 0 4rem; }
  .shop-header { margin-bottom: 1.5rem; }
}

@media (max-width: 600px) {
  .shop-page__container { padding: 0 1rem; }
  .products-grid.row    { gap: 1.5rem 0.75rem; }

  .filter-drawer__panel { max-width: 100%; }
  .filter-drawer__header,
  .filter-drawer__body,
  .filter-drawer__footer { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* Si está en 1 columna móvil, ajustar gap y tipografía */
@media (max-width: 899px) {
  .shop-page:has(.columns-toggle--mobile .columns-toggle__btn[data-cols-mobile="1"][aria-pressed="true"]) .products-grid.row {
    gap: 3rem 0 !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESIBILIDAD
   ═══════════════════════════════════════════════════════════════════════════ */
.btn-fav:focus-visible,
.btn-add-cart:focus-visible,
.quick-filter-btn:focus-visible,
.columns-toggle__btn:focus-visible,
.shop-toolbar__filters:focus-visible,
.filter-drawer__close:focus-visible,
.pagination .page-link:focus-visible,
.sort-dropdown__trigger:focus-visible {
  outline: 2px solid var(--sh-color-foreground);
  outline-offset: 2px;
}