/* ============================================================================
   FC Suplementos — Component Styles
   Header, footer, product cards, modals, cart panel
   ============================================================================ */

/* ══════════════════════════════════════
   HEADER / NAVBAR
   ══════════════════════════════════════ */
/* ── Top Bar (Announcement) ── */
.top-bar {
  background: var(--c-promo);
  color: var(--c-promo-text);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  z-index: calc(var(--z-sticky) + 1);
  display: flex;
  justify-content: center;
}

.top-bar__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
}

@media (min-width: 768px) {
  .top-bar__inner {
    flex-direction: row;
    justify-content: center;
    gap: var(--sp-6);
    align-items: center;
  }
}

.top-bar__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* Variante anuncio (única en uso): una sola línea centrada, compacta en mobile */
.top-bar--announce {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px var(--sp-4);
  font-size: 13px;
}
.top-bar__inner--announce {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
@media (max-width: 768px) {
  .top-bar--announce {
    font-size: var(--fs-xs);
    letter-spacing: 0.4px;
    padding: 5px var(--sp-3);
  }
  .top-bar__zap {
    display: none; /* los ⚡ forzaban 3 líneas y comían ~60px de pantalla */
  }
}

.top-bar__icon {
  font-size: 1.2em;
  width: 20px;
  text-align: center;
}

.header-container {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--c-bg); /* fallback */
}

.header {
  position: relative;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-border);
  transition: background var(--tr-base), box-shadow var(--tr-base);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--sh-md);
}

.header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

.header__logo {
  flex-shrink: 0;
  height: 50px;
  display: flex;
  align-items: center;
}

.header__logo img {
  height: 100% !important;
  width: auto !important;
  max-width: 220px !important;
  object-fit: contain !important;
  mix-blend-mode: multiply !important;
  filter: grayscale(1) contrast(3) brightness(1.1) !important;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.header__nav a {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--c-text-secondary);
  border-radius: var(--r-md);
  transition: color var(--tr-fast), background var(--tr-fast);
  white-space: nowrap;
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--c-text);
  background: var(--c-surface);
}

.header__nav a.active {
  color: var(--c-primary-light);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.header__auth-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--c-text);
  text-decoration: none;
  padding: 6px 12px;
  min-height: 42px;
  min-width: 42px;
  border-radius: var(--r-sm);
  transition: background var(--tr-fast), color var(--tr-fast);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
}

.header__auth-link:hover {
  background: var(--c-surface);
}

.header__search-btn,
.header__cart-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: var(--c-text-secondary);
  transition: color var(--tr-fast), background var(--tr-fast);
}

.header__search-btn:hover,
.header__cart-btn:hover {
  color: var(--c-text);
  background: var(--c-surface);
}

.header__cart-btn svg {
  width: 22px;
  height: 22px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  background: var(--c-accent);
  color: var(--c-primary-dark);
  font-size: 11px;
  font-weight: var(--fw-black);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  padding: 0 4px;
  animation: bounce-in 0.4s ease;
  box-shadow: 0 0 10px var(--c-accent-glow);
}

.cart-badge:empty,
.cart-badge[data-count="0"] {
  display: none;
}

/* Mobile hamburger */
.header__menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
  border-radius: var(--r-md);
}

