/* =====================================================
   GX SHOP V3 — RETAIL PRO FINAL
   Mobile First · UX Premium · Clean WooCommerce
===================================================== */

/* =====================================================
   VARIABLES BASE
===================================================== */

:root {
  --gx-border: #e5e7eb;
  --gx-muted: #64748b;
  --gx-dark: #0f172a;
  --gx-bg-soft: #f8fafc;
  --gx-radius: 18px;
  --gx-primary: #0b3a82;
}

/* =====================================================
   RESET WOO LEGACY
===================================================== */

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none !important;
}

.woocommerce ul.products li.product {
  margin: 0 !important;
  width: auto !important;
  float: none !important;
}

.added_to_cart {
  display: none !important;
}

/* =====================================================
   HERO
===================================================== */

.gx-shop__hero {
  padding: 56px 20px 36px;
  background: var(--gx-bg-soft);
  border-bottom: 1px solid var(--gx-border);
}

.gx-shop__title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--gx-dark);
  margin: 0;
}

.gx-shop__desc {
  margin-top: 12px;
  color: var(--gx-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 720px;
}

/* =====================================================
   LAYOUT
===================================================== */

.gx-shop__container {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 36px 20px 64px;
  max-width: 1280px;
  margin: 0 auto;
}

@media (min-width: 1200px) {
  .gx-shop .gx-wrap {
    width: min(1360px, 94%);
  }
}

/* =====================================================
   TOOLBAR
===================================================== */

.gx-shop__toolbar{
  border-bottom:none;
  padding-bottom:0;
  margin-bottom:20px;
}

.gx-shop__results {
  font-size: 0.85rem;
  color: var(--gx-muted);
  font-weight: 500;
}

.gx-shop__ordering select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--gx-border);
  font-size: 0.9rem;
}

.gx-shop__ordering select:focus {
  outline: none;
  border-color: var(--gx-primary);
  box-shadow: 0 0 0 3px rgba(11, 58, 130, 0.15);
}

/* =====================================================
   SIDEBAR FILTROS
===================================================== */

.gx-shop__filters {
  order: -1;
}

.gx-shop__filters-card {
  border: 1px solid var(--gx-border);
  border-radius: var(--gx-radius);
  padding: 20px;
  background: #fff;
}

.gx-shop__filters-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--gx-dark);
}

.gx-shop__category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gx-shop__category-list li {
  position: relative;
  margin-bottom: 6px;
}

/* ==========================================
   CATEGORY TREE — MULTI LEVEL FIX
========================================== */

/* Todos los subniveles ocultos por defecto */
.gx-shop__category-list ul {
  display: none;
  margin-top: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--gx-border);
}

/* Mostrar cuando el LI esté abierto */
.gx-shop__category-list li.is-open > ul {
  display: block;
}

/* Nivel 2 */
.gx-shop__category-list > li > ul > li > a {
  font-size: 0.88rem;
  opacity: 0.9;
}

/* Nivel 3 */
.gx-shop__category-list > li > ul > li > ul > li > a {
  font-size: 0.82rem;
  opacity: 0.75;
}

.gx-shop__category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  text-decoration: none;
  color: #1e293b;
  transition: background 0.18s ease;
}

.gx-shop__category-list a:hover {
  background: #f1f5f9;
}

.gx-shop__category-list .current-cat > a {
  background: #e8f0ff;
  font-weight: 700;
  color: var(--gx-primary);
}

