  :root {
    --blue-deep: #0a2540;
    --blue-mid: #15416f;
    --blue-bright: #0a8379; /* acento de acción: teal con contraste AA sobre blanco */
    --teal: #0fa396;
    --teal-light: #e7f6f4;
    --white: #ffffff;
    --gray-50: #f5f8fa;
    --gray-100: #f1f5f9;
    --gray-200: #e3e9ef;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8; /* sólo adorno (iconos, separadores): 2.6:1 sobre blanco, no sirve para texto */
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --red: #ef4444;
    --green: #10b981;
    --yellow: #f59e0b;
    --orange: #f97316;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.04);
    --shadow-md: 0 4px 16px rgba(15,23,42,.07);
    --shadow-lg: 0 10px 32px rgba(15,23,42,.10);
    --shadow-xl: 0 20px 56px rgba(15,23,42,.16);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --radius-pill: 999px;
    --transition: all .22s cubic-bezier(.4,0,.2,1);
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body { font-family: 'Instrument Sans', system-ui, sans-serif; background: var(--gray-50); color: var(--gray-900); overflow-x: hidden; }

  /* ===== TOAST ===== */
  #toast-container { position: fixed; bottom: 90px; right: 24px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
  .toast { background: var(--gray-900); color: #fff; padding: 12px 20px; border-radius: var(--radius-md); font-size: .9rem; font-family: 'Instrument Sans', system-ui, sans-serif; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); transform: translateX(120%); transition: transform .35s cubic-bezier(.4,0,.2,1); pointer-events: all; max-width: 320px; }
  .toast.show { transform: translateX(0); }
  .toast.success { border-left: 4px solid var(--green); }
  .toast.error { border-left: 4px solid var(--red); }
  .toast.info { border-left: 4px solid var(--blue-bright); }

  /* ===== HEADER ===== */
  #top-bar { background: var(--blue-deep); color: #9ec8f5; font-size: .78rem; padding: 6px 0; text-align: center; letter-spacing: .04em; }
  #top-bar a { color: var(--teal); text-decoration: none; font-weight: 600; }

  header { background: var(--white); position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); }
  .header-inner { max-width: 1400px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 20px; height: 70px; }

  .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
  .logo-img { height: 58px; width: auto; max-width: 100%; object-fit: contain; display: block; }
  .logo-iso { height: 46px; width: auto; object-fit: contain; display: block; flex-shrink: 0; }
  .logo-type { height: 40px; width: auto; max-width: 100%; object-fit: contain; display: block; }
  .logo-img-footer { height: 62px; filter: brightness(0) invert(1); }
  .logo-iso-footer { height: 50px; filter: brightness(0) invert(1); }
  .logo-type-footer { height: 44px; filter: brightness(0) invert(1); }
  .logo-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--blue-mid), var(--teal)); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; }
  .logo-text { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--blue-deep); line-height: 1; }
  .logo-sub { font-size: .62rem; font-weight: 500; color: var(--gray-500); letter-spacing: .08em; text-transform: uppercase; }

  #search-bar { flex: 1; display: flex; align-items: center; background: var(--gray-100); border: 2px solid transparent; border-radius: var(--radius-xl); overflow: hidden; transition: var(--transition); max-width: 560px; }
  #search-bar:focus-within { border-color: var(--blue-bright); background: var(--white); box-shadow: 0 0 0 4px rgba(45,125,210,.12); }
  #search-bar input { flex: 1; border: none; background: transparent; padding: 10px 16px; font-size: .95rem; font-family: 'Instrument Sans', system-ui, sans-serif; color: var(--gray-900); outline: none; }
  #search-bar select { border: none; background: transparent; padding: 10px 8px; font-size: .82rem; color: var(--gray-500); outline: none; font-family: 'Instrument Sans', system-ui, sans-serif; cursor: pointer; border-left: 1px solid var(--gray-200); }
  #search-bar button { background: var(--blue-bright); border: none; color: #fff; padding: 10px 18px; cursor: pointer; font-size: 1rem; transition: var(--transition); }
  #search-bar button:hover { background: var(--blue-mid); }

  .header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  #admin-nav-btn, #admin-mob-nav-item, #inventario-nav-item, #inventario-mob-nav-item { display: none; }
  .hdr-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: none; cursor: pointer; color: var(--gray-700); padding: 8px 12px; border-radius: var(--radius-sm); transition: var(--transition); font-size: .7rem; font-family: 'Instrument Sans', system-ui, sans-serif; font-weight: 500; position: relative; }
  .hdr-btn i { font-size: 1.25rem; color: var(--blue-mid); }
  .hdr-btn:hover { background: var(--gray-100); }
  .badge { position: absolute; top: 4px; right: 8px; background: var(--red); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: .65rem; display: flex; align-items: center; justify-content: center; font-weight: 700; line-height: 1; }

  /* ===== NAV ===== */
  nav { background: var(--blue-deep); }
  .nav-inner { max-width: 1400px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .nav-inner::-webkit-scrollbar { display: none; }
  .nav-item { color: #b8d4f0; text-decoration: none; padding: 12px 16px; font-size: .88rem; font-weight: 500; white-space: nowrap; transition: var(--transition); border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 6px; }
  .nav-item:hover, .nav-item.active { color: #fff; border-bottom-color: var(--teal); }
  .nav-item i { font-size: .85rem; opacity: .8; }

  /* ===== MAIN CONTENT ===== */
  main { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

  /* ===== VIEWS ===== */
  .view { display: none; }
  .view.active { display: block; }

  /* ===== HERO ===== */
  .hero-slider { position: relative; border-radius: var(--radius-xl); overflow: hidden; margin: 28px 0 0; background: var(--blue-deep); height: 400px; display: flex; align-items: center; }
  .hero-slide { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; transition: opacity .6s ease; }
  .hero-slide.active { opacity: 1; }
  .hero-slide:nth-child(1) { background: linear-gradient(120deg, #0a2540 50%, #1a4f8a 100%); }
  .hero-slide:nth-child(2) { background: linear-gradient(120deg, #064e3b 50%, #047857 100%); }
  .hero-slide:nth-child(3) { background: linear-gradient(120deg, #1e1b4b 50%, #3730a3 100%); }
  .hero-slide:nth-child(4) { background: linear-gradient(120deg, #451a03 50%, #92400e 100%); }
  .hero-content { padding: 48px 60px; z-index: 2; max-width: 560px; }
  .hero-tag { display: inline-block; background: rgba(0,180,166,.2); color: var(--teal); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 5px 14px; border-radius: 100px; margin-bottom: 16px; border: 1px solid rgba(0,180,166,.3); }
  .hero-title { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 16px; }
  .hero-title span { color: var(--teal); }
  .hero-desc { color: #9ec8f5; font-size: 1rem; line-height: 1.7; margin-bottom: 28px; }
  .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
  .btn-primary { background: var(--teal); color: var(--blue-deep); font-weight: 700; font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: .92rem; padding: 13px 28px; border-radius: var(--radius-xl); border: none; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
  .btn-primary:hover { background: #00cfc0; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,180,166,.4); }
  .btn-outline { background: transparent; color: #fff; font-weight: 600; font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: .92rem; padding: 13px 28px; border-radius: var(--radius-xl); border: 2px solid rgba(255,255,255,.3); cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
  .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
  .hero-visual { position: absolute; right: 60px; top: 50%; transform: translateY(-50%); font-size: 10rem; opacity: .12; color: #fff; }
  .hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
  .hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: var(--transition); border: none; }
  .hero-dot.active { background: var(--teal); width: 24px; border-radius: 4px; }
  .hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: none; color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; z-index: 3; transition: var(--transition); display: flex; align-items: center; justify-content: center; }
  .hero-arrow:hover { background: rgba(255,255,255,.3); }
  .hero-arrow.prev { left: 20px; }
  .hero-arrow.next { right: 20px; }

  /* ===== STATS BAR ===== */
  .stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
  .stat-card { background: var(--white); border-radius: var(--radius-md); padding: 20px 24px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); }
  .stat-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
  .stat-icon.blue { background: #dbeafe; color: var(--blue-mid); }
  .stat-icon.teal { background: var(--teal-light); color: var(--teal); }
  .stat-icon.green { background: #d1fae5; color: var(--green); }
  .stat-icon.orange { background: #ffedd5; color: var(--orange); }
  .stat-num { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--gray-900); }
  .stat-label { font-size: .8rem; color: var(--gray-500); }

  /* ===== SECTION TITLES ===== */
  .section-header { display: flex; align-items: flex-end; justify-content: space-between; margin: 40px 0 20px; }
  .section-title { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--blue-deep); }
  .section-title span { color: var(--teal); }
  .see-all { color: var(--blue-bright); font-size: .88rem; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 4px; transition: var(--transition); cursor: pointer; background: none; border: none; }
  .see-all:hover { color: var(--blue-mid); gap: 8px; }

  /* ===== CATEGORIES ===== */
  .cats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 32px; }
  .cat-card { background: var(--white); border-radius: var(--radius-md); padding: 20px 14px; text-align: center; cursor: pointer; transition: var(--transition); border: 2px solid transparent; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; }
  .cat-card:hover, .cat-card.active { border-color: var(--teal); background: var(--teal-light); transform: translateY(-3px); box-shadow: var(--shadow-md); }
  .cat-icon { font-size: 2rem; margin-bottom: 8px; display: block; }
  .cat-name { font-size: .82rem; font-weight: 600; color: var(--gray-700); }
  .cat-count { font-size: .72rem; color: var(--gray-500); margin-top: 2px; }

  /* ===== PRODUCTS GRID ===== */
  @keyframes catalogo-brillo{0%{background-position:100% 0}100%{background-position:-100% 0}}
.catalogo-esqueleto{height:300px;border-radius:12px;background:linear-gradient(90deg,#eef1f5 25%,#f8f9fb 50%,#eef1f5 75%);background-size:200% 100%;animation:catalogo-brillo 1.4s linear infinite}
@media (prefers-reduced-motion:reduce){.catalogo-esqueleto{animation:none}}
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }

  .product-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); transition: var(--transition); position: relative; display: flex; flex-direction: column; }
  .product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--gray-300); }

  .product-img { width: 100%; height: 200px; background: linear-gradient(135deg, #f0f6ff 0%, #e8f5f5 100%); position: relative; overflow: hidden; }
  .product-img img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .3s ease; padding: 8px; box-sizing: border-box; }
  .product-card:hover .product-img img { transform: scale(1.05); }
  .product-badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 100px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .badge-new { background: var(--blue-bright); color: #fff; }
  .badge-sale { background: var(--red); color: #fff; }
  .badge-best { background: var(--yellow); color: var(--gray-900); }
  .badge-promo { background: var(--orange); color: #fff; }
  .wishlist-btn { position: absolute; top: 10px; right: 10px; background: var(--white); border: 1px solid var(--gray-200); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); color: var(--gray-400); font-size: .9rem; }
  .wishlist-btn:hover, .wishlist-btn.active { color: var(--red); border-color: var(--red); background: #fef2f2; }

  .product-info { padding: 16px; flex: 1; display: flex; flex-direction: column; }
  .product-brand { font-size: .72rem; font-weight: 700; color: var(--blue-bright); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
  .product-name { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: .95rem; font-weight: 600; color: var(--gray-900); margin-bottom: 6px; line-height: 1.35; }
  .product-sku { font-size: .7rem; color: var(--gray-500); margin-bottom: 8px; }
  .stars { color: var(--yellow); font-size: .78rem; display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
  .stars span { color: var(--gray-500); font-size: .72rem; margin-left: 4px; font-family: 'Instrument Sans', system-ui, sans-serif; }
  .product-price { margin-top: auto; }
  .price-old { font-size: .82rem; color: var(--gray-500); text-decoration: line-through; }
  .price-current { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.3rem; font-weight: 800; color: var(--blue-deep); }
  .price-current.sale { color: var(--red); }
  .price-unit { font-size: .72rem; color: var(--gray-500); }
  .stock-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; margin: 8px 0; }
  .stock-badge.in { color: var(--green); }
  .stock-badge.low { color: var(--orange); }
  .stock-badge.out { color: var(--red); }

  .product-actions { display: flex; gap: 8px; margin-top: 12px; }
  .btn-cart { flex: 1; background: var(--blue-bright); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px; font-size: .85rem; font-weight: 600; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 6px; font-family: 'Instrument Sans', system-ui, sans-serif; }
  .btn-cart:hover { background: var(--blue-mid); }
  .btn-cart.out { background: var(--gray-200); color: var(--gray-500); cursor: not-allowed; }
  .btn-view { background: var(--gray-100); color: var(--gray-700); border: none; border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; transition: var(--transition); font-size: .85rem; }
  .btn-view:hover { background: var(--gray-200); }

  /* ===== PROMO BANNER ===== */
  .promo-banner { background: linear-gradient(120deg, var(--blue-deep), var(--blue-mid)); border-radius: var(--radius-xl); padding: 36px 48px; display: flex; align-items: center; justify-content: space-between; margin: 32px 0; color: #fff; overflow: hidden; position: relative; }
  .promo-text h2 { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
  .promo-text p { color: #9ec8f5; font-size: .95rem; }
  .promo-timer { display: flex; gap: 16px; }
  .timer-box { background: rgba(255,255,255,.1); border-radius: var(--radius-md); padding: 12px 16px; text-align: center; min-width: 64px; }
  .timer-num { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.6rem; font-weight: 800; display: block; }
  .timer-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }

  /* ===== MODALS ===== */
  .modal-overlay { position: fixed; inset: 0; background: rgba(10,37,64,.7); backdrop-filter: blur(6px); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
  .modal-overlay.open { opacity: 1; pointer-events: all; }
  .modal { background: var(--white); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); width: 100%; max-height: 90vh; overflow-y: auto; transform: scale(.95) translateY(20px); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
  .modal-overlay.open .modal { transform: scale(1) translateY(0); }
  .modal-sm { max-width: 460px; }
  .modal-md { max-width: 620px; }
  .modal-lg { max-width: 900px; }
  .modal-xl { max-width: 1100px; }
  .modal-header { padding: 24px 28px 16px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--white); z-index: 2; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .modal-title { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--blue-deep); display: flex; align-items: center; gap: 10px; }
  .modal-title i { color: var(--teal); }
  .modal-close { background: var(--gray-100); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--gray-500); font-size: .9rem; transition: var(--transition); }
  .modal-close:hover { background: var(--gray-200); color: var(--gray-900); }
  .modal-body { padding: 24px 28px; }
  .modal-footer { padding: 16px 28px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 12px; justify-content: flex-end; }

  /* ===== FORMS ===== */
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .form-grid.col3 { grid-template-columns: 1fr 1fr 1fr; }
  .form-group { display: flex; flex-direction: column; gap: 6px; }
  .form-group.full { grid-column: 1 / -1; }
  .form-label { font-size: .82rem; font-weight: 600; color: var(--gray-700); display: flex; align-items: center; gap: 6px; }
  .form-label .req { color: var(--red); }
  .form-control { border: 2px solid var(--gray-200); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; font-family: 'Instrument Sans', system-ui, sans-serif; color: var(--gray-900); background: var(--white); transition: var(--transition); outline: none; }
  .form-control:focus { border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(45,125,210,.1); }
  .form-control::placeholder { color: var(--gray-300); }
  select.form-control { cursor: pointer; }
  textarea.form-control { resize: vertical; min-height: 100px; }
  .form-hint { font-size: .75rem; color: var(--gray-500); }
  .form-divider { grid-column: 1 / -1; border: none; border-top: 1px solid var(--gray-200); margin: 4px 0; }

  .btn-full { width: 100%; }
  .btn-lg { padding: 14px 32px; font-size: 1rem; }

  .btn-green { background: var(--green); color: #fff; }
  .btn-green:hover { background: #059669; }
  .btn-red { background: var(--red); color: #fff; }
  .btn-red:hover { background: #dc2626; }
  .btn-ghost { background: var(--gray-100); color: var(--gray-700); font-family: 'Instrument Sans', system-ui, sans-serif; font-weight: 600; font-size: .92rem; padding: 10px 20px; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: var(--transition); }
  .btn-ghost:hover { background: var(--gray-200); }
  .btn-blue { background: var(--blue-bright); color: #fff; font-family: 'Instrument Sans', system-ui, sans-serif; font-weight: 600; font-size: .92rem; padding: 10px 20px; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
  .btn-blue:hover { background: var(--blue-mid); }
  .btn-teal { background: var(--teal); color: var(--blue-deep); font-family: 'Instrument Sans', system-ui, sans-serif; font-weight: 700; font-size: .92rem; padding: 10px 20px; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
  .btn-teal:hover { background: #00cfc0; }

  /* ===== AUTH TABS ===== */
  .auth-tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; }
  .auth-tab { flex: 1; padding: 12px; text-align: center; cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); background: none; border-left: none; border-right: none; border-top: none; font-family: 'Instrument Sans', system-ui, sans-serif; }
  .auth-tab.active { color: var(--blue-bright); border-bottom-color: var(--blue-bright); }

  /* ===== CART ===== */
  .cart-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--gray-200); align-items: center; }
  .cart-img { width: 72px; height: 72px; background: linear-gradient(135deg, #f0f6ff, #e8f5f5); border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; border: 1px solid var(--gray-200); }
  .cart-img img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 4px; box-sizing: border-box; }
  .cart-details { flex: 1; }
  .cart-name { font-weight: 600; font-size: .92rem; color: var(--gray-900); margin-bottom: 4px; }
  .cart-brand { font-size: .75rem; color: var(--gray-500); margin-bottom: 8px; }
  .qty-control { display: flex; align-items: center; gap: 0; }
  .qty-btn { background: var(--gray-100); border: 1px solid var(--gray-200); width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .9rem; transition: var(--transition); }
  .qty-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .qty-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .qty-btn:hover { background: var(--gray-200); }
  .qty-num { border: 1px solid var(--gray-200); border-left: none; border-right: none; width: 40px; height: 28px; text-align: center; font-size: .88rem; font-weight: 600; display: flex; align-items: center; justify-content: center; background: var(--white); }
  .cart-price { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 700; color: var(--blue-deep); font-size: 1.1rem; text-align: right; }
  .cart-remove { color: var(--gray-500); background: none; border: none; cursor: pointer; font-size: .88rem; display: block; margin-top: 4px; transition: var(--transition); }
  .cart-remove:hover { color: var(--red); }
  .cart-total { background: var(--gray-50); border-radius: var(--radius-md); padding: 20px; margin-top: 16px; }
  .cart-total-row { display: flex; justify-content: space-between; font-size: .9rem; padding: 5px 0; color: var(--gray-700); }
  .cart-total-row.big { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.15rem; font-weight: 800; color: var(--gray-900); border-top: 2px solid var(--gray-200); margin-top: 8px; padding-top: 12px; }

  /* ===== PRODUCT DETAIL ===== */
  .pd-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
  .pd-gallery { }
  .pd-main-img { width: 100%; height: 320px; background: linear-gradient(135deg, #f0f6ff, #e8f5f5); border-radius: var(--radius-lg); overflow: hidden; border: 2px solid var(--gray-200); margin-bottom: 12px; }
  .pd-main-img img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 16px; box-sizing: border-box; }
  .pd-thumbs { display: flex; gap: 8px; }
  .pd-thumb { width: 64px; height: 64px; background: linear-gradient(135deg, #f0f6ff, #e8f5f5); border-radius: var(--radius-sm); border: 2px solid var(--gray-200); cursor: pointer; overflow: hidden; transition: var(--transition); }
  .pd-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 4px; box-sizing: border-box; }
  .pd-thumb.active, .pd-thumb:hover { border-color: var(--teal); }
  .pd-info { }
  .pd-brand { font-size: .78rem; font-weight: 700; color: var(--blue-bright); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
  .pd-name { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; line-height: 1.25; }
  .pd-sku { font-size: .75rem; color: var(--gray-500); margin-bottom: 12px; }
  .pd-price { display: flex; align-items: baseline; gap: 12px; margin: 16px 0; }
  .pd-price .current { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 2rem; font-weight: 800; color: var(--blue-deep); }
  .pd-price .old { font-size: 1rem; color: var(--gray-500); text-decoration: line-through; }
  .pd-price .discount { background: var(--red); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
  .pd-desc { color: var(--gray-700); font-size: .92rem; line-height: 1.75; margin: 16px 0; }
  .pd-meta { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--gray-50); border-radius: var(--radius-md); margin: 16px 0; }
  .pd-meta-row { display: flex; gap: 8px; font-size: .85rem; align-items: center; }
  .pd-meta-key { color: var(--gray-500); min-width: 120px; display: flex; align-items: center; gap: 6px; }
  .pd-meta-key i { color: var(--teal); }
  .pd-meta-val { font-weight: 600; color: var(--gray-900); }
  .pd-qty-row { display: flex; align-items: center; gap: 16px; margin: 20px 0; }
  .pd-qty-label { font-size: .88rem; font-weight: 600; color: var(--gray-700); }
  .pd-actions { display: flex; gap: 12px; }
  .pd-actions .btn-cart { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-md); }

  /* ===== ADMIN PANEL ===== */
  .admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 28px 0; min-height: 80vh; }
  .admin-sidebar { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); padding: 16px; height: fit-content; position: sticky; top: 90px; }
  .admin-logo { display: flex; align-items: center; gap: 8px; padding: 12px 0 16px; border-bottom: 1px solid var(--gray-200); margin-bottom: 12px; }
  .admin-logo i { color: var(--teal); font-size: 1.3rem; }
  .admin-logo span { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 700; font-size: .95rem; color: var(--blue-deep); }
  .admin-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--gray-600); font-size: .88rem; font-weight: 500; cursor: pointer; transition: var(--transition); background: none; border: none; width: 100%; text-align: left; font-family: 'Instrument Sans', system-ui, sans-serif; }
  .admin-nav-item i { font-size: 1rem; width: 18px; }
  .admin-nav-item:hover { background: var(--gray-100); color: var(--gray-900); }
  .admin-nav-item.active { background: #dbeafe; color: var(--blue-mid); font-weight: 600; }

  .admin-content { }
  .admin-section { display: none; }
  .admin-section.active { display: block; }

  .admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
  .admin-title { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--blue-deep); }

  .kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
  .kpi-card { background: var(--white); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); }
  .kpi-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .kpi-label { font-size: .8rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .06em; }
  .kpi-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
  .kpi-val { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--gray-900); }
  .kpi-trend { font-size: .78rem; font-weight: 600; display: flex; align-items: center; gap: 4px; margin-top: 4px; }
  .kpi-trend.up { color: var(--green); }
  .kpi-trend.down { color: var(--red); }
  .kpi-trend.flat { color: var(--gray-500); font-weight: 500; }
  /* Cotizaciones */
  .cot-fila { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
  .cot-fila .cot-nombre { flex: 1; min-width: 0; font-size: .86rem; line-height: 1.35; }
  .cot-fila .cot-precio { font-size: .8rem; color: var(--gray-500); white-space: nowrap; }
  .cot-fila input { width: 76px; padding: 6px 8px; text-align: center; }
  /* Recuadros de estado de Configuración (admin). data-state: ok | warn | off | pending */
  .status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
  .status-card { border-radius: var(--radius-md); padding: 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--gray-200); background: var(--gray-100); min-width: 0; }
  .status-card > i { font-size: 1.3rem; color: var(--gray-400); flex-shrink: 0; }
  .status-card > div { min-width: 0; }
  .status-name { font-weight: 700; font-size: .85rem; color: var(--gray-700); }
  .status-text { font-size: .75rem; color: var(--gray-500); overflow-wrap: anywhere; }
  .status-card[data-state="ok"]   { background: #f0fdf4; border-color: #bbf7d0; }
  .status-card[data-state="ok"] > i, .status-card[data-state="ok"] .status-text { color: #15803d; }
  .status-card[data-state="warn"] { background: #fffbeb; border-color: #fde68a; }
  .status-card[data-state="warn"] > i, .status-card[data-state="warn"] .status-text { color: #b45309; }
  .status-card[data-state="off"]  { background: #fee2e2; border-color: #fca5a5; }
  .status-card[data-state="off"] > i, .status-card[data-state="off"] .status-text { color: #b91c1c; }

  .data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); }
  .data-table th { background: var(--gray-50); padding: 12px 16px; text-align: left; font-size: .78rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
  .data-table td { padding: 12px 16px; font-size: .88rem; color: var(--gray-700); border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
  .data-table tr:last-child td { border-bottom: none; }
  .data-table tr:hover td { background: var(--gray-50); }
  .table-actions { display: flex; gap: 6px; }
  .tbl-btn { background: none; border: 1px solid var(--gray-200); border-radius: 6px; padding: 5px 10px; cursor: pointer; font-size: .78rem; transition: var(--transition); color: var(--gray-600); font-family: 'Instrument Sans', system-ui, sans-serif; display: inline-flex; align-items: center; gap: 4px; }
  .tbl-btn:hover { background: var(--gray-100); }
  .tbl-btn.edit:hover { border-color: var(--blue-bright); color: var(--blue-bright); }
  .tbl-btn.del:hover { border-color: var(--red); color: var(--red); }
  .tbl-btn.view-btn:hover { border-color: var(--green); color: var(--green); }

  .pager { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
  .pager-info { font-size: .8rem; color: var(--gray-500); margin-right: auto; }
  .pager-btn { min-width: 34px; height: 34px; padding: 0 9px; border: 1px solid var(--gray-200); background: #fff; border-radius: 7px; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--gray-600); font-family: 'Instrument Sans', system-ui, sans-serif; display: inline-flex; align-items: center; justify-content: center; transition: var(--transition); }
  .pager-btn:hover:not(:disabled) { border-color: var(--blue-bright); color: var(--blue-bright); }
  .pager-btn.active { background: var(--blue-bright); border-color: var(--blue-bright); color: #fff; }
  .pager-btn:disabled { opacity: .45; cursor: not-allowed; }
  .pager-ellipsis { padding: 0 4px; color: var(--gray-400); font-size: .82rem; align-self: center; }
  @media (max-width: 640px) { .pager-info { width: 100%; margin-bottom: 6px; } }

  .chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px; font-size: .72rem; font-weight: 700; }
  .chip-green { background: #d1fae5; color: #065f46; }
  .chip-red { background: #fee2e2; color: #991b1b; }
  .chip-yellow { background: #fef3c7; color: #92400e; }
  .chip-blue { background: #dbeafe; color: #1e40af; }
  .chip-gray { background: var(--gray-100); color: var(--gray-600); }
  .chip-orange { background: #ffedd5; color: #9a3412; }

  /* ===== INVENTORY ===== */
  .inv-meter { height: 8px; background: var(--gray-200); border-radius: 100px; overflow: hidden; margin-top: 4px; }
  .inv-fill { height: 100%; border-radius: 100px; transition: width .4s ease; }
  .inv-fill.high { background: var(--green); }
  .inv-fill.mid { background: var(--yellow); }
  .inv-fill.low { background: var(--red); }

  /* ===== PROFILE / ACCOUNT ===== */
  .profile-header { background: linear-gradient(120deg, var(--blue-deep), var(--blue-mid)); padding: 40px; border-radius: var(--radius-xl); color: #fff; display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
  .profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; border: 3px solid rgba(255,255,255,.4); flex-shrink: 0; }
  .profile-name { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.5rem; font-weight: 800; }
  .profile-email { color: #9ec8f5; font-size: .9rem; margin-top: 4px; }
  .profile-chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
  .profile-chip { background: rgba(255,255,255,.15); color: #fff; font-size: .78rem; padding: 4px 12px; border-radius: 100px; border: 1px solid rgba(255,255,255,.2); }

  .profile-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--gray-100); padding: 4px; border-radius: var(--radius-md); width: fit-content; }
  .profile-tab { padding: 8px 20px; border-radius: var(--radius-sm); cursor: pointer; font-size: .88rem; font-weight: 500; color: var(--gray-600); transition: var(--transition); background: none; border: none; font-family: 'Instrument Sans', system-ui, sans-serif; }
  .profile-tab.active { background: var(--white); color: var(--blue-deep); font-weight: 600; box-shadow: var(--shadow-sm); }

  .orders-list { display: flex; flex-direction: column; gap: 12px; }
  .order-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }
  .order-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .order-id { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 700; font-size: .95rem; }
  .order-date { font-size: .8rem; color: var(--gray-500); }
  .order-items { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
  .order-item-chip { background: var(--gray-100); border-radius: var(--radius-sm); padding: 4px 10px; font-size: .78rem; color: var(--gray-700); display: flex; align-items: center; gap: 6px; }

  /* ===== CHECKOUT ===== */
  .checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; }
  .checkout-section { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--gray-200); margin-bottom: 16px; }
  .checkout-section-header { padding: 16px 24px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; gap: 10px; }
  .checkout-section-header i { color: var(--teal); font-size: 1.1rem; }
  .checkout-section-header span { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 700; font-size: 1rem; color: var(--blue-deep); }
  .checkout-section-body { padding: 24px; }
  .payment-methods { display: flex; flex-direction: column; gap: 12px; }
  .payment-opt { border: 2px solid var(--gray-200); border-radius: var(--radius-md); padding: 16px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 14px; }
  .payment-opt:hover { border-color: var(--blue-bright); }
  .payment-opt.active { border-color: var(--teal); background: var(--teal-light); }
  .payment-opt input[type="radio"] { accent-color: var(--teal); width: 18px; height: 18px; }
  .payment-logo { font-size: 1.4rem; }
  .payment-name { font-weight: 700; font-size: .92rem; color: var(--gray-900); }
  .payment-desc { font-size: .78rem; color: var(--gray-500); }
  .stripe-logo { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1rem; color: #635bff; }
  .stripe-logo i { font-size: 1.3rem; }
  .order-summary { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 100px; height: fit-content; }
  .summary-title { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 700; font-size: 1.05rem; margin-bottom: 16px; color: var(--blue-deep); display: flex; align-items: center; gap: 8px; }
  .coupon-row { display: flex; gap: 8px; margin: 16px 0; }
  .coupon-row .form-control { flex: 1; }

  /* ===== WHATSAPP BTN ===== */
  #wa-btn { position: fixed; bottom: 24px; right: 24px; z-index: 9000; background: #25d366; color: #fff; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 4px 20px rgba(37,211,102,.5); text-decoration: none; transition: var(--transition); cursor: pointer; border: none; }
  #wa-btn:hover { transform: scale(1.12); box-shadow: 0 8px 30px rgba(37,211,102,.6); }
  #wa-btn .wa-badge { position: absolute; top: -2px; right: -2px; background: var(--red); border-radius: 50%; width: 18px; height: 18px; font-size: .6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--white); }

  /* ===== FOOTER ===== */
  footer { background: var(--blue-deep); color: #9ec8f5; margin-top: 64px; }
  .footer-grid { max-width: 1400px; margin: 0 auto; padding: 56px 24px 28px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
  .footer-brand p { font-size: .88rem; line-height: 1.75; margin: 16px 0; max-width: 280px; }
  .footer-social { display: flex; gap: 10px; }
  .social-btn { width: 36px; height: 36px; background: rgba(255,255,255,.1); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; font-size: .9rem; transition: var(--transition); }
  .social-btn:hover { background: var(--teal); }
  .footer-col h4 { color: #fff; font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 700; font-size: .95rem; margin-bottom: 16px; }
  .footer-links { display: flex; flex-direction: column; gap: 8px; }
  .footer-links a { color: #9ec8f5; text-decoration: none; font-size: .85rem; transition: var(--transition); display: flex; align-items: center; gap: 6px; }
  .footer-links a:hover { color: var(--teal); }
  .footer-bottom { max-width: 1400px; margin: 0 auto; padding: 20px 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: space-between; font-size: .8rem; }
  .footer-bottom a { color: var(--teal); text-decoration: none; }

  /* ===== BREADCRUMBS ===== */
  .breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--gray-500); margin: 20px 0 0; padding: 14px 0 0; }
  .breadcrumb a { color: var(--blue-bright); text-decoration: none; }
  .breadcrumb a:hover { text-decoration: underline; }
  .breadcrumb span { color: var(--gray-400); font-size: .7rem; }

  /* ===== ADDRESS CARDS ===== */
  .addr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .addr-card { border: 2px solid var(--gray-200); border-radius: var(--radius-md); padding: 16px; cursor: pointer; transition: var(--transition); position: relative; }
  .addr-card.active { border-color: var(--teal); background: var(--teal-light); }
  .addr-card .addr-type { font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--blue-bright); margin-bottom: 6px; letter-spacing: .06em; }
  .addr-card .addr-name { font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
  .addr-card .addr-text { font-size: .82rem; color: var(--gray-600); line-height: 1.5; }
  .addr-card .addr-default { position: absolute; top: 12px; right: 12px; background: var(--teal); color: var(--blue-deep); font-size: .65rem; font-weight: 700; padding: 2px 8px; border-radius: 100px; }

  /* ===== NOTIFICATION ===== */
  .notif-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gray-100); align-items: flex-start; }
  .notif-item:last-child { border-bottom: none; }
  .notif-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
  .notif-text .notif-title { font-size: .88rem; font-weight: 600; color: var(--gray-900); margin-bottom: 2px; }
  .notif-text .notif-sub { font-size: .78rem; color: var(--gray-500); }
  .notif-time { font-size: .72rem; color: var(--gray-500); flex-shrink: 0; }

  /* ===== COMPARAR ===== */
  .compare-table { width: 100%; }
  .compare-table th, .compare-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--gray-200); font-size: .88rem; }
  .compare-table th { background: var(--gray-50); font-weight: 700; color: var(--gray-600); font-size: .78rem; text-transform: uppercase; }
  .compare-table .attr { color: var(--gray-500); font-style: italic; }

  /* ===== MISC ===== */
  .empty-state { text-align: center; padding: 60px 24px; }
  .empty-state i { font-size: 4rem; color: var(--gray-200); margin-bottom: 16px; display: block; }
  .empty-state h3 { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--gray-500); margin-bottom: 8px; }
  .empty-state p { font-size: .88rem; color: var(--gray-500); }

  .section-card { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 20px; }

  .img-upload-area { border: 2px dashed var(--gray-300); border-radius: var(--radius-md); padding: 32px; text-align: center; cursor: pointer; transition: var(--transition); background: var(--gray-50); }
  .img-upload-area:hover { border-color: var(--blue-bright); background: #f0f7ff; }
  .img-upload-area i { font-size: 2.5rem; color: var(--gray-300); display: block; margin-bottom: 12px; }
  .img-upload-area p { font-size: .88rem; color: var(--gray-500); }

  @keyframes spin { to { transform: rotate(360deg); } }
  .loading i { animation: spin 1s linear infinite; }

  .pagination { display: flex; align-items: center; gap: 6px; justify-content: center; margin: 32px 0; }
  .page-btn { width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); background: var(--white); cursor: pointer; font-size: .85rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); color: var(--gray-700); font-family: 'Instrument Sans', system-ui, sans-serif; }
  .page-btn:hover, .page-btn.active { background: var(--blue-bright); color: #fff; border-color: var(--blue-bright); }

  /* ===== MOBILE HEADER ELEMENTS ===== */
  #mobile-search-bar {
    display: none;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 10px 14px;
    position: sticky;
    top: 64px;
    z-index: 999;
    box-shadow: var(--shadow-sm);
  }
  #mobile-search-bar .msb-inner {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
  }
  #mobile-search-bar .msb-inner:focus-within {
    border-color: var(--blue-bright);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(45,125,210,.12);
  }
  #mobile-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 14px;
    font-size: .95rem;
    font-family: 'Instrument Sans', system-ui, sans-serif;
    color: var(--gray-900);
    outline: none;
  }
  #mobile-search-bar button {
    background: var(--blue-bright);
    border: none;
    color: #fff;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
  }
  #mobile-search-bar button:hover { background: var(--blue-mid); }

  /* Mobile nav drawer */
  #mobile-nav {
    display: none;
    background: var(--blue-deep);
    position: sticky;
    top: 64px;
    z-index: 998;
    padding: 8px 0 12px;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  #mobile-nav.open { display: block; }
  #mobile-nav .mob-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #b8d4f0;
    padding: 12px 20px;
    font-size: .92rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Instrument Sans', system-ui, sans-serif;
    text-decoration: none;
  }
  #mobile-nav .mob-nav-item:hover,
  #mobile-nav .mob-nav-item.active { color: #fff; background: rgba(255,255,255,.06); }
  #mobile-nav .mob-nav-item i { font-size: .95rem; width: 18px; opacity: .8; }

  /* Hamburger button */
  #mob-menu-btn {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-700);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: .7rem;
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-weight: 500;
    flex-shrink: 0;
  }
  #mob-menu-btn i { font-size: 1.25rem; color: var(--blue-mid); }
  #mob-menu-btn:hover { background: var(--gray-100); }

  /* Search toggle button (mobile) */
  #mob-search-btn {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-700);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: .7rem;
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-weight: 500;
    flex-shrink: 0;
  }
  #mob-search-btn i { font-size: 1.25rem; color: var(--blue-mid); }
  #mob-search-btn:hover { background: var(--gray-100); }

  @media (max-width: 1200px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .cats-grid { grid-template-columns: repeat(4, 1fr); }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 900px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid.col3 { grid-template-columns: 1fr; }
    .pd-layout { grid-template-columns: 1fr; }
  }
  /* ===== RANGO TABLET (iPad Air/Pro vertical, Android tablet) ===== */
  @media (min-width: 769px) and (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .cats-grid { grid-template-columns: repeat(4, 1fr); }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    .pd-layout { grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: 2.1rem; }
    .header-inner { gap: 14px; }
    #search-bar { max-width: 100%; }
  }
  @media (max-width: 768px) {
    /* Header: ocultar search bar de escritorio, mostrar botones móviles */
    #search-bar { display: none !important; }
    #mob-search-btn { display: flex; }
    #mob-menu-btn { display: flex; }
    nav { display: none; } /* La nav desktop se oculta; se usa el drawer móvil */

    /* Mostrar barra de búsqueda móvil cuando esté activa */
    #mobile-search-bar { display: none; }
    #mobile-search-bar.open { display: block; }

    /* Header actions: ocultar etiquetas de texto y botones no esenciales */
    .hdr-btn span:not(.badge) { display: none; }
    #mob-search-btn span, #mob-menu-btn span { display: none; }
    #admin-nav-btn { display: none; }
    /* Ocultar notif y wishlist en móvil — están en el menú drawer */
    #notif-btn-hdr { display: none; }
    #wishlist-btn-hdr { display: none; }
    .header-inner { padding: 0 14px; gap: 6px; height: 64px; justify-content: space-between; }
    .logo { flex: 1; justify-content: center; }
    .logo-img { height: 44px; }
    .logo-iso { height: 40px; }
    .logo-type { height: 34px; }
    .hdr-btn { padding: 8px 10px; }
    #mob-search-btn { padding: 8px 10px; }
    #mob-menu-btn { padding: 8px 10px; }

    /* Hero */
    .hero-slider { height: auto; min-height: 260px; border-radius: var(--radius-lg); margin: 16px 0 0; }
    .hero-content { padding: 28px 24px; max-width: 100%; }
    .hero-title { font-size: 1.5rem; }
    .hero-desc { font-size: .88rem; margin-bottom: 20px; }
    .hero-visual { display: none; }
    .hero-cta { gap: 8px; }
    .btn-primary, .btn-outline { padding: 11px 20px; font-size: .85rem; }

    /* Stats */
    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
    .stat-card { padding: 14px 16px; gap: 12px; }
    .stat-num { font-size: 1.3rem; }

    /* Categorías */
    .cats-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .cat-card { padding: 14px 10px; }
    .cat-icon { font-size: 1.6rem; margin-bottom: 6px; }
    .cat-name { font-size: .78rem; }
    .cat-count { font-size: .68rem; }

    /* Productos */
    .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product-img { height: 160px; }
    .product-info { padding: 12px; }
    .product-name { font-size: .88rem; }
    .price-current { font-size: 1.1rem; }
    .product-actions { gap: 6px; }
    .btn-cart { padding: 9px 8px; font-size: .8rem; }

    /* Promo banner */
    .promo-banner { flex-direction: column; align-items: flex-start; padding: 24px 20px; gap: 20px; }
    .promo-banner::after { display: none; }
    .promo-text h2 { font-size: 1.3rem; }
    .promo-text p { font-size: .85rem; }
    .promo-timer { gap: 10px; flex-wrap: wrap; }
    .timer-box { padding: 10px 12px; min-width: 56px; }
    .timer-num { font-size: 1.3rem; }

    /* Sección main */
    main { padding: 0 12px; }
    .section-header { margin: 28px 0 14px; }
    .section-title { font-size: 1.2rem; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 36px 16px 20px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

    /* Profile */
    .profile-header { flex-direction: column; align-items: center; text-align: center; padding: 28px 20px; }
    .profile-chips { justify-content: center; }
    .profile-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .profile-tabs::-webkit-scrollbar { display: none; }
    .profile-tab { flex: 0 0 auto; padding: 8px 14px; font-size: .82rem; white-space: nowrap; }

    /* Product detail */
    .pd-layout { grid-template-columns: 1fr; }
    .pd-main-img { height: 240px; }
    .pd-name { font-size: 1.2rem; }
    .pd-price .current { font-size: 1.6rem; }
    .pd-actions { flex-direction: column; }
    .pd-actions .btn-cart { width: 100%; justify-content: center; }

    /* Checkout */
    .checkout-layout { grid-template-columns: 1fr; }
    .order-summary { position: static; }

    /* Cart items */
    .cart-item { gap: 12px; }
    .cart-img { width: 60px; height: 60px; }

    /* Modales */
    .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-sm, .modal-md, .modal-lg, .modal-xl { max-width: 100%; }
    .modal-body { padding: 16px 20px; }
    .modal-footer { padding: 12px 20px 20px; }

    /* Admin */
    .admin-layout { grid-template-columns: 1fr; gap: 16px; padding: 16px 0; }
    .admin-sidebar { position: static; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-title { font-size: 1.1rem; }

    /* Tablas con scroll horizontal */
    .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Orden cards */
    .order-header { flex-direction: column; align-items: flex-start; gap: 6px; }

    /* Toast en móvil */
    #toast-container { bottom: 70px; right: 12px; left: 12px; }
    .toast { max-width: 100%; }

    /* Top bar */
    #top-bar { font-size: .7rem; padding: 5px 8px; }

    /* Áreas táctiles mínimas (touch targets) */
    .qty-btn { width: 36px; height: 36px; }
    .qty-num { width: 44px; height: 36px; }
    .wishlist-btn { width: 38px; height: 38px; font-size: 1rem; }
    .modal-close { width: 38px; height: 38px; }

    /* Tabla Comparar: scroll horizontal en vez de aplastarse */
    .compare-table { min-width: 460px; }
  }

  @media (max-width: 480px) {
    .header-inner { gap: 6px; }
    .hdr-btn { padding: 8px 8px; }
    .logo-img { height: 42px; }
    .logo-iso { height: 36px; }
    .logo-type { height: 30px; }

    .cats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

    .stats-bar { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 12px; }

    .hero-slider { min-height: 240px; }
    .hero-title { font-size: 1.35rem; }
    .hero-content { padding: 22px 18px; }

    .footer-grid { grid-template-columns: 1fr; gap: 20px; }

    .kpi-grid { grid-template-columns: 1fr; }
    .addr-grid { grid-template-columns: 1fr; }

    .profile-name { font-size: 1.2rem; }

    .section-title { font-size: 1.1rem; }
    .promo-text h2 { font-size: 1.15rem; }
  }

  @media (max-width: 360px) {
    .header-inner { padding: 0 10px; gap: 4px; }
    .logo-img { height: 38px; }
    .logo-iso { height: 32px; }
    .logo-type { height: 26px; }
    .hdr-btn { padding: 6px 6px; }

    .cats-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 1.2rem; }
    .hero-content { padding: 18px 14px; }
    .btn-primary, .btn-outline { padding: 10px 14px; font-size: .8rem; }

    .products-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .product-img { height: 140px; }
    .product-name { font-size: .82rem; }
    .price-current { font-size: 1rem; }

    /* Stat cards: evitar desbordamiento horizontal en pantallas mínimas */
    .stats-bar { gap: 8px; }
    .stat-card { gap: 8px; padding: 10px; }
    .stat-card > div { min-width: 0; }
    .stat-icon { width: 36px; height: 36px; font-size: 1.1rem; }
    .stat-num { font-size: 1.05rem; }
    .stat-label { font-size: .68rem; }
  }

  /* ===== TÁCTIL: evita el "hover pegado" tras tocar en móvil/tablet ===== */
  @media (hover: none) {
    .product-card:hover { transform: none; }
    .cat-card:hover { transform: none; }
    .btn-primary:hover { transform: none; box-shadow: none; }
    #wa-btn:hover { transform: none; }
  }

  /* =====================================================================
     REDISEÑO VISUAL 2026-10 — solo presentación (sin cambios de lógica)
     Capa final: afina tokens/componentes de arriba. Referencia: header
     blanco limpio, nav de texto con subrayado teal, hero navy, franja de
     confianza, tarjetas de categoría con icono lineal.
     ===================================================================== */
  :root {
    --teal-bright: #5fd6cb;      /* acento legible sobre navy */
    --teal-strong: #0a8379;      /* botones/enlaces: AA con texto blanco */
    --teal-strong-hover: #086c64;
    --container-pad: max(24px, calc((100vw - 1400px) / 2 + 24px));
    --hero-img: url('/assets/hero-consultorio.webp');
  }
  body { font-family: 'Instrument Sans', system-ui, sans-serif; background: #fff; color: var(--gray-900); -webkit-font-smoothing: antialiased; }
  h1, h2, h3, h4 { letter-spacing: -.01em; }
  :focus-visible { outline: 3px solid rgba(15,163,150,.55); outline-offset: 2px; }
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  }

  /* ---------- Botones unificados ---------- */
  .btn-primary, .btn-outline, .btn-blue, .btn-teal, .btn-ghost, .btn-green, .btn-red {
    border-radius: var(--radius-pill); font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 600; font-size: .9rem;
    padding: 12px 26px; min-height: 44px; justify-content: center; letter-spacing: .005em;
  }
  .btn-primary, .btn-blue, .btn-teal { background: var(--teal-strong); color: #fff; border: 2px solid transparent; }
  .btn-primary:hover, .btn-blue:hover, .btn-teal:hover { background: var(--teal-strong-hover); transform: none; box-shadow: 0 6px 18px rgba(10,131,121,.28); }
  .btn-primary:active, .btn-blue:active, .btn-teal:active { transform: translateY(1px); box-shadow: none; }
  .btn-primary.btn-green, .btn-green { background: var(--green); color: #fff; } .btn-primary.btn-green:hover, .btn-green:hover { background: #059669; box-shadow: none; }
  .btn-primary.btn-red, .btn-red { background: var(--red); color: #fff; } .btn-primary.btn-red:hover, .btn-red:hover { background: #dc2626; box-shadow: none; }
  .btn-ghost { background: var(--gray-100); color: var(--gray-700); }
  .btn-ghost:hover { background: var(--gray-200); }
  .btn-outline { border: 1.5px solid rgba(255,255,255,.55); color: #fff; background: transparent; }
  .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.12); }
  button:disabled, .btn-primary:disabled, .btn-blue:disabled, .btn-teal:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

  /* ---------- Formularios ---------- */
  .form-control { border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); padding: 11px 14px; background: #fff; }
  .form-control:hover { border-color: var(--gray-300); }
  .form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15,163,150,.14); }
  .form-control::placeholder { color: #8a97a8; }
  .form-label { color: var(--gray-900); }

  /* ---------- Top bar ---------- */
  #top-bar { background: var(--blue-deep); color: #cfe0ee; font-size: .78rem; padding: 7px 16px; letter-spacing: .02em; }
  #top-bar strong { color: #fff; }
  #top-bar a { color: var(--teal-bright); }
  #top-bar a:hover { text-decoration: underline; }

  /* ---------- Header ---------- */
  header { border-bottom: 1px solid var(--gray-200); box-shadow: none; }
  .header-inner { gap: 28px; }
  #search-bar { background: #fff; border: 1.5px solid var(--gray-300); border-radius: var(--radius-pill); padding: 4px 4px 4px 8px; max-width: 540px; overflow: visible; }
  #search-bar:hover { border-color: #b4c0cf; }
  #search-bar:focus-within { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(15,163,150,.14); }
  #search-bar input { padding: 10px 14px; font-size: .94rem; min-width: 0; }
  #search-bar input::placeholder { color: #8a97a8; }
  #search-bar select { max-width: 118px; text-overflow: ellipsis; padding: 8px 6px 8px 10px; margin: 4px 0; color: var(--gray-700); background: transparent; }
  #search-bar button { background: var(--teal-strong); width: 44px; height: 40px; padding: 0; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: 6px; }
  #search-bar button:hover { background: var(--teal-strong-hover); }
  .header-actions { gap: 2px; margin-left: auto; }
  .hdr-btn { color: var(--gray-900); font-size: .76rem; font-weight: 500; padding: 8px 12px; gap: 4px; border-radius: var(--radius-md); min-width: 56px; }
  .hdr-btn i { font-size: 1.35rem; color: var(--blue-deep); transition: color .2s; }
  .hdr-btn:hover { background: var(--teal-light); }
  .hdr-btn:hover i { color: var(--teal-strong); }
  .badge { background: var(--teal-strong); top: 2px; right: 10px; width: 18px; height: 18px; font-size: .64rem; box-shadow: 0 0 0 2px #fff; }

  /* ---------- Navegación ---------- */
  nav { background: #fff; border-bottom: 1px solid var(--gray-200); box-shadow: 0 3px 10px rgba(15,23,42,.04); }
  .nav-inner { gap: 6px; }
  .nav-item { color: var(--gray-900); font-size: .92rem; font-weight: 500; padding: 15px 16px 12px; border-bottom: 3px solid transparent; cursor: pointer; }
  .nav-item i { display: none; }
  .nav-item:hover { color: var(--teal-strong); border-bottom-color: rgba(15,163,150,.35); }
  .nav-item.active { color: var(--teal-strong); border-bottom-color: var(--teal); font-weight: 600; }
  .nav-item.nav-compare { margin: 7px 0 7px 6px; padding: 8px 8px 8px 16px; background: var(--teal-light); border-radius: var(--radius-pill); border-bottom: 0; color: var(--gray-900); font-weight: 600; gap: 8px; }
  .nav-item.nav-compare i { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal-strong); color: #fff; font-size: .62rem; opacity: 1; }
  .nav-item.nav-compare:hover, .nav-item.nav-compare.active { background: #d3eeea; color: var(--gray-900); border-bottom: 0; }

  /* ---------- Vista Home: hero a sangre ---------- */
  #view-home > .breadcrumb { display: none; }
  .hero-slider { width: 100vw; margin: 0 0 0 calc(50% - 50vw); border-radius: 0; height: clamp(340px, 31vw, 420px); background: var(--hero-img) right center / cover no-repeat, var(--blue-deep); }
  .hero-slider .hero-slide { background: none !important; }
  .hero-slider .hero-slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--blue-deep) 0%, var(--blue-deep) 34%, rgba(10,37,64,.78) 52%, rgba(10,37,64,0) 86%); z-index: 1; pointer-events: none; }
  .hero-content { position: relative; z-index: 2; padding: 48px 24px 48px var(--container-pad); max-width: calc(620px + var(--container-pad)); }
  .hero-visual { display: none; }
  .hero-tag { background: rgba(255,255,255,.1) !important; color: #c8ece8 !important; border: 1px solid rgba(255,255,255,.2) !important; font-size: .72rem; letter-spacing: .08em; }
  .hero-title { font-size: clamp(1.7rem, 3.3vw, 2.7rem); font-weight: 800; line-height: 1.12; letter-spacing: -.015em; }
  .hero-title span { color: #fff !important; font-weight: 500; }
  .hero-desc { color: #d6e4f0; font-size: 1rem; line-height: 1.6; max-width: 480px; }
  .hero-slide .btn-primary { background: var(--teal-strong) !important; color: #fff !important; }
  .hero-slide .btn-primary:hover { background: var(--teal-strong-hover) !important; }
  .hero-arrow { background: rgba(255,255,255,.14); width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.18); }
  .hero-arrow:hover { background: rgba(255,255,255,.28); }
  .hero-arrow.prev { left: max(12px, calc(var(--container-pad) - 60px)); }
  .hero-arrow.next { right: max(12px, calc(var(--container-pad) - 60px)); }
  .hero-dots { z-index: 4; }
  .hero-dot { width: 9px; height: 9px; background: rgba(255,255,255,.45); }
  .hero-dot.active { background: var(--teal-bright); width: 26px; }

  /* ---------- Franja de confianza ---------- */
  .stats-bar { width: 100vw; margin: 0 0 0 calc(50% - 50vw); padding: 22px var(--container-pad); background: var(--gray-50); border-bottom: 1px solid var(--gray-200); gap: 24px; }
  .stat-card { background: none; border: 0; box-shadow: none; padding: 0; gap: 14px; }
  .stat-icon, .stat-icon.blue, .stat-icon.teal, .stat-icon.green, .stat-icon.orange { background: none; color: var(--blue-deep); width: 40px; height: 40px; font-size: 1.65rem; }
  .stat-num { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: 1rem; font-weight: 700; color: var(--gray-900); line-height: 1.25; }
  .stat-label { font-size: .82rem; color: var(--gray-700); line-height: 1.35; margin-top: 2px; }

  /* ---------- Secciones ---------- */
  .section-header { margin: 52px 0 22px; }
  .section-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); letter-spacing: -.015em; }
  .section-title span { color: inherit; }
  .see-all { color: var(--teal-strong); font-weight: 600; }
  .see-all:hover { color: var(--teal-strong-hover); }

  /* ---------- Categorías ---------- */
  .cats-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 8px; }
  .cat-card { display: grid; grid-template-columns: 56px 1fr; grid-template-areas: "i n" "i c"; column-gap: 14px; align-items: center; text-align: left; padding: 18px 20px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
  .cat-card:hover, .cat-card.active { background: #fff; border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .cat-icon { grid-area: i; width: 56px; margin: 0; font-size: 1.85rem; text-align: center; color: var(--blue-deep); transition: color .2s; }
  .cat-card:hover .cat-icon, .cat-card.active .cat-icon { color: var(--teal-strong); }
  .cat-name { grid-area: n; align-self: end; font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-size: .98rem; font-weight: 700; color: var(--gray-900); }
  .cat-count { grid-area: c; align-self: start; margin-top: 2px; font-size: .82rem; color: var(--gray-700); }

  /* ---------- Producto ---------- */
  .products-grid { gap: 24px; }
  .product-card { border-radius: var(--radius-md); }
  .product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gray-300); }
  .product-img { background: var(--gray-50); height: 210px; }
  .product-brand { color: var(--teal-strong); letter-spacing: .08em; }
  .product-name { font-weight: 600; }
  .price-current { color: var(--blue-deep); }
  .price-current.sale { color: #c62828; }
  .btn-cart { background: var(--teal-strong); border-radius: var(--radius-pill); font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 600; min-height: 42px; }
  .btn-cart:hover { background: var(--teal-strong-hover); }
  .btn-cart.out { background: var(--gray-200); color: var(--gray-700); }
  .btn-view { border-radius: var(--radius-pill); min-width: 42px; background: var(--gray-100); }
  .wishlist-btn { box-shadow: var(--shadow-sm); }
  .badge-new { background: var(--teal-strong); }
  .badge-best { background: #fde68a; color: #7c4a03; }
  .cart-img, .pd-main-img, .pd-thumb { background: var(--gray-50); }

  /* ---------- Banner, perfil, modales ---------- */
  .promo-banner { background: var(--blue-deep); border-radius: var(--radius-lg); }
  .promo-banner::after { content: none; }
  .profile-header { background: var(--blue-deep); border-radius: var(--radius-lg); }
  .modal-overlay { background: rgba(10,37,64,.58); backdrop-filter: blur(4px); }
  .modal { border-radius: var(--radius-xl); }
  .modal-title i { color: var(--teal-strong); }
  .modal-close:hover { background: var(--gray-200); }
  .toast { border-radius: var(--radius-md); }
  .empty-state i { color: var(--gray-300); }

  /* ---------- Footer ---------- */
  footer { margin-top: 80px; }
  .footer-col h4 { font-size: .92rem; letter-spacing: .01em; }
  .footer-links a { color: #b9cde0; }
  .footer-links a:hover { color: var(--teal-bright); }
  .footer-bottom a { color: var(--teal-bright); }
  .footer-bottom { color: #b9cde0; }

  .coupon-row .form-control { min-width: 0; }
  .coupon-row .btn-primary, .coupon-row .btn-blue, .coupon-row .btn-teal { padding-inline: 20px; flex-shrink: 0; }

  /* ---------- Responsive (capa nueva, después de las reglas anteriores) ---------- */
  @media (min-width: 769px) {
    .header-inner { height: 78px; }
  }
  @media (max-width: 1100px) {
    .hero-arrow { top: auto; bottom: 14px; transform: none; width: 36px; height: 36px; font-size: .9rem; }
    .hero-arrow.prev { left: auto; right: 62px; }
    .hero-arrow.next { right: 16px; }
    .cats-grid { gap: 16px; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 18px 24px; }
  }
  @media (min-width: 901px) and (max-width: 1100px) {
    .header-inner { gap: 16px; padding: 0 20px; }
    .hdr-btn { min-width: 52px; padding: 8px 9px; }
    .nav-inner { padding: 0 20px; gap: 2px; }
    .nav-item { padding: 15px 9px 12px; font-size: .86rem; }
    .profile-tab { white-space: nowrap; padding: 8px 14px; }
  }
  @media (min-width: 769px) and (max-width: 900px) {
    .header-inner { gap: 12px; padding: 0 16px; }
    .hdr-btn { min-width: 48px; padding: 8px 7px; }
    .nav-inner { padding: 0 6px; gap: 0; }
    .nav-item { padding: 15px 5px 12px; font-size: .78rem; letter-spacing: 0; }
    .nav-item.nav-compare { padding: 7px 11px; margin-left: 4px; }
    .nav-item.nav-compare i { display: none; }
    .profile-tab { white-space: nowrap; padding: 8px 12px; }
  }
  @media (max-width: 900px) {
    #search-bar select { display: none; }
    .checkout-layout, .pd-layout, .form-grid, .form-grid.col3 { grid-template-columns: minmax(0, 1fr); }
    .checkout-layout > *, .pd-layout > * { min-width: 0; }
    /* (nav-item en 769–900 px: ver bloque de tableta más arriba) */
  }
  @media (max-width: 768px) {
    .header-inner { height: 64px; }
    .hero-slider { height: auto; min-height: 380px; background-position: 70% center; }
    .hero-slider .hero-slide { align-items: flex-start; }
    .hero-slider .hero-slide::before { background: linear-gradient(180deg, rgba(10,37,64,.9) 0%, rgba(10,37,64,.88) 100%); }
    .hero-content { padding: 36px 20px 84px; max-width: 100%; }
    .hero-title { font-size: 1.55rem; }
    .hero-desc { font-size: .92rem; margin-bottom: 20px; }
    .stats-bar { padding: 18px 16px; gap: 16px 14px; margin-bottom: 0; }
    .stat-card { gap: 10px; align-items: flex-start; }
    .stat-icon, .stat-icon.blue, .stat-icon.teal, .stat-icon.green, .stat-icon.orange { width: 30px; height: 30px; font-size: 1.3rem; }
    .stat-num { font-size: .9rem; }
    .stat-label { font-size: .76rem; }
    .section-header { margin: 36px 0 16px; }
    .section-title { font-size: 1.25rem; }
    .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cat-card { grid-template-columns: 40px 1fr; column-gap: 10px; padding: 14px 12px; }
    .cat-icon { width: 40px; font-size: 1.45rem; margin-bottom: 0; }
    .cat-name { font-size: .88rem; }
    .cat-count { font-size: .74rem; }
    #mobile-nav { background: #fff; border-top: 1px solid var(--gray-200); box-shadow: 0 12px 24px rgba(15,23,42,.12); padding: 6px 0 10px; max-height: calc(100vh - 64px); overflow-y: auto; }
    #mobile-nav .mob-nav-item { color: var(--gray-900); min-height: 48px; padding: 12px 20px; font-size: .95rem; }
    #mobile-nav .mob-nav-item i { color: var(--teal-strong); opacity: 1; }
    #mobile-nav .mob-nav-item:hover, #mobile-nav .mob-nav-item.active { background: var(--teal-light); color: var(--gray-900); }
    #admin-mob-nav-item { border-top-color: var(--gray-200) !important; }
    #mobile-search-bar { border-top: 0; }
    #mobile-search-bar .msb-inner { background: #fff; border: 1.5px solid var(--gray-300); padding: 3px 3px 3px 6px; }
    #mobile-search-bar .msb-inner:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15,163,150,.14); }
    #mobile-search-bar button { background: var(--teal-strong); border-radius: var(--radius-pill); width: 42px; height: 38px; padding: 0; }
    #mobile-search-bar button:hover { background: var(--teal-strong-hover); }
    #mob-menu-btn i, #mob-search-btn i { color: var(--blue-deep); }
    .hdr-btn i { font-size: 1.25rem; }
    .badge { right: 4px; }
    footer { margin-top: 56px; }
  }
  @media (max-width: 420px) {
    .stats-bar { grid-template-columns: 1fr; }
    .hero-slider { min-height: 380px; }
  }

  /* =====================================================================
     CAPA 2 — botones con forma propia + imágenes (kie.ai, assets/img/)
     ===================================================================== */
  :root {
    --btn-shape: 18px 4px 18px 4px;        /* grande arriba-izq y abajo-der */
    --btn-shape-hover: 4px 18px 4px 18px;  /* al pasar el cursor se invierte */
    --btn-shape-sm: 12px 3px 12px 3px;
    --btn-shape-sm-hover: 3px 12px 3px 12px;
  }

  /* Botones de texto */
  .btn-primary, .btn-outline, .btn-blue, .btn-teal, .btn-ghost, .btn-green, .btn-red, .btn-cart,
  .auth-tab, .btn-view, .tbl-btn {
    border-radius: var(--btn-shape); transition: var(--transition), border-radius .28s cubic-bezier(.4,0,.2,1);
  }
  .btn-primary:hover, .btn-outline:hover, .btn-blue:hover, .btn-teal:hover, .btn-ghost:hover,
  .btn-green:hover, .btn-red:hover, .btn-cart:not(.out):hover { border-radius: var(--btn-shape-hover); }
  .btn-view, .tbl-btn { border-radius: var(--btn-shape-sm); }
  .btn-view:hover, .tbl-btn:hover { border-radius: var(--btn-shape-sm-hover); }
  .btn-cart.out:hover { border-radius: var(--btn-shape); }
  .auth-tab { border-radius: 0; }

  /* Controles pequeños / de icono */
  .wishlist-btn, .modal-close, .hero-arrow, .qty-btn, .pager-btn, .page-btn, .social-btn, .cart-remove-x,
  #mob-menu-btn, #mob-search-btn, .hdr-btn { border-radius: var(--btn-shape-sm); }
  .wishlist-btn, .modal-close, .hero-arrow, .social-btn { transition: var(--transition), border-radius .28s cubic-bezier(.4,0,.2,1); }
  .wishlist-btn:hover, .modal-close:hover, .hero-arrow:hover, .social-btn:hover, .hdr-btn:hover { border-radius: var(--btn-shape-sm-hover); }
  .qty-btn:first-child, .qty-btn:last-child { border-radius: var(--btn-shape-sm); }
  .profile-tab, .admin-nav-item, .payment-opt, .addr-card { border-radius: var(--radius-sm); }
  .profile-tab.active { border-radius: var(--btn-shape-sm); }
  .nav-item.nav-compare { border-radius: var(--btn-shape); transition: var(--transition), border-radius .28s cubic-bezier(.4,0,.2,1); }
  .nav-item.nav-compare:hover { border-radius: var(--btn-shape-hover); }
  .nav-item.nav-compare i { border-radius: 8px 2px 8px 2px; }
  #wa-btn { border-radius: 22px 6px 22px 6px; }
  #wa-btn:hover { border-radius: 6px 22px 6px 22px; transform: none; }
  .chip, .stock-badge, .product-badge, .hero-tag, .profile-chip { border-radius: 10px 3px 10px 3px; }

  /* Buscador: misma gramática */
  #search-bar, #mobile-search-bar .msb-inner { border-radius: 20px 6px 20px 6px; }
  #search-bar:focus-within, #mobile-search-bar .msb-inner:focus-within { border-radius: 6px 20px 6px 20px; }
  #search-bar, #mobile-search-bar .msb-inner { transition: var(--transition), border-radius .28s cubic-bezier(.4,0,.2,1); }
  #search-bar button, #mobile-search-bar button { border-radius: 14px 4px 14px 4px; }
  .form-control { border-radius: 12px 4px 12px 4px; }
  textarea.form-control { border-radius: 12px 4px 12px 4px; }

  /* Botones de la barra de tienda sin tamaño de píldora residual */
  .hero-dot, .hero-dot.active { border-radius: 4px; }
  .hero-arrow { background: rgba(10,37,64,.6); border-color: rgba(255,255,255,.35); backdrop-filter: blur(4px); }
  .hero-arrow:hover { background: rgba(10,37,64,.85); }

  /* ---------- Hero: una imagen distinta por slide ---------- */
  .hero-slider .hero-slide { background-repeat: no-repeat !important; background-position: right center !important; background-size: cover !important; }
  .hero-slider .hero-slide:nth-child(1) { background-image: url('/assets/hero-consultorio.webp') !important; background-position: right 80% !important; }
  .hero-slider .hero-slide:nth-child(2) { background-image: url('/assets/img/slide-envios.webp') !important; }
  .hero-slider .hero-slide:nth-child(3) { background-image: url('/assets/img/slide-pagos.webp') !important; }

  /* ---------- Categorías con imagen ---------- */
  .cat-card { position: relative; overflow: hidden; isolation: isolate; min-height: 92px; background-color: #fff;
    background-repeat: no-repeat; background-position: right center; background-size: 46% auto; }
  .cat-card::before { content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, #fff 0%, #fff 48%, rgba(255,255,255,.55) 68%, rgba(255,255,255,.12) 100%); }
  .cat-card[data-cat="Diagnóstico"] { background-image: url('/assets/img/cat-diagnostico.webp'); }
  .cat-card[data-cat="Ortopedia"] { background-image: url('/assets/img/cat-ortopedia.webp'); }
  .cat-card[data-cat="Dental"] { background-image: url('/assets/img/cat-dental.webp'); }
  .cat-card[data-cat="Laboratorio"] { background-image: url('/assets/img/cat-laboratorio.webp'); }
  .cat-card[data-cat="Ortodoncia"] { background-image: url('/assets/img/cat-ortodoncia.webp'); }
  .cat-card[data-cat="Endodoncia"] { background-image: url('/assets/img/cat-endodoncia.webp'); }
  .cat-card { transition: var(--transition), background-size .5s ease; }
  .cat-card:hover { background-size: 52% auto; }

  /* ---------- Banner «Cotiza» ---------- */
  .promo-banner { background: linear-gradient(90deg, rgba(10,37,64,.96) 0%, rgba(10,37,64,.9) 42%, rgba(10,37,64,.25) 100%), url('/assets/img/banner-cotiza.webp') right center / cover no-repeat, var(--blue-deep); min-height: 220px; }
  .promo-text { max-width: 560px; position: relative; z-index: 1; }
  .promo-text .btn-outline { margin-top: 20px; }

  /* ---------- Cabecera del catálogo ---------- */
  #view-catalog > .section-header { margin: 0 0 28px; padding: 40px 36px; border-radius: var(--radius-lg); color: #fff;
    background: linear-gradient(90deg, rgba(10,37,64,.96) 0%, rgba(10,37,64,.86) 45%, rgba(10,37,64,.15) 100%), url('/assets/img/catalogo-cabecera.webp') center / cover no-repeat, var(--blue-deep);
    align-items: center; gap: 16px; flex-wrap: wrap; }
  #view-catalog > .section-header .section-title { color: #fff; font-size: 1.7rem; }
  #view-catalog > .section-header .section-title span { color: var(--teal-bright); }
  #view-catalog > .section-header #product-count { color: #d6e4f0 !important; }
  #view-catalog > .section-header .form-control { background: rgba(255,255,255,.96); color: var(--gray-900); }

  /* ---------- Footer con imagen ---------- */
  footer { background: linear-gradient(180deg, rgba(10,37,64,.93), rgba(10,37,64,.97)), url('/assets/img/footer.webp') center / cover no-repeat, var(--blue-deep); }

  @media (max-width: 1100px) {
    .cat-card, .cat-card:hover { background-size: 34% auto; }
    .cat-card::before { background: linear-gradient(90deg, #fff 0%, #fff 66%, rgba(255,255,255,.7) 80%, rgba(255,255,255,.2) 100%); }
  }
  @media (max-width: 768px) {
    .cat-card, .cat-card:hover { background-size: 36% auto; min-height: 76px; }
    #view-catalog > .section-header { padding: 26px 20px; }
    #view-catalog > .section-header .section-title { font-size: 1.3rem; }
    .promo-banner { background: linear-gradient(180deg, rgba(10,37,64,.93), rgba(10,37,64,.88)), url('/assets/img/banner-cotiza.webp') center / cover no-repeat, var(--blue-deep); }
  }

  /* =====================================================================
     CAPA 3 — cuadros emergentes con carácter propio
     · Carrito, favoritos y alertas: panel lateral (drawer) a pantalla completa.
     · Resto de diálogos: tarjeta de esquinas asimétricas con cabecera navy.
     ===================================================================== */
  .modal-overlay { background: rgba(8,28,48,.55); backdrop-filter: blur(3px); }

  /* --- Diálogos centrados --- */
  .modal { border-radius: 30px 6px 30px 6px; border: 0; box-shadow: 0 28px 70px rgba(8,28,48,.35); overflow-y: auto; position: relative;
    transform: translateY(24px) scale(.97); transition: transform .32s cubic-bezier(.2,.8,.2,1); }
  .modal-overlay.open .modal { transform: none; }
  .modal-header { background: var(--blue-deep); border-bottom: 0; border-radius: 0; padding: 20px 28px 20px; position: sticky; top: 0; z-index: 3;
    background-image: linear-gradient(90deg, var(--teal-strong) 0, var(--teal-strong) 56px, transparent 56px); background-repeat: no-repeat; background-size: 100% 4px; background-position: left top; }
  .modal-title { color: #fff; font-size: 1.1rem; gap: 12px; }
  .modal-title i { color: var(--teal-bright); font-size: 1.05rem; }
  .modal-close { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.22); }
  .modal-close:hover { background: rgba(255,255,255,.26); color: #fff; }
  .modal-body { padding: 26px 28px; }
  .modal-footer { background: var(--gray-50); border-top: 1px solid var(--gray-200); padding: 16px 28px; }

  /* --- Paneles laterales: carrito, favoritos, alertas --- */
  #cart-modal, #wishlist-modal, #notif-modal { justify-content: flex-end; align-items: stretch; padding: 0; }
  #cart-modal .modal, #wishlist-modal .modal, #notif-modal .modal {
    width: min(100%, 440px); max-width: none; height: 100%; max-height: none; display: flex; flex-direction: column; overflow: hidden;
    border-radius: 34px 0 0 6px; transform: translateX(100%); transition: transform .38s cubic-bezier(.2,.8,.2,1); box-shadow: -24px 0 60px rgba(8,28,48,.28); }
  #cart-modal.open .modal, #wishlist-modal.open .modal, #notif-modal.open .modal { transform: none; }
  #cart-modal .modal-header, #wishlist-modal .modal-header, #notif-modal .modal-header { flex-shrink: 0; border-radius: 34px 0 0 0; padding: 24px 28px 20px; }
  #cart-modal .modal-body, #wishlist-modal .modal-body, #notif-modal .modal-body { flex: 1; overflow-y: auto; min-height: 0; padding: 8px 24px 20px; }
  #cart-modal .modal-footer { flex-shrink: 0; flex-direction: column-reverse; gap: 10px; background: #fff; border-top: 1px solid var(--gray-200); box-shadow: 0 -10px 24px rgba(15,23,42,.06); padding: 16px 24px 20px; }
  #cart-modal .modal-footer button { width: 100%; justify-content: center; }
  #cart-modal .cart-total { background: var(--gray-50); border: 1px dashed var(--gray-300); border-radius: 16px 4px 16px 4px; }

  /* Líneas de carrito y favoritos */
  .cart-item { border-bottom: 1px dashed var(--gray-200); padding: 18px 0; }
  .cart-img { border-radius: 14px 4px 14px 4px; }
  .qty-control { background: var(--gray-50); border-radius: var(--btn-shape-sm); }
  .qty-btn { border: 0; background: transparent; }
  .qty-btn:hover { background: var(--teal-light); }
  .qty-num { border: 0; background: transparent; }

  /* --- Login / registro: tarjeta compacta --- */
  #auth-modal .modal { max-width: 440px; }
  #auth-modal .modal-body { padding-top: 20px; }
  .auth-tabs { background: var(--gray-100); border: 0; padding: 4px; border-radius: 16px 4px 16px 4px; gap: 4px; margin-bottom: 22px; }
  .auth-tab { margin: 0; border: 0 !important; border-radius: 12px 3px 12px 3px; padding: 11px 8px; color: var(--gray-700); }
  .auth-tab.active { background: #fff; color: var(--blue-deep); box-shadow: var(--shadow-sm); }

  .form-group > div > .form-control { width: 100%; }
  @media (min-width: 901px) {
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid.col3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  .form-grid > .form-group, .form-control { min-width: 0; max-width: 100%; }
  .admin-nav-item.active { background: var(--teal-light); color: var(--teal-strong-hover); }
  .chip-blue { background: var(--teal-light); color: var(--teal-strong-hover); }
  @media (min-width: 901px) { .checkout-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); } }
  .checkout-layout > * { min-width: 0; }

  /* --- Detalle, checkout y demás: secciones con la misma gramática --- */
  .checkout-section, .section-card, .order-summary, .order-card, .addr-card, .payment-opt, .pd-meta, .cart-total, .kpi-card { border-radius: 18px 5px 18px 5px; }
  .checkout-section-header { background: var(--gray-50); border-radius: 18px 5px 0 0; }
  .pd-main-img, .pd-thumb { border-radius: 18px 5px 18px 5px; }

  /* --- Móvil: hoja inferior con esquinas asimétricas; paneles a ancho completo --- */
  @media (max-width: 768px) {
    .modal { border-radius: 26px 6px 0 0; }
    .modal-header { border-radius: 26px 6px 0 0; padding: 18px 20px; }
    .modal-body { padding: 20px; }
    .modal-footer { padding: 14px 20px 20px; }
    #cart-modal .modal, #wishlist-modal .modal, #notif-modal .modal { width: 100%; border-radius: 0; }
    #cart-modal .modal-header, #wishlist-modal .modal-header, #notif-modal .modal-header { border-radius: 0; padding: 18px 20px; }
    #cart-modal .modal-body, #wishlist-modal .modal-body, #notif-modal .modal-body { padding: 4px 18px 16px; }
    #cart-modal .modal-footer { padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
  }

  /* =====================================================================
     CAPA 4 — tipografía: Bricolage Grotesque (títulos) + Instrument Sans (texto)
     ===================================================================== */
  body { font-size: 15px; line-height: 1.5; font-feature-settings: "ss01", "kern"; }
  h1, h2, h3, h4, .hero-title, .section-title, .modal-title, .product-name, .cat-name, .price-current,
  .pd-name, .stat-num, .promo-text h2, .summary-title, .admin-title, .kpi-val, .profile-name {
    font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-variation-settings: "opsz" 48; letter-spacing: -.02em;
  }
  .hero-title { font-weight: 700; letter-spacing: -.018em; font-variation-settings: "opsz" 96; font-size: clamp(1.9rem, 3.8vw, 3.1rem); line-height: 1.04; }
  .hero-title span { font-weight: 500; }
  .section-title { font-weight: 700; font-size: 1.7rem; letter-spacing: -.025em; }
  .product-name { font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
  .cat-name { font-weight: 700; font-size: 1.05rem; }
  .price-current { font-weight: 700; }
  .pd-name { font-weight: 700; }
  .stat-num { font-weight: 700; font-size: 1.05rem; }
  .modal-title { font-weight: 600; font-size: 1.2rem; }
  .btn-primary, .btn-outline, .btn-blue, .btn-teal, .btn-ghost, .btn-green, .btn-red, .btn-cart, .nav-compare {
    font-family: 'Instrument Sans', system-ui, sans-serif; font-weight: 600; letter-spacing: .01em; }
  .nav-item { font-weight: 500; letter-spacing: .005em; }
  .hdr-btn, .product-brand, .hero-tag, .form-label { font-family: 'Instrument Sans', system-ui, sans-serif; }
  .hero-tag, .product-brand { letter-spacing: .1em; }
  @media (max-width: 768px) {
    .hero-title { font-size: 1.85rem; }
    .section-title { font-size: 1.35rem; }
  }

  /* =====================================================================
     CAPA 5 — ficha de producto y etiquetas (sin emojis; iconos Font Awesome)
     ===================================================================== */
  .product-card { border-radius: 24px 6px 24px 6px; border: 1px solid var(--gray-200); box-shadow: none; overflow: hidden;
    transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, border-color .3s ease; }
  .product-card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 2;
    background: linear-gradient(90deg, var(--teal-strong), var(--teal-bright)); transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
  .product-card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(15,23,42,.11); border-color: transparent; }
  .product-card:hover::after { transform: scaleX(1); }

  .product-img { height: 230px; background: radial-gradient(120% 90% at 50% 35%, #fff 0%, var(--gray-50) 68%, #eaf0f4 100%); }
  .product-img img { padding: 18px; mix-blend-mode: multiply; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
  .product-card:hover .product-img img { transform: scale(1.06); }

  /* Etiquetas: pestaña pegada al borde izquierdo con icono */
  .product-badge { top: 16px; left: 0; padding: 7px 13px 7px 11px; border-radius: 0 12px 12px 0; display: inline-flex; align-items: center; gap: 7px;
    font-family: 'Instrument Sans', system-ui, sans-serif; font-size: .66rem; font-weight: 700; letter-spacing: .09em; line-height: 1;
    color: #fff; background: var(--blue-deep); box-shadow: 0 4px 12px rgba(10,37,64,.18); z-index: 2; }
  .product-badge::before { font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: .72rem; line-height: 1; }
  .product-badge.badge-best { background: var(--blue-deep); color: #fff; }
  .product-badge.badge-best::before { content: '\f06d'; color: var(--teal-bright); }
  .product-badge.badge-sale { background: #b3261e; color: #fff; }
  .product-badge.badge-sale::before { content: '\f295'; color: #ffd9d5; }
  .product-badge.badge-new { background: var(--teal-strong); color: #fff; }
  .product-badge.badge-new::before { content: '\f005'; color: #d9fbf6; }
  .product-badge.badge-promo { background: #f6b73c; color: #3a2400; }
  .product-badge.badge-promo::before { content: '\f02b'; color: #3a2400; }

  .wishlist-btn { top: 14px; right: 14px; width: 38px; height: 38px; background: rgba(255,255,255,.92); border: 1px solid var(--gray-200); color: var(--gray-700); z-index: 2; }
  .wishlist-btn:hover, .wishlist-btn.active { color: #c62828; border-color: #f3c3c0; background: #fff; }

  .product-info { padding: 18px 20px 20px; }
  .product-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .68rem; }
  .product-brand::before { content: ''; width: 16px; height: 2px; background: var(--teal); flex-shrink: 0; }
  .product-name { font-size: 1.02rem; line-height: 1.28; min-height: 2.56em; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-sku { font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 10px; }
  .stars { gap: 8px; margin-bottom: 12px; }
  .star-row { display: inline-flex; gap: 2px; }
  .star-row i { font-size: .72rem; color: #f2a516; }
  .star-row i.far { color: #cfd8e1; }
  .stars span:not(.star-row) { margin-left: 0; color: var(--gray-700); font-size: .74rem; }

  .product-price { padding-top: 14px; border-top: 1px dashed var(--gray-200); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .price-old { order: 2; font-size: .85rem; }
  .price-current { order: 1; font-size: 1.65rem; letter-spacing: -.03em; line-height: 1.05; }
  .price-unit { font-size: .68rem; font-weight: 600; letter-spacing: .06em; color: var(--gray-500); }
  .product-price > span[style] { order: 3; display: inline-flex; background: #fdeceb; color: #b3261e !important; padding: 3px 9px; border-radius: 8px 2px 8px 2px; font-size: .7rem !important; }
  .product-price > div:last-child { order: 4; flex-basis: 100%; margin-top: 4px !important; }
  .stock-badge { margin: 12px 0 0; font-size: .74rem; }
  .product-actions { margin-top: 16px; gap: 10px; }
  .btn-cart { min-height: 46px; }
  .btn-view { min-width: 46px; background: var(--gray-100); color: var(--blue-deep); }
  .btn-view:hover { background: var(--teal-light); color: var(--teal-strong-hover); }

  .pd-main-img img, .pd-thumb img, .cart-img img { mix-blend-mode: multiply; }
  @media (min-width: 701px) and (max-width: 900px) { .pd-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } .pd-main-img { height: 280px; } }
  .pd-actions { min-width: 0; align-items: stretch; }
  .pd-actions .btn-cart { min-width: 0; padding-inline: 18px; }
  .pd-actions > button:not(.btn-cart) { flex-shrink: 0; }
  /* Detalle */
  .pd-info .stars .star-row i { font-size: .9rem; }
  .pd-meta-val { font-weight: 600; }

  @media (max-width: 768px) {
    .product-img { height: 176px; }
    .product-img img { padding: 12px; }
    .product-info { padding: 14px 14px 16px; }
    .product-name { font-size: .92rem; }
    .price-current { font-size: 1.35rem; }
    .product-badge { top: 12px; padding: 6px 10px 6px 9px; font-size: .6rem; }
    .btn-cart { min-height: 42px; }
  }
  /* =====================================================================
     CAPA 6 — estados: vacío, carga y hover/pulsado
     Un solo molde para «no hay nada», «cargando» y «falló» (los genera
     _htmlVacio / _filaVacia / _htmlEsqueleto / _btnOcupado en tienda-base.js).
     ===================================================================== */
  .solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  /* ---------- Vacío ---------- */
  .empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 24px; }
  .empty-state > i { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 18px; font-size: 1.7rem;
    color: var(--teal-strong); background: var(--teal-light); border-radius: 18px 5px 18px 5px; }
  .empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
  .empty-state p { font-size: .9rem; line-height: 1.5; color: var(--gray-700); max-width: 36ch; overflow-wrap: anywhere; }
  .empty-state .empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
  .empty-state .empty-actions i { display: inline; font-size: inherit; color: inherit; margin: 0; }
  .empty-state.compacto { padding: 28px 16px; }
  .empty-state.compacto > i { width: 56px; height: 56px; font-size: 1.3rem; margin-bottom: 14px; border-radius: 14px 4px 14px 4px; }
  .empty-state.error > i { color: #b3261e; background: #fdeceb; }
  .products-grid > .empty-state, .addr-grid > .empty-state { grid-column: 1 / -1; }

  .data-table td.tabla-vacia { text-align: center; padding: 30px 16px; font-size: .88rem; color: var(--gray-700); }
  .tabla-vacia i { display: block; margin-bottom: 8px; font-size: 1.35rem; color: var(--gray-300); }
  .data-table tr.fila-vacia:hover td, .data-table tr.esq-fila:hover td { background: transparent; }

  /* ---------- Carga: esqueletos ---------- */
  .esq { display: block; border-radius: 6px 2px 6px 2px; background: linear-gradient(90deg, #eef1f5 25%, #f8f9fb 50%, #eef1f5 75%); background-size: 200% 100%; animation: catalogo-brillo 1.4s linear infinite; }
  .esq-linea { height: 12px; width: 100%; }
  .esq-linea.c { width: 38%; }
  .esq-linea.m { width: 68%; }
  .esq-linea.alta { height: 26px; }
  .esq-linea.fina { height: 9px; }
  .esq-boton { height: 46px; border-radius: var(--btn-shape); }

  /* Misma caja que .product-card, para que nada salte al llegar el catálogo */
  .catalogo-esqueleto { height: auto; background: #fff; animation: none; border: 1px solid var(--gray-200); border-radius: 24px 6px 24px 6px; overflow: hidden; display: flex; flex-direction: column; }
  .catalogo-esqueleto .esq-img { height: 230px; border-radius: 0; }
  .catalogo-esqueleto .esq-cuerpo { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
  .catalogo-esqueleto .esq-cuerpo > .esq-linea:not(.fina) { height: 14px; }
  .catalogo-esqueleto .esq-precio { margin-top: 5px; padding-top: 14px; border-top: 1px dashed var(--gray-200); display: flex; flex-direction: column; gap: 10px; }
  .catalogo-esqueleto .esq-boton { margin-top: 8px; }

  .esq-pedido { background: #fff; border: 1px solid var(--gray-200); border-radius: 18px 5px 18px 5px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
  .esq-pedido > .esq-linea.m { max-width: 420px; }
  .esq-pedido > .esq-linea.c { max-width: 260px; }
  .esq-pedido .esq-fila-2 { display: flex; justify-content: space-between; gap: 16px; }
  .esq-pedido .esq-fila-2 .esq { flex: 0 0 auto; width: 120px; }
  .esq-pedido .esq-fila-2 .esq:last-child { width: 72px; height: 20px; }

  .data-table tr.esq-fila td { padding: 17px 16px; }
  .data-table tr.esq-fila td:nth-child(odd) .esq { width: 72%; }
  .data-table tr.esq-fila td:nth-child(even) .esq { width: 46%; }
  .kpi-trend .esq-linea { margin-top: 6px; }

  /* ---------- Carga: botón ocupado ---------- */
  .is-loading { pointer-events: none; gap: 0; }
  .is-loading > i { display: none; }
  .is-loading::before { content: ''; display: inline-block; flex-shrink: 0; width: 1em; height: 1em; margin-right: 8px; vertical-align: -.15em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

  /* ---------- Hover que faltaba ---------- */
  .profile-tab:not(.active):hover { background: rgba(255,255,255,.65); color: var(--gray-900); }
  .auth-tab:not(.active):hover { background: rgba(255,255,255,.6); color: var(--blue-deep); }
  .addr-card:hover { border-color: var(--gray-300); }
  .addr-card.active:hover { border-color: var(--teal); }
  .hero-dot:not(.active):hover { background: rgba(255,255,255,.85); }
  .img-upload-area:hover { border-color: var(--teal); background: var(--teal-light); }
  .page-btn:disabled:hover { background: var(--white); color: var(--gray-700); border-color: var(--gray-200); }

  /* Enlaces-botón de la ficha de producto (WhatsApp, copiar enlace, cotizar) */
  .pd-link { display: flex; align-items: center; gap: 8px; width: fit-content; margin-top: 10px; padding: 0; background: none; border: 0;
    color: var(--teal-strong); font: inherit; font-weight: 700; font-size: .88rem; text-decoration: none; cursor: pointer; transition: color .2s ease; }
  .pd-link i { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
  .pd-link:hover { color: var(--teal-strong-hover); text-decoration: underline; text-underline-offset: 3px; }
  .pd-link:hover i { transform: translateX(2px); }
  .pd-link.wa { margin-top: 12px; color: #1a9f4f; }
  .pd-link.wa:hover { color: #137a3c; }

  .wish-remove { background: none; border: 0; padding: 7px 9px; color: #c62828; font-size: .82rem; cursor: pointer; border-radius: var(--btn-shape-sm); transition: var(--transition); }
  .wish-remove:hover { background: #fdeceb; }

  /* ---------- Pulsado ---------- */
  .btn-cart:not(.out):active, .btn-ghost:active, .btn-outline:active, .btn-green:active, .btn-red:active, .tbl-btn:active,
  .pager-btn:not(:disabled):active, .page-btn:not(:disabled):active { transform: translateY(1px); box-shadow: none; }
  .btn-view:active, .wishlist-btn:active, .qty-btn:active, .modal-close:active, .hdr-btn:active, .wish-remove:active { transform: scale(.94); }
  .cat-card:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

  @media (max-width: 768px) {
    .catalogo-esqueleto .esq-img { height: 176px; }
    .catalogo-esqueleto .esq-cuerpo { padding: 14px 14px 16px; gap: 12px; }
    .catalogo-esqueleto .esq-boton { height: 42px; }
    .empty-state { padding: 36px 16px; }
    .empty-state .empty-actions > * { flex: 1 1 100%; }
  }

  /* ---------- Táctil: sin «hover pegado» ----------
     Va al final a propósito: el bloque (hover: none) de más arriba quedó anulado por las
     capas 2–5, que redefinen los mismos :hover después. tests/estados.test.js lo vigila. */
  @media (hover: none) {
    .product-card:hover { transform: none; box-shadow: none; border-color: var(--gray-200); }
    .product-card:hover::after { transform: scaleX(0); }
    .product-card:hover .product-img img { transform: none; }
    .cat-card:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--gray-200); }
    .cat-card:hover .cat-icon { color: var(--blue-deep); }
    .cat-card.active { border-color: var(--teal); }
    .btn-primary:hover, .btn-outline:hover, .btn-blue:hover, .btn-teal:hover, .btn-ghost:hover, .btn-green:hover, .btn-red:hover,
    .btn-cart:not(.out):hover, .nav-item.nav-compare:hover { border-radius: var(--btn-shape); box-shadow: none; }
    .btn-view:hover, .tbl-btn:hover, .wishlist-btn:hover, .modal-close:hover, .hero-arrow:hover, .social-btn:hover, .hdr-btn:hover { border-radius: var(--btn-shape-sm); }
    #wa-btn:hover { border-radius: 22px 6px 22px 6px; box-shadow: 0 4px 20px rgba(37,211,102,.5); }
    .pd-link:hover i { transform: none; }
  }