@media (max-width: 768px) {
  .header__inner {
    padding: 0 var(--sp-4);
    gap: var(--sp-3);
  }

  /* Drawer anclado con position:absolute al .header (position:relative).
     NO usar position:fixed acá: el backdrop-filter del .header crea un
     containing block que atrapa a los descendientes fixed → el menú quedaba
     con altura colapsada y los links flotaban transparentes sobre la página. */
  .header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    padding: var(--sp-4) var(--sp-6) var(--sp-6);
    background: var(--c-bg-elevated);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--sh-lg);
    gap: var(--sp-2);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform var(--tr-base), visibility var(--tr-base);
    z-index: var(--z-overlay);
  }

  .header__nav.open {
    transform: translateX(0);
    visibility: visible;
  }

  .header__nav a {
    font-size: var(--fs-md);
    padding: var(--sp-4) var(--sp-4);
  }

  .header__menu-btn {
    display: flex;
  }

  .mobile-nav-user {
    margin-top: var(--sp-4);
    border-top: 1px solid var(--c-border);
    padding-top: var(--sp-4);
  }

  .mobile-nav-user-header {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-weight: var(--fw-bold);
    margin-bottom: var(--sp-3);
    color: var(--c-primary);
    font-size: var(--fs-md);
    padding: 0 var(--sp-4);
  }

  .mobile-nav-user-menu {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    padding-left: var(--sp-6);
  }

  .mobile-nav-user-link {
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--c-text-secondary);
  }

  .mobile-nav-user-logout {
    background: none;
    border: none;
    padding: var(--sp-3) var(--sp-4);
    color: var(--c-danger);
    font-size: var(--fs-sm);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: var(--fw-bold);
  }

  .mobile-nav-login-link {
    margin-top: var(--sp-4);
    border-top: 1px solid var(--c-border);
    padding: var(--sp-4) var(--sp-4) var(--sp-2);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-weight: var(--fw-bold);
    color: var(--c-text);
    font-size: var(--fs-md);
  }
}

/* ── Search bar (desktop inline / mobile expanded) ── */
.search-bar {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-bar__input {
  width: 100%;
  padding: var(--sp-2) var(--sp-4) var(--sp-2) 40px;
  background: var(--c-surface);
  border: 1px solid var(--c-text-muted);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  color: var(--c-text);
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}

.search-bar__input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-glow);
}

.search-bar__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--c-text-muted);
  pointer-events: none;
}

.search-bar__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--c-bg-elevated);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: var(--z-dropdown);
  display: none;
}

.search-bar__results.open {
  display: block;
  animation: slide-up 0.2s ease;
}

/* Search highlight */
.search-highlight {
  background: var(--c-primary-glow);
  color: var(--c-primary-light);
  padding: 0 2px;
  border-radius: 2px;
}

/* Keyboard shortcut indicator */
.search-bar__kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 6px;
  font-size: 11px;
  font-family: var(--ff-mono);
  color: var(--c-text-muted);
  background: var(--c-bg-elevated);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  pointer-events: none;
  line-height: 1.3;
}

.search-bar__input:focus ~ .search-bar__kbd {
  display: none;
}

/* See all results link */
.search-results__see-all {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--c-primary-light);
  border-top: 1px solid var(--c-border);
  transition: background var(--tr-fast);
}

.search-results__see-all:hover {
  background: var(--c-surface);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  transition: background var(--tr-fast);
}

.search-result-item:hover {
  background: var(--c-surface);
}

.search-result-item__img {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--c-surface);
}

.search-result-item__info {
  flex: 1;
  min-width: 0;
}

.search-result-item__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item__meta {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

.search-result-item__price {
  font-family: var(--ff-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--c-primary-light);
}

@media (max-width: 768px) {
  .search-bar {
    display: none;
  }
  /* absolute (no fixed): mismo motivo que .header__nav — el backdrop-filter
     del header atrapa a los fixed. Anclado al borde inferior del header. */
  .search-bar.mobile-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: none;
    padding: var(--sp-4);
    background: var(--c-bg-elevated);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--sh-md);
    z-index: var(--z-overlay);
  }
}

/* ══════════════════════════════════════
   PRODUCT CARD
   ══════════════════════════════════════ */
.product-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--tr-base), box-shadow var(--tr-base), border-color var(--tr-base);
  box-shadow: var(--sh-sm);
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--c-accent);
  box-shadow: 0 20px 40px var(--c-accent-glow);
}
.product-card:hover .product-card__name { color: var(--c-primary); }
.product-card__name { transition: color var(--tr-fast); }

.product-card__img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--c-bg-elevated);
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--sp-2);
  transition: transform var(--tr-slow);
}

.product-card:hover .product-card__img {
  transform: scale(1.06);
}

.product-card__badges {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  z-index: 2;
}

.badge-promo {
  background: var(--c-primary-dark);
  color: var(--c-accent);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--sh-sm);
  border: 1px solid var(--c-accent-glow);
}

.product-card__btn-add {
  margin-top: var(--sp-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
}

.product-card__body {
  padding: var(--sp-4);
}

.product-card__brand {
  font-size: var(--fs-xs);
  color: var(--c-primary-light);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-1);
}