.gx-cat-toggle {
  font-size: 0.7rem;
  margin-left: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gx-shop__category-list li.is-open > a .gx-cat-toggle {
  transform: rotate(180deg);
}

/* =====================================================
   GRID PRODUCTOS
===================================================== */

.gx-shop__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* =====================================================
   GX CARD PRODUCTO
===================================================== */

.gx-card.product {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid var(--gx-border);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.gx-card.product:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

/* Imagen */

.gx-card__image {
  background: linear-gradient(180deg, #0b3a82, #062754);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gx-card__image img {
  max-height: 190px;
  object-fit: contain;
}

/* Badge */

.gx-badge--sale {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #ef4444;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  z-index: 2;
}

/* Body */

.gx-card__body {
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex-grow: 1;
}

/* Categorías */

.gx-card__cats {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 6px;
}

/* Título */

.gx-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  min-height: 2.6em;
}

.gx-card__title a {
  text-decoration: none;
  color: #0f172a;
}

/* Precio */

/* ======================================
   SISTEMA PRECIO UNIFICADO
====================================== */

/* ======================================
   LEGACY WOOCOMMERCE PRICE (AISLADO)
====================================== */

.precio-producto {
  margin-top: auto;
  margin-bottom: 18px;
}



/* Precio lista */

.precio-producto del {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 4px;
}

/* Precio oferta (🔥 mismo rojo global) */

.precio-producto ins .woocommerce-Price-amount {
  font-size: 18px;
  font-weight: 900;
  color: #dc2626;
}

/* Precio normal (sin oferta) */

.precio-producto .woocommerce-Price-amount {
  /* color: var(--gx-primary); */
  /* font-weight: 800; */
  /* font-size: 1.25rem; */
}

/* Cuando hay oferta */

.precio-producto del {
  display: block;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.precio-producto ins {
  text-decoration: none;
}

.precio-producto ins .woocommerce-Price-amount {
  color: var(--gx-primary);
  font-size: 1.25rem;
  font-weight: 800;
}

/* Acciones */

.gx-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ======================================
   UNIFICAR BOTONES CARD
====================================== */

.gx-card__actions .button,
.gx-card__actions .add_to_cart_button,
.gx-card__actions .gx-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 12px 16px !important;
  border-radius: 12px !important;

  font-size: 0.9rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;

  text-align: center !important;
  width: 100% !important;
  min-height: 44px;
}

.btn-carrito {
  background: var(--gx-primary);
  color: #ffffff !important;
}

.btn-carrito:hover {
  background: #082d66;
  transform: scale(1.02);
}

.btn-atributos-producto {
  background: transparent;
  border: 2px solid var(--gx-primary);
  color: var(--gx-primary) !important;
}

.btn-atributos-producto:hover {
  background: #f0f7ff;
}

/* =====================================================
   GX PAGINADOR RETAIL CLEAN
===================================================== */

.gx-shop__pagination {
  padding-top: 60px;
  display: flex;
  justify-content: center;
}

/* Reset completo Woo */

.woocommerce nav.woocommerce-pagination,
.woocommerce nav.woocommerce-pagination ul,
.woocommerce nav.woocommerce-pagination li {
  border: none !important;
  margin: 0;
  padding: 0;
}

/* UL */

.woocommerce nav.woocommerce-pagination ul {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
}

/* Base botón */

/* =====================================================
   GX PAGINADOR RETAIL PRO — FINAL
===================================================== */

.gx-shop__pagination {
  padding-top: 60px;
  display: flex;
  justify-content: center;
}

/* Reset completo Woo */

.woocommerce nav.woocommerce-pagination,
.woocommerce nav.woocommerce-pagination ul,
.woocommerce nav.woocommerce-pagination li {
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce nav.woocommerce-pagination ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  list-style: none;
}

/* Asegura que el LI no genere caja fantasma */

.woocommerce nav.woocommerce-pagination li {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ======================================
   Base botón circular
====================================== */

.woocommerce nav.woocommerce-pagination a,
.woocommerce nav.woocommerce-pagination span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 46px;
  height: 46px;

  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dbe2ea;

  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;

  color: var(--gx-primary);

  transition: all 0.2s ease;
}

/* Hover */

.woocommerce nav.woocommerce-pagination a:hover {
  background: rgba(11, 58, 130, 0.08);
  border-color: var(--gx-primary);
  transform: translateY(-2px);
}

/* Activo */

.woocommerce nav.woocommerce-pagination .current {
  background: var(--gx-primary) !important;
  color: #ffffff !important;
  border-color: var(--gx-primary) !important;
  box-shadow: 0 6px 18px rgba(11, 58, 130, 0.25);
  outline: none !important;
}

/* Dots */

.woocommerce nav.woocommerce-pagination .dots {
  background: transparent !important;
  border: none !important;
  width: auto;
  height: auto;
  padding: 0 6px;
  color: #94a3b8;
}

.woocommerce nav.woocommerce-pagination ul li {
  overflow: visible;
}

/* Prev / Next */

.woocommerce nav.woocommerce-pagination .prev,
.woocommerce nav.woocommerce-pagination .next {
  font-weight: 700;
  font-size: 1rem;
}

/* Focus accesible SOLO para enlaces */

.woocommerce nav.woocommerce-pagination a:focus {
  outline: 2px solid var(--gx-primary);
  outline-offset: 2px;
}

/* Evita focus raro en span.current */

.woocommerce nav.woocommerce-pagination span:focus {
  outline: none;
  box-shadow: none;
}

/* Hover */

.woocommerce nav.woocommerce-pagination a:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

/* Página actual */

.woocommerce nav.woocommerce-pagination .current {
  background: var(--gx-primary);
  color: #ffffff;
  border-color: var(--gx-primary);
  box-shadow: 0 6px 18px rgba(11, 58, 130, 0.25);
}

/* Dots */

.woocommerce nav.woocommerce-pagination .dots {
  background: transparent;
  border: none;
  min-width: auto;
  padding: 0 6px;
  color: #94a3b8;
}

/* Prev / Next */

.woocommerce nav.woocommerce-pagination .prev,
.woocommerce nav.woocommerce-pagination .next {
  font-weight: 700;
  font-size: 1rem;
}

/* =====================================================
   MODAL OVERLAY
===================================================== */

.gx-modal-attrs {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  z-index: 999999;
  padding: 20px;
}

.gx-modal-attrs.is-open {
  display: flex;
}

.gx-modal-attrs__overlay {
  position: absolute;
  inset: 0;
}

.gx-modal-attrs__dialog {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  animation: gxModalIn 0.25s ease;
}

@keyframes gxModalIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   MODAL TÉCNICO PRO
===================================================== */

.gx-modal-tech__title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.gx-modal-tech__price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gx-primary);
  margin-bottom: 16px;
}

