/* SAM'S CLUB REDESIGN — MAIN STYLES (Mobile-First) */

/* Reset */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:16px; scroll-behavior:smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--ease-slow), color var(--ease-slow);
  padding-bottom: var(--bottom-h);
  overflow-x: hidden;
}
a { color: var(--sams-blue); text-decoration:none; }
a:hover { text-decoration: underline; }
img { max-width:100%; display:block; }
button { font-family:inherit; cursor:pointer; border:none; background:none; }
ul,ol { list-style:none; }

/* Focus */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--sams-blue);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position:absolute; top:-100%; left:16px;
  background:var(--sams-blue); color:#fff;
  padding:8px 16px; border-radius:4px;
  z-index:9999; font-weight:600;
}
.skip-link:focus { top:8px; }

/* Container */
.container { width:100%; max-width:var(--max-w); margin:0 auto; padding:0 16px; }

/* ==========================================
   ANNOUNCEMENT BAR 
   ========================================== */
.announce-bar {
  background: var(--announce-bg);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.announce-bar a { color: #fff; text-decoration: underline; margin-left: 6px; }

/* ==========================================
                    HEADER
   ========================================== */
.header {
  background: var(--header-bg);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 4px var(--shadow);
  transition: background var(--ease-slow);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  max-width: var(--max-w);
  margin: 0 auto;
  flex-wrap: wrap;
}

/* Logo — SVG-style text  */
.logo { display:flex; align-items:center; gap:6px; flex-shrink:0; color:#fff; text-decoration:none; order:1; }
.logo-text {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo-bracket { font-size:1.9rem; font-weight:300; color:#fff; }
.logo:hover { transform: translateY(-1px); text-decoration:none; }
.logo:hover .logo-text,
.logo:hover .logo-bracket { color: var(--sams-yellow); }

/* Nav links*/
.header-nav { display:none; align-items:center; gap:4px; margin-left:8px; order:2; }
.header-nav__link {
  display:flex; align-items:center; gap:6px;
  color:rgba(255,255,255,0.9); font-size:0.8125rem; font-weight:500;
  padding:8px 12px; border-radius:var(--radius-sm);
  transition: background var(--ease), color var(--ease);
  text-decoration:none; white-space:nowrap;
}
.header-nav__link:hover { background:rgba(0,0,0,0.15); text-decoration:none; color: var(--sams-yellow); }
.header-nav__link:hover svg { fill: var(--sams-yellow); }
.header-nav__link svg { width:18px; height:18px; fill:currentColor; }
.nav-dropdown { position:relative; }
.nav-dropdown__caret { display:inline-block; margin-left:4px; font-size:0.8rem; transform: translateY(-1px); }
.nav-dropdown__panel {
  display:none;
  position:absolute;
  top:100%;
  left:0;
  min-width:200px;
  background: rgba(17,24,39,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  padding: 8px 0;
  margin-top: 8px;
  z-index: 50;
}
.nav-dropdown__panel a {
  display:block;
  color: rgba(255,255,255,0.9);
  padding: 10px 16px;
  font-size: 0.9rem;
  text-decoration:none;
  transition: background var(--ease), color var(--ease);
}
.nav-dropdown__panel a:hover { background: rgba(255,255,255,0.08); color: var(--sams-yellow); }
.nav-dropdown:hover .nav-dropdown__panel,
.nav-dropdown.nav-dropdown--open .nav-dropdown__panel { display:block; }

/* Search bar  */
.search-wrap {
  flex:1; position:relative; max-width:580px;
  min-width:0;
  order: 3;   /* desktop: despues de nav(2), antes de actions(4) */
}
@media (max-width:1023px) {
  /* Mobile: header en una sola fila */
  .header-inner {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 12px;
  }

  /* Ocultar texto del logo, solo mostrar <> */
  .logo-text {
    display: none;
  }
  .logo {
    flex-shrink: 0;
  }
  .logo-bracket {
    font-size: 1.6rem;
  }

  /* Search ocupa el espacio restante en la misma fila */
  .search-wrap {
    order: 3;
    flex: 1;
    min-width: 0;
    max-width: 100%;
  }

  /* Ocultar botones de accion del header */
  .header-actions {
    display: none !important;
  }
}
.search-wrap input {
  width:100%; padding:10px 48px 10px 16px;
  border-radius: var(--radius-full);
  border: none;
  background: #fff;
  font-size: 0.875rem;
  color: #333;
  height: 42px;
}
.search-wrap input::placeholder { color:#888; }
.search-wrap input:focus { outline:2px solid #fff; }
.search-btn {
  position:absolute; right:4px; top:50%; transform:translateY(-50%);
  width:34px; height:34px; border-radius:50%;
  background: var(--sams-yellow);
  display:flex; align-items:center; justify-content:center;
  transition: background var(--ease), transform var(--ease);
}
.search-btn:hover { background:#e09510; transform:translateY(-50%) scale(1.06); }
.search-btn svg { width:18px; height:18px; fill:#fff; }

/* Header right actions */
.header-actions { display:flex; align-items:center; gap:4px; margin-left:auto; order:4; }
.h-action {
  display:flex; flex-direction:column; align-items:center; gap:1px;
  color:#fff; font-size:0.6875rem; padding:6px 10px;
  border-radius: var(--radius-sm);
  min-width:44px; min-height:44px; justify-content:center;
  transition: background var(--ease);
  text-decoration:none; position:relative;
}
.h-action:hover { background:rgba(0,0,0,0.15); text-decoration:none; color: var(--sams-yellow); }
.h-action:hover svg { fill: var(--sams-yellow); }
.h-action svg { width:22px; height:22px; fill:#fff; }
.h-action__label { display:none; }
.h-action__sub { font-size:0.6875rem; font-weight:600; }
.cart-badge {
  position:absolute; top:2px; right:4px;
  background:var(--sams-yellow); color:#000;
  font-size:10px; font-weight:700;
  min-width:18px; height:18px; border-radius:9px;
  display:flex; align-items:center; justify-content:center;
  padding:0 4px; transition: transform var(--ease-bounce);
}
.cart-badge.bounce { animation: badgePop .4s var(--ease-bounce); }
@keyframes badgePop { 0%,100%{transform:scale(1)} 50%{transform:scale(1.35)} }

/* Menu toggle (mobile) */
.menu-toggle {
  display:flex; align-items:center; justify-content:center;
  width:44px; height:44px; color:#fff;
}
.menu-toggle svg { width:24px; height:24px; fill:#fff; }

/* ==========================================
   SECONDARY BAR
   ========================================== */
.secondary-bar {
  background: var(--secondary-bg);
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.secondary-bar::-webkit-scrollbar { display:none; }
.secondary-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 40px;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.sec-left {
  display: flex; align-items: center; gap: 16px;
  padding-right: 16px; border-right: 1px solid var(--border);
  margin-right: 16px;
  color: var(--text-2); font-size:0.8125rem;
}
.sec-left svg { width:16px; height:16px; fill:var(--sams-blue); flex-shrink:0; }
.sec-left a, .sec-left span { color:var(--text-2); text-decoration:none; display:flex; align-items:center; gap:4px; }
.sec-links { display:flex; align-items:center; gap:0; }
.sec-links a {
  color: var(--text-2); text-decoration:none;
  padding: 10px 12px; font-weight:500;
  position: relative;
  transition: color var(--ease);
}
.sec-links a::after {
  content:''; position:absolute; bottom:0; left:12px; right:12px;
  height:2px; background:var(--sams-blue);
  transform:scaleX(0); transform-origin:center;
  transition: transform var(--ease);
}
.sec-links a:hover { color:var(--text); }
.sec-links a:hover::after { transform:scaleX(1); }

/* ==========================================
   PROMO BANNERS 
   ========================================== */
.banner-section { padding: 16px; }
.banner-section .container { display:flex; flex-direction:column; gap:12px; }

.promo-banner {
  width:100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sams-blue);
  color: #fff;
  position: relative;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease);
}
.promo-banner:hover { transform:translateY(-2px); box-shadow:0 4px 16px var(--shadow-md); }

.promo-banner__content {
  padding: 24px 20px;
  position: relative;
  z-index: 1;
}
.promo-banner__tag {
  font-size:0.75rem; font-weight:700; text-transform:uppercase;
  letter-spacing:0.05em; margin-bottom:4px; opacity:0.85;
}
.promo-banner__title {
  font-size:1.5rem; font-weight:800; line-height:1.15; margin-bottom:6px;
}
.promo-banner__highlight {
  font-size:2.5rem; font-weight:900; line-height:1;
}
.promo-banner__sub {
  font-size:0.8125rem; opacity:0.8; margin-top:8px;
}

/* Banner grid for desktop */
.banner-grid { display:grid; grid-template-columns:1fr; gap:12px; }

/* Small banners pair */
.banner-sm {
  border-radius: var(--radius);
  overflow:hidden;
  background: var(--sams-blue);
  color:#fff;
  padding:20px;
  transition: transform var(--ease);
  cursor:pointer;
}
.banner-sm:hover { transform:translateY(-2px); }
.banner-sm__title { font-size:1rem; font-weight:700; margin-bottom:4px; }
.banner-sm__desc { font-size:0.8125rem; opacity:0.85; }
.banner-sm__price { font-size:1.75rem; font-weight:800; margin-top:8px; }
.banner-sm__old { font-size:0.875rem; text-decoration:line-through; opacity:0.6; }

/* ==========================================
   PRODUCT CARDS 
   ========================================== */
.section { padding: 24px 0; }
.section-header {
  display:flex; align-items:baseline; justify-content:space-between;
  margin-bottom:16px; gap:12px;
}
.section-title { font-size:1.25rem; font-weight:700; color:var(--text); }
.section-link { font-size:0.8125rem; color:var(--sams-blue); font-weight:600; white-space:nowrap; }

/* Subcategory pills  */
.subcategory-pills {
  display:flex; gap:8px; overflow-x:auto; padding:0 0 12px;
  scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.subcategory-pills::-webkit-scrollbar { display:none; }
.pill {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--bg);
  white-space: nowrap;
  transition: all var(--ease);
  cursor: pointer;
  /* Touch target mínimo */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.pill:hover, .pill.active {
  border-color: var(--sams-blue);
  color: var(--sams-blue);
  background: rgba(0,103,160,0.05);
}

/* Products scroll  */
.products-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0 8px;
}
.products-scroll::-webkit-scrollbar { display:none; }

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
  scroll-snap-align: start;
  flex: 0 0 170px;
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  border-color: var(--border);
  box-shadow: 0 4px 16px var(--shadow-md);
  transform: translateY(-2px);
}

/* Promo tag + Ver más  */
.product-card__top {
  display:flex; align-items:center; gap:6px;
  padding:8px 12px 0;
  font-size:0.75rem;
}
.promo-tag {
  background: var(--sams-green);
  color:#fff; padding:2px 8px;
  border-radius: var(--radius-sm);
  font-weight:600; font-size:0.6875rem;
}
.promo-link { color:var(--sams-blue); font-weight:500; font-size:0.75rem; }

/* Wishlist heart  */
.product-card__wish {
  position:absolute; top:8px; right:8px;
  width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  z-index:2; transition: transform var(--ease);
  /* Expand touch target without changing visual size */
  padding: 6px;
  margin: -6px;
}
.product-card__wish svg {
  width:20px; height:20px; fill:none; stroke:var(--text-3); stroke-width:2;
  transition: fill var(--ease), stroke var(--ease);
}
.product-card__wish:hover svg { stroke:var(--sams-red); }
.product-card__wish.active svg { fill:var(--sams-red); stroke:var(--sams-red); }
.product-card__wish:hover { transform:scale(1.15); }

/* Product image */
.product-card__img {
  width:100%; aspect-ratio:1;
  display:flex; align-items:center; justify-content:center;
  padding:12px;
  background:var(--bg);
}
.product-card__img img {
  max-width:100%; max-height:100%; object-fit:contain;
  transition: transform var(--ease-slow);
}
.product-card:hover .product-card__img img { transform:scale(1.03); }

/* Product info */
.product-card__info { padding:0 12px 12px; }
.product-card__name {
  font-size:0.8125rem; color:var(--text); font-weight:400;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; margin-bottom:6px; line-height:1.4;
  transition: color var(--ease);
  cursor: pointer;
}
.product-card__name:hover {
  color: var(--sams-blue);
}
.product-card__price {
  font-family:var(--mono); font-size:1.125rem; font-weight:700; color:var(--text);
}
.product-card__price-old {
  font-size:0.75rem; color:var(--text-3); text-decoration:line-through;
  font-weight:400; margin-left:4px;
}
.product-card__shipping {
  font-size:0.6875rem; color:var(--sams-green); font-weight:600; margin-top:4px;
}

/* Add to cart button  */
.add-btn {
  display:flex; align-items:center; justify-content:center; gap:6px;
  width:calc(100% - 24px); margin:0 12px 12px;
  padding:10px; background:var(--sams-blue); color:#fff;
  border-radius: var(--radius-sm); font-size:0.8125rem; font-weight:600;
  min-height:44px;
  transition: background var(--ease), transform 100ms;
  position:relative; overflow:hidden;
}
.add-btn:hover { background:var(--sams-hover); }
.add-btn:active { transform:scale(0.97); }
.add-btn.added { background:var(--sams-green); }
.add-btn svg { width:16px; height:16px; fill:#fff; }

/* Ripple */
.add-btn::after {
  content:''; position:absolute; inset:0;
  background:radial-gradient(circle at var(--rx,50%) var(--ry,50%),rgba(255,255,255,0.3) 0%,transparent 70%);
  opacity:0; transform:scale(0); transition:opacity .3s, transform .4s;
}
.add-btn.ripple::after { opacity:1; transform:scale(2.5); }

@keyframes addPulse { 0%{transform:scale(1)} 50%{transform:scale(1.03)} 100%{transform:scale(1)} }

/* ==========================================
   MEMBERSHIP BANNER
   ========================================== */
.membership-banner {
  background: var(--sams-blue);
  color:#fff; border-radius:var(--radius);
  padding:24px 20px; text-align:center;
}
.membership-banner h2 { font-size:1.25rem; font-weight:700; margin-bottom:4px; }
.membership-banner p { font-size:0.875rem; opacity:0.85; margin-bottom:16px; }
.btn-white {
  display:inline-block; background:#fff; color:var(--sams-blue);
  padding:10px 24px; border-radius:var(--radius-full);
  font-weight:600; font-size:0.875rem;
  transition: background var(--ease), transform var(--ease);
}
.btn-white:hover { background:#e8e8e8; transform:translateY(-1px); text-decoration:none; }

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: var(--bg-gray); border-top:1px solid var(--border-light);
  padding:32px 0 24px;
}
.footer-grid { display:grid; grid-template-columns:1fr; gap:24px; }
.footer-col h2, .footer-col h3 { font-size:0.875rem; font-weight:700; color:var(--text); margin-bottom:12px; }
.footer-col a { display:block; color:var(--text-2); font-size:0.8125rem; padding:4px 0; }
.footer-col a:hover { color:var(--sams-blue); }
.footer-bottom {
  text-align:center; font-size:0.75rem; color:var(--text-3);
  border-top:1px solid var(--border-light); margin-top:24px; padding-top:16px;
}

/* ==========================================
   BOTTOM NAV (mobile)
   ========================================== */
.bottom-nav {
  position:fixed; bottom:0; left:0; right:0;
  height:var(--bottom-h); background:var(--bg-card);
  border-top:1px solid var(--border-light);
  display:flex; align-items:center; justify-content:space-around;
  z-index:200; box-shadow:0 -1px 6px var(--shadow);
  padding-bottom:env(safe-area-inset-bottom,0);
}
.bnav-item {
  display:flex; flex-direction:column; align-items:center; gap:2px;
  color:var(--text-3); font-size:0.625rem; text-decoration:none;
  min-width:44px; min-height:44px; justify-content:center;
  transition: color var(--ease);
}
.bnav-item svg { width:22px; height:22px; fill:currentColor; }
.bnav-item.active { color:var(--sams-blue); }

/* ==========================================
   TOAST
   ========================================== */
.toast-wrap {
  position:fixed; bottom:calc(var(--bottom-h) + 12px); left:50%;
  transform:translateX(-50%); z-index:500; display:flex; flex-direction:column; gap:8px;
  pointer-events:none;
}
.toast {
  background:#333; color:#fff; padding:10px 20px;
  border-radius:var(--radius-full); font-size:0.8125rem; font-weight:500;
  box-shadow:0 6px 20px var(--shadow-md);
  display:flex; align-items:center; gap:8px; pointer-events:auto;
  animation: toastIn .35s ease, toastOut .3s ease 2.5s forwards;
  white-space:nowrap;
}
.toast--ok { background:var(--sams-green); }
.toast--err { background:var(--sams-red); }
@keyframes toastIn { from{opacity:0;transform:translateY(16px) scale(.95)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes toastOut { to{opacity:0;transform:translateY(-8px) scale(.95)} }

/* ==========================================
   FLOATING ACCESSIBILITY BUTTON (FAB)
   ========================================== */
.a11y-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sams-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none; /* hidden by default (mobile-first) */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.a11y-fab:hover {
  background: var(--sams-hover);
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.a11y-fab:active {
  transform: scale(0.95);
}
/* Hide FAB when panel is open */
.a11y-panel.open ~ .a11y-fab,
.a11y-fab.hidden { display: none !important; }

/* Show FAB only on desktop */
@media (min-width:1024px) {
  .a11y-fab {
    display: flex;
  }
}

/* ==========================================
   ACCESSIBILITY PANEL
   ========================================== */
.a11y-panel {
  position:fixed; top:0; right:-320px; width:300px; height:100vh;
  background:var(--bg-card); border-left:1px solid var(--border);
  z-index:400; padding:20px; overflow-y:auto;
  transition: right var(--ease-slow); box-shadow:-4px 0 20px var(--shadow);
}
.a11y-panel.open { right:0; }
.a11y-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.a11y-head h2 { font-size:1rem; font-weight:700; }
.a11y-close {
  width:32px; height:32px; border-radius:50%; background:var(--bg-gray);
  display:flex; align-items:center; justify-content:center; font-size:18px; color:var(--text);
  /* Expand touch area */
  min-width: 44px;
  min-height: 44px;
}
.a11y-group { margin-bottom:20px; }
.a11y-label { font-size:0.75rem; font-weight:600; color:var(--text-3); text-transform:uppercase; letter-spacing:.04em; margin-bottom:8px; }
.toggle {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 0; cursor:pointer; min-height:44px;
}
.toggle__text { font-size:0.875rem; color:var(--text); }
.toggle__track {
  width:44px; height:24px; background:var(--border); border-radius:12px;
  position:relative; transition:background var(--ease); flex-shrink:0;
}
.toggle__track::after {
  content:''; position:absolute; top:2px; left:2px;
  width:20px; height:20px; background:#fff; border-radius:50%;
  transition: transform var(--ease); box-shadow:0 1px 3px rgba(0,0,0,.2);
}
.toggle.on .toggle__track { background:var(--sams-blue); }
.toggle.on .toggle__track::after { transform:translateX(20px); }

/* ARIA switch state visual sync — complementa la clase .on */
[role="switch"][aria-checked="true"] .toggle__track { background:var(--sams-blue); }
[role="switch"][aria-checked="true"] .toggle__track::after { transform:translateX(20px); }

.a11y-range { padding:8px 0; }
.a11y-range input[type=range] {
  width:100%; -webkit-appearance:none; height:4px;
  background:var(--border); border-radius:2px;
}
.a11y-range input[type=range]::-webkit-slider-thumb {
  -webkit-appearance:none; width:20px; height:20px; border-radius:50%;
  background:var(--sams-blue); cursor:pointer;
}
.a11y-range__vals { display:flex; justify-content:space-between; font-size:0.6875rem; color:var(--text-3); margin-top:4px; }

/* Overlay */
.overlay {
  position:fixed; inset:0; background:var(--overlay);
  z-index:350; opacity:0; pointer-events:none; transition:opacity var(--ease);
}
.overlay.on { opacity:1; pointer-events:auto; }

/* ==========================================
    ONBOARDING
   ========================================== */
.onboard-overlay {
  position:fixed; inset:0; background:var(--overlay);
  z-index:450; display:none; align-items:center; justify-content:center; padding:16px;
}
.onboard-overlay.on { display:flex; }
.onboard-modal {
  background:var(--bg-card); border-radius:var(--radius);
  max-width:380px; width:100%; overflow:hidden;
  animation: modalUp .45s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalUp { from{opacity:0;transform:translateY(30px) scale(.96)} to{opacity:1;transform:translateY(0) scale(1)} }
.onboard-step { display:none; padding:32px 24px; text-align:center; }
.onboard-step.active { display:block; }
.onboard-step__icon { font-size:48px; margin-bottom:12px; }
.onboard-step__title { font-size:1.125rem; font-weight:700; margin-bottom:6px; }
.onboard-step__text { font-size:0.875rem; color:var(--text-2); line-height:1.6; }
.onboard-footer {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 24px; border-top:1px solid var(--border-light);
}
.onboard-dots { display:flex; gap:6px; }
.onboard-dot { width:8px; height:8px; border-radius:50%; background:var(--border); transition:all var(--ease); }
.onboard-dot.active { background:var(--sams-blue); width:20px; border-radius:4px; }
.btn-primary {
  background:var(--sams-blue); color:#fff; padding:8px 20px;
  border-radius:var(--radius-sm); font-size:0.875rem; font-weight:600;
  transition: background var(--ease);
}
.btn-primary:hover { background:var(--sams-hover); }
.btn-skip { color:var(--text-3); font-size:0.8125rem; padding:8px 12px; }

/* Mobile menu */
.mobile-menu {
  position:fixed; top:0; left:-100%; width:85%; max-width:320px;
  height:100vh; background:var(--bg-card); z-index:400;
  overflow-y:auto; transition:left var(--ease-slow);
}
.mobile-menu.open { left:0; }
.mm-head { background:var(--sams-blue); color:#fff; padding:20px; }
.mm-head strong { display:block; font-size:1rem; }
.mm-head span { font-size:0.75rem; opacity:.8; }
.mm-section { padding:8px 0; border-bottom:1px solid var(--border-light); }
.mm-item {
  display:flex; align-items:center; gap:12px;
  padding:12px 20px; color:var(--text); font-size:0.875rem;
  text-decoration:none; transition: background var(--ease);
  min-height: 44px;
}
.mm-item:hover { background:var(--bg-gray); }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (min-width:640px) {
  .products-grid { grid-template-columns:repeat(3,1fr); }
  .product-card { flex:0 0 200px; }
  .banner-grid { grid-template-columns:1fr 1fr; }
}
@media (min-width:768px) {
  .footer-grid { grid-template-columns:repeat(2,1fr); }
}
@media (min-width:1024px) {
  body { padding-bottom:0; }
  .bottom-nav { display:none; }
  .menu-toggle { display:none; }
  .header-nav { display:flex; }
  .h-action__label { display:block; font-size:0.6875rem; }
  /* Restaurar logo-text en desktop */
  .logo-text { display:block; }
  .products-grid { grid-template-columns:repeat(4,1fr); gap:16px; }
  .products-scroll .product-card { flex:0 0 220px; }
  .footer-grid { grid-template-columns:repeat(4,1fr); }
  .banner-grid { grid-template-columns:2fr 1fr; }
}
@media (min-width:1280px) {
  .products-grid { grid-template-columns:repeat(5,1fr); }
  .products-scroll .product-card { flex:0 0 230px; }
  .cat-discount-scroll .cat-discount-card { flex:0 0 180px; }
}

/* ==========================================
   PROMO CAROUSEL (banner slider with arrows)
   ========================================== */
.promo-carousel {
  position:relative; overflow:hidden;
  border-radius: var(--radius);
}
.promo-carousel__track {
  display:flex;
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}
.promo-carousel__slide {
  min-width:100%; flex-shrink:0;
  background: var(--sams-blue);
  color:#fff;
  padding:28px 24px;
  min-height:140px;
  display:flex; flex-direction:column; justify-content:center;
}
.promo-carousel__arrow {
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border-radius:50%;
  background:rgba(0,0,0,0.3); color:#fff;
  display:flex; align-items:center; justify-content:center;
  z-index:2; cursor:pointer; border:none;
  transition: background var(--ease);
  font-size:18px;
}
.promo-carousel__arrow:hover { background:rgba(0,0,0,0.5); }
.promo-carousel__arrow--prev { left:8px; }
.promo-carousel__arrow--next { right:8px; }
.promo-carousel__dots {
  position:absolute; bottom:10px; left:50%;
  transform:translateX(-50%);
  display:flex; gap:4px; z-index:2;
}
/* Touch target mínimo WCAG 2.5.5 — el dot visible es pequeño pero el área táctil es 44px */
.promo-carousel__dot {
  width:44px; height:44px;
  border-radius:50%;
  background:none; border:none; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  transition: all var(--ease);
}
.promo-carousel__dot::after {
  content:'';
  display:block;
  width:8px; height:8px;
  border-radius:50%;
  background:rgba(255,255,255,0.4);
  transition: all var(--ease);
}
.promo-carousel__dot.active::after {
  background:#fff; width:22px; border-radius:4px;
}

/* ==========================================
   CATEGORY DISCOUNT CARDS (¡Ahorra más!)
   ========================================== */
.cat-discount-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
  gap:16px;
}

.cat-discount-card {
  display:flex; flex-direction:column; align-items:center;
  text-align:center; cursor:pointer;
  transition: transform var(--ease);
  text-decoration:none; color:var(--text);
}
.cat-discount-card:hover { transform:translateY(-4px); text-decoration:none; }

.cat-discount-card__badge {
  background:var(--sams-blue); color:#fff;
  padding:5px 12px; border-radius:var(--radius-full);
  font-size:0.6875rem; font-weight:700; margin-bottom:8px;
  white-space:nowrap;
}
.cat-discount-card__badge strong {
  font-size:1.125rem; font-weight:900;
}

.cat-discount-card__img {
  width:100%; max-width:130px; aspect-ratio:1;
  border-radius:50%; overflow:hidden;
  background:var(--bg-gray);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:8px; font-size:42px;
  border:2px solid var(--border-light);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.cat-discount-card:hover .cat-discount-card__img {
  border-color:var(--sams-blue);
  box-shadow:0 4px 12px var(--shadow-md);
}

.cat-discount-card__label {
  font-size:0.8125rem; font-weight:500; color:var(--text);
}

@media (min-width:640px) {
  .cat-discount-grid { grid-template-columns:repeat(auto-fit, minmax(130px, 1fr)); gap:20px; }
}
@media (min-width:1024px) {
  .cat-discount-grid { grid-template-columns:repeat(7, 1fr); gap:24px; }
  .cat-discount-card__img { max-width:140px; }
}

/* ==========================================
   BANNER GRID MATCHED (carousel + membresía same height)
   ========================================== */
.banner-grid-matched {
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.banner-grid-matched > .promo-carousel {
  border-radius: var(--radius);
  overflow:hidden;
}
.banner-grid-matched > .promo-carousel .promo-carousel__slide {
  /* Slides fill the full height of the carousel */
  display:flex; flex-direction:column; justify-content:center;
}
@media (min-width:1024px) {
  .banner-grid-matched {
    grid-template-columns: 2fr 1fr;
    align-items: stretch; /* both columns same height */
  }
  .banner-grid-matched > .promo-carousel {
    height:100%;
  }
  .banner-grid-matched > .promo-carousel .promo-carousel__track {
    height:100%;
  }
  .banner-grid-matched > .promo-carousel .promo-carousel__slide {
    min-height:100%;
  }
  .banner-grid-matched > .banner-sm {
    height:100%;
    display:flex; flex-direction:column; justify-content:center;
  }
}

/* =============================================
   BÚSQUEDA — LAYOUT CON SIDEBAR DE FILTROS
   ============================================= */

/* Contenedor principal: sidebar izquierdo + grid derecho */
.search-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Área del grid */
.products-area {
  flex: 1;
  min-width: 0;
}

/* =============================================
   SIDEBAR DE FILTROS
   ============================================= */
.filters-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  position: sticky;
  top: 80px;
}

.filters-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.filters-sidebar__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

/* El botón X solo se muestra en móvil */
.filters-sidebar__close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  padding: 4px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

/* ── Grupos de filtro ── */
.filter-group {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}

.filter-group__toggle {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  min-height: 44px;
}

.filter-group__caret {
  transition: transform 0.25s ease;
}

.filter-group__caret.rotated {
  transform: rotate(-90deg);
}

.filter-group__body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.25s ease;
}

/* Checkboxes de filtro */
.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-2);
  cursor: pointer;
  min-height: 44px;
}

.filter-check input[type="checkbox"] {
  accent-color: var(--sams-blue);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Botón limpiar filtros */
.filter-reset-btn {
  width: 100%;
  margin-top: 16px;
  padding: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--sams-blue);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  min-height: 44px;
}

.filter-reset-btn:hover {
  background: var(--bg-gray);
}

/* =============================================
   DUAL RANGE SLIDER — PRECIO
   ============================================= */
.price-range-wrap {
  padding: 4px 0;
}

.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

/* Track contenedor */
.price-slider-track {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 8px 0 20px;
}

/* Barra azul entre los dos pulgares */
.price-slider-fill {
  position: absolute;
  height: 100%;
  background: var(--sams-blue);
  border-radius: 4px;
  pointer-events: none;
  transition: left 0.05s, width 0.05s;
}

/* Los dos inputs range superpuestos */
.price-range-input {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 4px;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
}

/* El thumb (pulgar) */
.price-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sams-blue);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  cursor: pointer;
  pointer-events: all;
  transition: transform 0.15s, box-shadow 0.15s;
}

.price-range-input::-webkit-slider-thumb:hover,
.price-range-input::-webkit-slider-thumb:active {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(0,103,160,.4);
}

.price-range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sams-blue);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  cursor: pointer;
  pointer-events: all;
}

/* Botón Aplicar */
.price-apply-btn {
  width: 100%;
  padding: 8px;
  background: var(--sams-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s, transform 0.1s;
  min-height: 44px;
}

.price-apply-btn:hover   { background: var(--sams-dark); }
.price-apply-btn:active  { transform: scale(0.98); }

/* Transición en las cards al filtrar */
.product-card {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* =============================================
   BOTÓN "FILTROS" VISIBLE SOLO EN MÓVIL
   ============================================= */
.filter-toggle-mobile {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
}

/* =============================================
   RESPONSIVE — MÓVIL
   ============================================= */
@media (max-width: 768px) {
  .filter-toggle-mobile {
    display: flex;
  }

  .search-layout {
    flex-direction: column;
  }

  /* El sidebar se convierte en panel deslizable desde la izquierda */
  .filters-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    z-index: 1100;
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
  }

  .filters-sidebar.mobile-open {
    transform: translateX(0);
  }

  .filters-sidebar__close {
    display: flex;
  }

  .products-area {
    width: 100%;
  }
}