.product-card__name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
  line-height: var(--lh-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__category {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-3);
}

.product-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.product-card__price {
  font-family: var(--ff-mono);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}

.product-card__price-old {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  text-decoration: line-through;
}

.product-card__stock {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}

.product-card__stock--ok { color: var(--c-success); }
.product-card__stock--low { color: var(--c-warning); }
.product-card__stock--out { color: var(--c-danger); }

.product-card__installments {
  font-size: var(--fs-xs);
  color: var(--c-success); /* Accentuate installments */
  font-weight: var(--fw-bold);
  margin-top: var(--sp-1);
}

/* ══════════════════════════════════════
   CART PANEL (slide-in)
   ══════════════════════════════════════ */
.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--c-bg-elevated);
  border-left: 1px solid var(--c-border);
  z-index: var(--z-cart);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--tr-base);
  box-shadow: var(--sh-lg);
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}

.cart-panel__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.cart-panel__count {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  font-weight: var(--fw-normal);
}

.cart-panel__close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: var(--c-text-muted);
  transition: color var(--tr-fast), background var(--tr-fast);
}

.cart-panel__close:hover {
  color: var(--c-text);
  background: var(--c-surface);
}

.cart-panel__items {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-6);
}

.cart-item {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--c-border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item__img {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  object-fit: cover;
  background: var(--c-surface);
  flex-shrink: 0;
}

.cart-item__info {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-1);
}

.cart-item__meta {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-2);
}

.cart-item__qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.cart-item__qty button {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--c-text-secondary);
  transition: background var(--tr-fast), color var(--tr-fast);
}

.cart-item__qty button:hover {
  background: var(--c-surface);
  color: var(--c-text);
}

.cart-item__qty span {
  width: 32px;
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.cart-item__price {
  font-family: var(--ff-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

.cart-item__remove {
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
  transition: color var(--tr-fast);
  margin-top: var(--sp-1);
}

.cart-item__remove:hover {
  color: var(--c-danger);
}

.cart-panel__footer {
  padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
  background: var(--c-surface);
}

.cart-panel__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
}

.cart-panel__subtotal-label {
  font-size: var(--fs-base);
  color: var(--c-text-secondary);
}

.cart-panel__subtotal-value {
  font-family: var(--ff-mono);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
}

.cart-panel__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.cart-panel__benefits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--sp-3);
  padding: var(--sp-3);
  background: var(--c-surface-hover);
  border-radius: var(--r-md);
}

.cart-panel__benefit-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-text-secondary);
}

.cart-empty {
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.cart-empty__icon {
  width: 80px;
  height: 80px;
  background: var(--c-bg-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  margin-bottom: var(--sp-4);
}

.cart-empty__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-2);
}

.cart-empty__desc {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--sp-6);
}

.cart-empty__actions {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .cart-panel {
    width: 100vw;
  }
}

/* ══════════════════════════════════════
   PRODUCT MODAL (quick view)
   ══════════════════════════════════════ */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--tr-base), visibility var(--tr-base);
}

.product-modal.open {
  opacity: 1;
  visibility: visible;
}

.product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.product-modal__content {
  position: relative;
  background: var(--c-bg-elevated);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: var(--sh-lg);
  animation: slide-up 0.3s ease;
}

.product-modal__close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--c-surface);
  color: var(--c-text-muted);
  z-index: 2;
  transition: color var(--tr-fast), background var(--tr-fast);
}

.product-modal__close:hover {
  color: var(--c-text);
  background: var(--c-surface-hover);
}

.product-modal__image {
  aspect-ratio: 1;
  background: var(--c-surface);
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  overflow: hidden;
}

.product-modal__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal__details {
  padding: var(--sp-8);
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .product-modal__content {
    grid-template-columns: 1fr;
    max-height: 95vh;
  }

  .product-modal__image {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    max-height: 300px;
  }

  .product-modal__details {
    padding: var(--sp-6);
  }
}

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.footer {
  background: var(--c-primary);
  border-top: 1px solid var(--c-primary-light);
  padding: var(--sp-16) 0 var(--sp-8);
  color: var(--c-text-inverse);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: var(--sp-10);
  margin-bottom: var(--sp-10);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.footer__brand img {
  width: 100% !important;
  height: auto !important;
  max-width: 220px !important;
  object-fit: contain !important;
  mix-blend-mode: screen !important;
  filter: grayscale(1) invert(1) contrast(3) brightness(1.5) !important;
}

.footer__brand p {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--lh-relaxed);
  max-width: 300px;
}