.gx-modal-tech__meta {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--gx-border);
  padding-bottom: 16px;
}

.gx-modal-tech__section {
  margin-top: 22px;
}

.gx-modal-tech__section h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.gx-modal-attrs__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.gx-modal-attrs__list dt {
  font-weight: 700;
  font-size: 0.85rem;
}

.gx-modal-attrs__list dd {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #475569;
}

.gx-modal-tech__desc {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.7;
}

a.gx-card__media.img-wrap.woocommerce-LoopProduct-link {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

a.gx-card__media.img-wrap.woocommerce-LoopProduct-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (min-width: 768px) {
  .gx-shop__toolbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .gx-shop__ordering select {
    width: auto;
    min-width: 220px;
  }

  .gx-shop__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ======================================
   FILTRO MOBILE COLAPSADO
====================================== */

@media (max-width: 1023px) {
  .gx-shop__filters-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }

  .gx-shop__filters-title::after {
    content: "▾";
    font-size: 0.8rem;
    transition: transform 0.2s ease;
  }

  /* Cerrado por defecto */
  .gx-shop__filters-card .gx-shop__category-list {
    display: none;
  }

  /* Abierto */
  .gx-shop__filters-card.is-active .gx-shop__category-list {
    display: block;
  }

  .gx-shop__filters-card.is-active .gx-shop__filters-title::after {
    transform: rotate(180deg);
  }
}

@media (min-width: 1024px) {
  .gx-shop__container {
    flex-direction: row;
    align-items: flex-start;
  }

  /* El sidebar completo es sticky, no cada card individual */
  .gx-shop__filters {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--gx-border) transparent;
  }

  /* Cards estáticas dentro del sidebar sticky */
  .gx-shop__filters-card {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .gx-shop__content {
    flex: 1;
    min-width: 0;
  }

  .gx-shop__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ======================================
   GX PRICING SYSTEM — FINAL UNIFICADO
====================================== */

.gx-card__pricing {
  margin-top: auto;
  margin-bottom: 18px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  gap: 8px;
  min-height: 95px;
}

.gx-price {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

/* Label */

.gx-price__label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}

/* Base */

.gx-price__value {
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
}

/* ===============================
   LISTA (tachado)
=============================== */

.gx-price--lista .gx-price__value {
  font-size: 13px;
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #003966;
  font-weight: 600;
}

/* ===============================
   OFERTA (🔥 ROJO GLOBAL)
=============================== */

.gx-price--oferta .gx-price__value {
  font-size: 18px;
  font-weight: 900;
  color: #dc2626;
}

/* ===============================
   NORMAL
=============================== */

.gx-price--normal .gx-price__value {
  font-size: 17px;
  color: var(--gx-primary);
}

/* ===============================
   MAYORISTA
=============================== */

.gx-price--mayorista {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}

.gx-price--mayorista .gx-price__label {
  font-size: 10px;
  color: #475569;
}

.gx-price--mayorista .gx-price__value {
  font-size: 14px;
  font-weight: 800;
  color: #1C244B;
}

/* ======================================
   CLAMP TÍTULOS (3 LÍNEAS)
====================================== */

.gx-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 3;      /* 👈 máximo 3 líneas */
  -webkit-box-orient: vertical;

  overflow: hidden;
  text-overflow: ellipsis;

  min-height: 3.9em;         /* 👈 asegura altura consistente */
}

/* =====================================================
   FILTROS POR ATRIBUTO
===================================================== */

.gx-shop__attr-card {
  margin-top: 16px;
}

.gx-attr-card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gx-attr-clear-all {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gx-muted);
  text-decoration: underline;
  text-transform: none;
  letter-spacing: 0;
  margin-left: auto;
  white-space: nowrap;
}