.footer__social {
  display: flex;
  gap: var(--sp-3);
}

.footer__social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  color: var(--c-text-inverse);
  transition: color var(--tr-fast), background var(--tr-fast);
}

.footer__social a:hover {
  color: var(--c-primary-dark);
  background: var(--c-accent);
}

.footer__heading {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-inverse);
  margin-bottom: var(--sp-5);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer__links a {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--tr-fast);
}

.footer__links a:hover {
  color: var(--c-accent);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--sp-3);
}

.footer__contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--c-accent);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--sp-3);
    text-align: center;
  }

  /* Targets táctiles: los links del footer medían ~22px de alto */
  .footer__links {
    gap: var(--sp-1);
  }
  .footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════
   WHATSAPP FLOAT BUTTON
   ══════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: var(--z-whatsapp);
  width: 60px;
  height: 60px;
  background: var(--c-whatsapp);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  animation: pulse 2s infinite;
  transition: transform var(--tr-fast), box-shadow var(--tr-fast);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
  animation: none;
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

.whatsapp-float__tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--c-surface);
  color: var(--c-text);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  box-shadow: var(--sh-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-fast);
}

.whatsapp-float:hover .whatsapp-float__tooltip {
  opacity: 1;
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 96px; /* Evita superposición con el add-to-cart fijo en mobile */
    right: var(--sp-4);
    width: 54px;
    height: 54px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }

  .whatsapp-float__tooltip {
    display: none;
  }
}

/* ══════════════════════════════════════
   FILTER SIDEBAR
   ══════════════════════════════════════ */
.filters-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-h) + var(--sp-6));
  max-height: calc(100vh - var(--header-h) - var(--sp-12));
  overflow-y: auto;
}

.filter-group {
  margin-bottom: var(--sp-6);
}

.filter-group__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-group__clear {
  font-size: var(--fs-xs);
  color: var(--c-primary-light);
  font-weight: var(--fw-normal);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.filter-group__clear:hover {
  color: var(--c-primary);
}

.filter-check {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  transition: color var(--tr-fast);
}

.filter-check:hover {
  color: var(--c-text);
}

.filter-check input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--c-border-light);
  border-radius: 4px;
  transition: all var(--tr-fast);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.filter-check input[type="checkbox"]:checked {
  background: var(--c-primary);
  border-color: var(--c-primary);
}

.filter-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-count {
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  background: var(--c-surface);
  padding: 1px 8px;
  border-radius: var(--r-full);
}

/* Price slider */
.filter-price-display {
  font-family: var(--ff-mono);
  font-size: var(--fs-sm);
  color: var(--c-text);
  text-align: center;
  margin-bottom: var(--sp-3);
}

.filter-price-slider {
  width: 100%;
  accent-color: var(--c-primary);
}

/* Active filters */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  background: var(--c-primary-glow);
  color: var(--c-primary-light);
  font-size: var(--fs-xs);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--tr-fast);
}

.active-filter-tag:hover {
  background: rgba(59, 141, 189, 0.3);
}

/* Mobile filter drawer */
@media (max-width: 768px) {
  .filters-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    max-height: 100vh;
    z-index: var(--z-modal);
    background: var(--c-bg-elevated);
    border-right: 1px solid var(--c-border);
    padding: var(--sp-6);
    transform: translateX(-100%);
    transition: transform var(--tr-base);
  }

  .filters-sidebar.open {
    transform: translateX(0);
  }
}

/* ══════════════════════════════════════
   QUANTITY SELECTOR (product detail)
   ══════════════════════════════════════ */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  width: fit-content;
}

.qty-selector button {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--c-text-secondary);
  transition: background var(--tr-fast), color var(--tr-fast);
}

.qty-selector button:hover {
  background: var(--c-surface);
  color: var(--c-text);
}

.qty-selector__value {
  width: 48px;
  text-align: center;
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  font-family: var(--ff-mono);
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  padding: var(--sp-2) 0;
}