.gx-attr-clear-all:hover {
  color: var(--gx-primary);
}

.gx-attr-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Grupo de atributo */

.gx-attr-group {
  border-bottom: 1px solid var(--gx-border);
}

.gx-attr-group:last-child {
  border-bottom: none;
}

.gx-attr-group__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 10px 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gx-dark);
  cursor: pointer;
  text-align: left;
}

.gx-attr-group__toggle:hover {
  color: var(--gx-primary);
}

.gx-attr-group__arrow {
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.gx-attr-group.is-open .gx-attr-group__arrow {
  transform: rotate(180deg);
}

.gx-attr-group__count {
  background: var(--gx-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 6px;
  line-height: 1.5;
}

/* Pills container */

.gx-attr-group__pills {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px 12px;
}

.gx-attr-group.is-open .gx-attr-group__pills {
  display: flex;
}

/* Pill individual */

.gx-attr-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--gx-border);
  font-size: 0.78rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  background: #fff;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.gx-attr-pill:hover {
  border-color: var(--gx-primary);
  color: var(--gx-primary);
  background: #f0f7ff;
}

.gx-attr-pill.is-active {
  background: var(--gx-primary);
  border-color: var(--gx-primary);
  color: #fff;
  font-weight: 700;
}

.gx-attr-pill.is-active:hover {
  background: #082d66;
  border-color: #082d66;
}

.gx-attr-pill__x {
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.8;
}

/* =====================================================
   BARRA FILTROS ACTIVOS (encima del grid de productos)
===================================================== */

.gx-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}

.gx-active-filters__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gx-primary);
  white-space: nowrap;
}

.gx-active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid var(--gx-primary);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--gx-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s ease;
}

.gx-active-filter-tag:hover {
  background: var(--gx-primary);
  color: #fff;
}

.gx-active-filter-tag__label {
  opacity: 0.7;
  font-weight: 500;
}

.gx-active-filter-tag__x {
  font-size: 0.9rem;
}

.gx-active-filters__clear {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--gx-muted);
  text-decoration: underline;
  white-space: nowrap;
}

.gx-active-filters__clear:hover {
  color: var(--gx-primary);
}

/* =====================================================
   RESPONSIVE — ATRIBUTOS EN MÓVIL
===================================================== */

@media (max-width: 1023px) {
  /* Atributos y descuento: colapsan igual en móvil */
  .gx-shop__attr-card .gx-attr-card__body,
  .gx-shop__discount-card .gx-attr-card__body {
    display: none;
  }

  .gx-shop__attr-card.is-active .gx-attr-card__body,
  .gx-shop__discount-card.is-active .gx-attr-card__body {
    display: flex;
  }

  .gx-attr-card__title::after {
    content: "▾";
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    margin-left: auto;
  }

  .gx-shop__attr-card.is-active .gx-attr-card__title::after,
  .gx-shop__discount-card.is-active .gx-attr-card__title::after {
    transform: rotate(180deg);
  }

  .gx-attr-clear-all {
    margin-left: 0;
  }
}

/* =====================================================
   DRAWER MÓVIL
===================================================== */

@media (max-width: 1023px) {

  .gx-shop__filters {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: min(320px, 88vw);
    z-index: 9990;
    background: #fff;
    overflow-y: auto;
    padding: 0 0 40px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.15);
  }

  .gx-shop__filters.is-open {
    transform: translateX(0);
  }

  /* Cards dentro del drawer: sin bordes individuales */
  .gx-shop__filters .gx-shop__filters-card {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--gx-border);
  }

}

/* Overlay */

.gx-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9989;
  backdrop-filter: blur(2px);
}

.gx-drawer-overlay.is-active {
  display: block;
  animation: gxFadeIn 0.25s ease;
}

@keyframes gxFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Header del drawer */

.gx-filters-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--gx-border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.gx-filters-drawer-header__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gx-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gx-filters-drawer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--gx-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 999px;
}

.gx-filters-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--gx-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.gx-filters-close:hover {
  background: #f1f5f9;
  color: var(--gx-dark);
}

/* Ocultar header del drawer en desktop */
@media (min-width: 1024px) {
  .gx-filters-drawer-header {
    display: none;
  }
}

/* =====================================================
   TOPBAR: BOTÓN MÓVIL + TOGGLE DESKTOP
===================================================== */

.gx-shop__topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* Botón "Filtros" en móvil */

.gx-btn-filters-mobile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #fff;
  border: 1px solid var(--gx-border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gx-dark);
  cursor: pointer;
  transition: all 0.18s ease;
}

.gx-btn-filters-mobile:hover {
  border-color: var(--gx-primary);
  color: var(--gx-primary);
}

.gx-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: var(--gx-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0 5px;
}

/* Solo visible en móvil */
@media (min-width: 1024px) {
  .gx-btn-filters-mobile {
    display: none;
  }
}

/* Botón "Ocultar/Mostrar filtros" en desktop */

.gx-btn-sidebar-toggle {
  display: none;
}

@media (min-width: 1024px) {
  .gx-btn-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: none;
    border: 1px solid var(--gx-border);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gx-muted);
    cursor: pointer;
    transition: all 0.18s ease;
  }

  .gx-btn-sidebar-toggle:hover {
    border-color: var(--gx-primary);
    color: var(--gx-primary);
  }

  .gx-sidebar-toggle__icon {
    display: inline-block;
    transition: transform 0.25s ease;
    flex-shrink: 0;
  }
}

/* =====================================================
   COLAPSO SIDEBAR — DESKTOP
===================================================== */

@media (min-width: 1024px) {

  .gx-shop__filters {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                min-width 0.3s ease;
  }

  .gx-shop__container.sidebar-collapsed .gx-shop__filters {
    width: 0 !important;
    min-width: 0 !important;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
  }

}

/* Card de descuento: sin margen extra */
.gx-shop__discount-card {
  margin-top: 0;
}

/* Espaciado entre cards en móvil (dentro del drawer) */
@media (max-width: 1023px) {
  .gx-shop__filters .gx-shop__filters-card + .gx-shop__filters-card {
    margin-top: 0;
  }
}

/* Mobile — ocultar categorías y centrar contenido */
@media (max-width: 767px) {
  .gx-card__meta {
    display: none;
  }

  .gx-card__body {
    align-items: center;
    text-align: center;
  }

  .gx-card__title {
    text-align: center;
  }

  .gx-card__pricing {
    width: 100%;
  }

  .gx-price {
    align-items: center;
  }

  .gx-card__actions {
    justify-content: center;
  }
}