/* ===== RESET ===== */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; overflow-x:hidden; }
body { font-family:'DM Sans',sans-serif; background:var(--bg); color:var(--text); padding-top:72px; transition:background 0.3s, color 0.3s; overflow-x:hidden; max-width:100vw; }

/* ===== TEMAS (Dark / Light) ===== */
:root,
[data-theme="dark"] {
  --bg:         #020617;
  --bg-2:       #0a0f1e;
  --bg-nav:     rgba(2,6,23,0.75);
  --accent:     #73DEFD;
  --accent-dim: rgba(115,222,253,0.12);
  --green:      #22c55e;
  --green-dark: #16a34a;
  --surface:    rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.07);
  --border:     rgba(255,255,255,0.07);
  --border-hover: rgba(115,222,253,0.25);
  --text:       #e2e8f0;
  --text-muted: #64748b;
  --text-sub:   #94a3b8;
  --pill-bg:    rgba(255,255,255,0.06);
  --pill-active-bg: rgba(115,222,253,0.15);
  --modal-bg:   #0f172a;
  --cart-bg:    #0b1120;
  --sk-base:    rgba(255,255,255,0.06);
  --sk-shine:   rgba(255,255,255,0.12);
}

[data-theme="light"] {
  --bg:         #f8fafc;
  --bg-2:       #f1f5f9;
  --bg-nav:     rgba(248,250,252,0.75);
  --accent:     #0ea5e9;
  --accent-dim: rgba(14,165,233,0.12);
  --green:      #16a34a;
  --green-dark: #15803d;
  --surface:    rgba(0,0,0,0.04);
  --surface-hover: rgba(0,0,0,0.07);
  --border:     rgba(0,0,0,0.08);
  --border-hover: rgba(14,165,233,0.35);
  --text:       #0f172a;
  --text-muted: #64748b;
  --text-sub:   #475569;
  --pill-bg:    rgba(0,0,0,0.05);
  --pill-active-bg: rgba(14,165,233,0.12);
  --modal-bg:   #ffffff;
  --cart-bg:    #f1f5f9;
  --sk-base:    rgba(0,0,0,0.06);
  --sk-shine:   rgba(0,0,0,0.10);
}

h1,h2,h3,.logo,.section-tag,.logo-small { font-family:'Syne',sans-serif; }
.digital { color:var(--text); }
.zone    { color:var(--accent); }

/* ===== NAVBAR ===== */
.navbar {
  position:fixed; top:0; left:0; right:0; height:72px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 40px; gap:16px;
  background:var(--bg-nav);
  -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px);
  border-bottom:1px solid var(--border); z-index:1000;
  transition:background 0.3s;
}
.logo { font-size:20px; font-weight:800; white-space:nowrap; text-decoration:none; }
.navbar nav { display:flex; gap:24px; flex:1; justify-content:center; }
.navbar nav a { text-decoration:none; color:var(--text-sub); font-size:14px; transition:color 0.2s; letter-spacing:0.01em; }
.navbar nav a:hover { color:var(--text); }
.navbar nav a.nav-highlight { color:var(--accent); font-weight:600; }
.navbar nav a.nav-highlight:hover { opacity:0.8; }
.navbar-actions { display:flex; align-items:center; gap:8px; }

.auth-btn {
  background:none; border:1px solid var(--border); color:var(--text-sub);
  font-family:'DM Sans',sans-serif; font-size:14px; padding:7px 16px;
  border-radius:8px; cursor:pointer; transition:0.2s; white-space:nowrap;
}
.auth-btn:hover { color:var(--text); border-color:var(--border-hover); background:var(--surface); }

.cart-btn {
  display:flex; align-items:center; gap:8px;
  background:var(--surface); border:1px solid var(--border); color:var(--text);
  font-family:'DM Sans',sans-serif; font-size:14px; padding:8px 16px;
  border-radius:8px; cursor:pointer; transition:0.2s; white-space:nowrap;
}
.cart-btn:hover { background:var(--surface-hover); }
.cart-count {
  background:var(--accent); color:#020617; font-size:11px; font-weight:700;
  width:18px; height:18px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}

/* Dark/Light toggle */
.theme-btn {
  background:var(--surface); border:1px solid var(--border);
  width:34px; height:34px; border-radius:8px; cursor:pointer;
  font-size:16px; display:flex; align-items:center; justify-content:center;
  transition:0.2s; flex-shrink:0;
}
.theme-btn:hover { background:var(--surface-hover); }

/* Historial link */
.historial-nav-btn {
  display:inline-flex; align-items:center; gap:6px;
  color:var(--text-sub); text-decoration:none; font-size:13px;
  padding:7px 12px; border-radius:8px; border:1px solid var(--border);
  background:var(--surface); transition:0.2s; white-space:nowrap;
}
.historial-nav-btn:hover { color:var(--text); background:var(--surface-hover); }

/* ===== HERO ===== */
.hero { text-align:center; padding:100px 20px 90px; position:relative; overflow:hidden; }
.hero-bg-glow {
  position:absolute; top:-220px; left:50%; transform:translateX(-50%);
  width:800px; height:800px;
  background:radial-gradient(circle,rgba(115,222,253,0.07) 0%,transparent 65%);
  pointer-events:none;
}
[data-theme="light"] .hero-bg-glow {
  background:radial-gradient(circle,rgba(14,165,233,0.07) 0%,transparent 65%);
}
.hero-content { position:relative; z-index:1; }
.hero-label {
  display:inline-block; font-size:11px; font-weight:600; letter-spacing:0.12em;
  text-transform:uppercase; color:var(--accent);
  border:1px solid rgba(115,222,253,0.25); padding:5px 16px;
  border-radius:20px; margin-bottom:28px;
}
.hero-title { font-size:clamp(36px,6vw,72px); font-weight:800; line-height:1.1; color:var(--text); margin-bottom:18px; }
.hero-title em { color:var(--accent); font-style:normal; }
.hero-sub { font-size:17px; color:var(--text-muted); margin-bottom:40px; letter-spacing:0.02em; }
.hero-ctas { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-bottom:64px; }

/* ===== BUTTONS ===== */
.btn {
  display:inline-flex; align-items:center; gap:8px; padding:13px 24px;
  border-radius:10px; font-family:'DM Sans',sans-serif; font-size:15px; font-weight:500;
  text-decoration:none; cursor:pointer; border:none; transition:all 0.2s; letter-spacing:0.01em;
}
.btn-primary { background:linear-gradient(135deg,var(--green),var(--green-dark)); color:#fff; box-shadow:0 2px 12px rgba(34,197,94,0.15); }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(34,197,94,0.28); }
.btn-outline { background:var(--surface); color:var(--text); border:1px solid var(--border); }
.btn-outline:hover { background:var(--surface-hover); border-color:var(--border-hover); }
.btn-ghost  { background:var(--surface); border:1px solid var(--border); color:var(--text-sub); font-family:'DM Sans',sans-serif; font-size:14px; padding:9px 16px; border-radius:8px; cursor:pointer; transition:0.2s; }
.btn-ghost:hover { color:var(--text); background:var(--surface-hover); }

/* ===== STATS ===== */
.hero-stats { display:flex; justify-content:center; align-items:center; gap:40px; }
.stat { text-align:center; }
.stat span { display:block; font-family:'Syne',sans-serif; font-size:22px; font-weight:700; color:var(--text); }
.stat small { font-size:13px; color:var(--text-muted); margin-top:2px; display:block; }
.stat-div { width:1px; height:36px; background:var(--border); }

/* ===== REPAIR BANNER ===== */
.repair-banner { background:linear-gradient(135deg,rgba(115,222,253,0.06) 0%,rgba(34,197,94,0.04) 100%); border-top:1px solid var(--border); border-bottom:1px solid var(--border); padding:72px 40px; }
.repair-banner-inner { max-width:1160px; margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:80px; align-items:center; }
.repair-banner-text .section-tag { margin-bottom:16px; display:inline-block; }
.repair-banner-text h2 { font-size:clamp(26px,3.5vw,42px); font-weight:800; color:var(--text); line-height:1.15; margin-bottom:16px; }
.repair-banner-text p { font-size:16px; color:var(--text-sub); line-height:1.7; margin-bottom:28px; max-width:440px; }
.repair-services-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.repair-service-item { display:flex; align-items:flex-start; gap:14px; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:18px 16px; transition:0.2s; }
.repair-service-item:hover { background:var(--accent-dim); border-color:var(--border-hover); }
.repair-service-icon { width:40px; height:40px; border-radius:10px; flex-shrink:0; background:var(--accent-dim); border:1px solid rgba(115,222,253,0.15); display:flex; align-items:center; justify-content:center; color:var(--accent); }
.repair-service-item strong { display:block; font-size:14px; font-weight:600; color:var(--text); margin-bottom:3px; }
.repair-service-item span { font-size:12px; color:var(--text-muted); }

/* ===== BARRA DE FILTROS ===== */
.filter-bar {
  max-width:1280px; margin:0 auto;
  padding:20px 40px 0;
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
}
.filter-search-wrap {
  display:flex; align-items:center; gap:8px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:10px; padding:8px 14px; flex:1 1 auto; min-width:0; max-width:100%;
  transition:border-color 0.2s;
}
.filter-search-wrap:focus-within { border-color:var(--border-hover); }
.filter-search-wrap svg { color:var(--text-muted); flex-shrink:0; }
.filter-search-wrap input { background:none; border:none; outline:none; color:var(--text); font-family:'DM Sans',sans-serif; font-size:14px; width:100%; }
.filter-search-wrap input::placeholder { color:var(--text-muted); }

.filter-group { display:flex; gap:6px; flex-wrap:wrap; }

.pill {
  padding:6px 14px; border-radius:20px; border:1px solid var(--border);
  background:var(--pill-bg); color:var(--text-sub); font-family:'DM Sans',sans-serif;
  font-size:13px; cursor:pointer; transition:0.2s; white-space:nowrap;
}
.pill:hover { color:var(--text); border-color:var(--border-hover); background:var(--surface-hover); }
.pill.active { background:var(--pill-active-bg); border-color:var(--accent); color:var(--accent); font-weight:600; }
.fav-pill.active { background:rgba(244,114,182,0.12); border-color:rgba(244,114,182,0.4); color:#f472b6; }

.filter-right { display:flex; align-items:center; gap:8px; margin-left:auto; }
.sort-select {
  background:var(--surface); border:1px solid var(--border); color:var(--text);
  font-family:'DM Sans',sans-serif; font-size:13px; padding:7px 12px;
  border-radius:8px; outline:none; cursor:pointer; transition:0.2s;
}
.sort-select:hover { border-color:var(--border-hover); }
.sort-select option { background:var(--modal-bg); }

/* ===== CATÁLOGO ===== */
.catalog-wrap { max-width:1200px; margin:0 auto; padding:0 40px 60px; }
.cat-section { padding:64px 0 10px; }
.cat-header { display:flex; align-items:center; gap:14px; margin-bottom:28px; padding-bottom:18px; border-bottom:1px solid var(--border); }
.cat-header h2 { font-size:21px; font-weight:800; color:var(--text); flex:1; }
.cat-count { font-size:12px; color:var(--text-muted); background:var(--surface); padding:3px 10px; border-radius:20px; border:1px solid var(--border); }

/* Sin resultados */
.no-results { text-align:center; padding:80px 40px; }
.no-results-icon { font-size:48px; margin-bottom:16px; }
.no-results h3 { font-size:20px; font-weight:700; color:var(--text); margin-bottom:8px; }
.no-results p { color:var(--text-muted); margin-bottom:24px; }

/* ===== PRODUTO CARD ===== */
.products-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(234px,1fr)); gap:18px; }

/* Animación de entrada */
.will-animate { opacity:0; transform:translateY(24px); transition:opacity 0.5s ease, transform 0.5s ease; }
.will-animate.animated { opacity:1; transform:translateY(0); }

.product-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:16px; overflow:hidden; transition:all 0.25s;
  display:flex; flex-direction:column; cursor:pointer;
}
.product-card:hover { transform:translateY(-5px); border-color:var(--border-hover); background:var(--surface-hover); box-shadow:0 12px 40px rgba(0,0,0,0.2); }

.product-img-wrap { position:relative; width:100%; height:180px; overflow:hidden; background:var(--surface); }
.product-img-wrap img { width:100%; height:100%; object-fit:cover; display:block; transition:transform 0.35s; }
.product-card:hover .product-img-wrap img { transform:scale(1.05); }

.cond-tag { position:absolute; top:10px; left:10px; font-size:10px; font-weight:700; padding:3px 9px; border-radius:5px; text-transform:uppercase; letter-spacing:0.06em; }
.cond-tag.nuevo { background:rgba(34,197,94,0.9); color:#fff; }
.cond-tag.usado { background:rgba(115,222,253,0.9); color:#020617; }

/* Stock badge */
@keyframes stock-slide-in { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
.stock-badge {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ff6b6b;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0;
  border-top: 1px solid rgba(255,107,107,0.3);
  animation: stock-slide-in .25s ease both;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Favorito */
.fav-btn {
  position:absolute; top:10px; right:10px;
  width:30px; height:30px; border-radius:50%;
  background:rgba(0,0,0,0.45); border:none; color:#fff;
  font-size:16px; cursor:pointer; transition:0.2s;
  display:flex; align-items:center; justify-content:center;
  backdrop-filter:blur(4px);
}
.fav-btn:hover { transform:scale(1.15); }
.fav-btn.active { color:#f472b6; background:rgba(244,114,182,0.2); }

.product-card-body { padding:14px 16px 16px; flex:1; display:flex; flex-direction:column; gap:7px; }

.product-badge { display:inline-block; font-size:10px; font-weight:700; padding:2px 8px; border-radius:4px; text-transform:uppercase; letter-spacing:0.07em; }
.badge-iphones    { background:rgba(99,102,241,0.18);  color:#a5b4fc; }
.badge-accesorios { background:rgba(168,85,247,0.18);  color:#c084fc; }
.badge-repuestos  { background:rgba(251,146,60,0.18);  color:#fb923c; }
.badge-cargadores { background:rgba(234,179,8,0.18);   color:#fde047; }
.badge-fundas     { background:rgba(115,222,253,0.12); color:var(--accent); }

.product-card h3 { font-size:15px; font-weight:600; color:var(--text); line-height:1.3; }
.product-card p  { font-size:13px; color:var(--text-muted); flex:1; line-height:1.55; }
.product-price   { font-family:'Syne',sans-serif; font-size:19px; font-weight:700; color:var(--text); }

.add-btn { width:100%; padding:10px; background:linear-gradient(135deg,var(--green),var(--green-dark)); color:#fff; border:none; border-radius:8px; font-family:'DM Sans',sans-serif; font-size:14px; font-weight:500; cursor:pointer; transition:0.2s; margin-top:4px; }
.add-btn:hover { opacity:0.85; transform:scale(1.015); }
.add-btn-disabled { background:var(--surface) !important; color:var(--text-muted) !important; cursor:not-allowed; transform:none !important; opacity:1 !important; border:1px solid var(--border); }

/* ===== SKELETON LOADING ===== */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(234px,1fr)); gap:18px; padding:64px 0 10px; }
.skeleton-card { background:var(--surface); border:1px solid var(--border); border-radius:16px; overflow:hidden; }
.sk { background:linear-gradient(90deg, var(--sk-base) 25%, var(--sk-shine) 50%, var(--sk-base) 75%); background-size:800px 100%; animation:shimmer 1.4s infinite linear; border-radius:6px; }
.sk-img   { height:180px; border-radius:0; }
.skeleton-body { padding:14px 16px 16px; display:flex; flex-direction:column; gap:10px; }
.sk-badge { height:16px; width:60px; }
.sk-title { height:18px; width:80%; }
.sk-text  { height:14px; width:100%; }
.sk-price { height:22px; width:50%; }
.sk-btn   { height:36px; width:100%; border-radius:8px; margin-top:4px; }

/* ===== MODAL ===== */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.8); z-index:2000; display:flex; align-items:center; justify-content:center; padding:20px; opacity:0; pointer-events:none; transition:opacity 0.2s; -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
.modal-overlay.open { opacity:1; pointer-events:all; }
.modal-box { background:var(--modal-bg); border:1px solid var(--border); border-radius:20px; max-width:700px; width:100%; display:flex; overflow:hidden; position:relative; max-height:92vh; }
.modal-close { position:absolute; top:14px; right:14px; background:var(--surface); border:1px solid var(--border); color:var(--text-sub); width:30px; height:30px; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:10; transition:0.2s; }
.modal-close:hover { background:var(--surface-hover); color:var(--text); }

/* Columna galería */
.modal-gallery-col { width:260px; flex-shrink:0; display:flex; flex-direction:column; }
.modal-img-wrap { position:relative; flex:1; background:var(--surface); overflow:hidden; min-height:220px; cursor:crosshair; }
.modal-img-wrap img { width:100%; height:100%; object-fit:cover; display:block; transition:transform 0.15s ease; }
.zoom-hint { position:absolute; bottom:8px; right:8px; font-size:14px; opacity:0.5; pointer-events:none; transition:opacity 0.2s; }
.modal-img-wrap:hover .zoom-hint { opacity:0; }

/* Galería nav */
.gallery-nav { position:absolute; top:50%; transform:translateY(-50%); width:32px; height:32px; border-radius:50%; background:rgba(0,0,0,0.55); border:none; color:#fff; font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:0.2s; z-index:5; backdrop-filter:blur(4px); }
.gallery-nav:hover { background:rgba(0,0,0,0.8); }
.gallery-prev { left:8px; }
.gallery-next { right:8px; }

/* Thumbnails */
.gallery-thumbs { display:flex; gap:6px; padding:8px; flex-wrap:wrap; border-top:1px solid var(--border); background:var(--surface); }
.gallery-thumb { width:44px; height:44px; object-fit:cover; border-radius:6px; cursor:pointer; opacity:0.55; border:2px solid transparent; transition:0.2s; }
.gallery-thumb:hover { opacity:0.8; }
.gallery-thumb.active { opacity:1; border-color:var(--accent); }

.modal-body { padding:28px 24px; display:flex; flex-direction:column; gap:10px; overflow-y:auto; flex:1; }
.modal-body h2   { font-size:20px; font-weight:700; color:var(--text); line-height:1.3; }
.modal-price     { font-family:'Syne',sans-serif; font-size:26px; font-weight:800; color:var(--accent); }
.modal-desc-text { font-size:14px; color:var(--text-sub); line-height:1.65; }
.modal-detail-text { font-size:13px; color:var(--text-muted); line-height:1.65; border-top:1px solid var(--border); padding-top:10px; }

.modal-actions { display:flex; gap:10px; margin-top:auto; }
.modal-actions .add-btn { flex:1; margin-top:0; }

.share-btn {
  width:44px; height:44px; border-radius:8px; flex-shrink:0;
  background:var(--surface); border:1px solid var(--border); color:var(--text-sub);
  display:flex; align-items:center; justify-content:center; cursor:pointer; transition:0.2s;
}
.share-btn:hover { background:var(--surface-hover); color:var(--text); border-color:var(--border-hover); }

/* ===== BARRA DE ENVÍO EN CARRITO ===== */
.shipping-bar { padding:12px 24px; border-bottom:1px solid var(--border); }
.shipping-text { font-size:12px; color:var(--text-sub); margin-bottom:8px; }
.shipping-text strong { color:var(--text); }
.shipping-track { width:100%; height:4px; background:var(--surface-hover); border-radius:2px; overflow:hidden; }
.shipping-fill { height:100%; border-radius:2px; transition:width 0.4s ease, background 0.4s; }

/* ===== BENEFICIOS ===== */
.benefits-section { padding:80px 40px; max-width:1200px; margin:0 auto; }
.section-header { text-align:center; margin-bottom:52px; }
.section-tag { display:inline-block; font-size:11px; font-weight:700; letter-spacing:0.12em; text-transform:uppercase; color:var(--accent); margin-bottom:12px; }
.section-header h2 { font-size:clamp(22px,4vw,36px); font-weight:800; color:var(--text); margin-bottom:10px; }
.section-header p  { font-size:16px; color:var(--text-muted); }

.benefits-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:18px; }
.benefit-card { background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:28px 24px; transition:0.2s; }
.benefit-card:hover { background:var(--surface-hover); transform:translateY(-3px); }
.benefit-icon { width:44px; height:44px; border-radius:11px; background:var(--accent-dim); border:1px solid rgba(115,222,253,0.15); display:flex; align-items:center; justify-content:center; color:var(--accent); margin-bottom:16px; }
.benefit-card h3 { font-size:15px; font-weight:700; color:var(--text); margin-bottom:8px; }
.benefit-card p  { font-size:14px; color:var(--text-muted); line-height:1.65; }

/* ===== FOOTER ===== */
.footer { border-top:1px solid var(--border); padding:44px 20px; text-align:center; }
.footer-inner { display:flex; flex-direction:column; align-items:center; gap:8px; }
.footer p  { font-size:14px; color:var(--text-muted); }
.copy      { font-size:12px; color:var(--text-muted); opacity:0.6; margin-top:4px; }

/* ===== WHATSAPP FLOTANTE ===== */
.whatsapp-float { position:fixed; bottom:24px; right:24px; width:56px; height:56px; border-radius:50%; background:linear-gradient(135deg,#25d366,#1da851); display:flex; align-items:center; justify-content:center; box-shadow:0 4px 20px rgba(37,211,102,0.35); transition:0.2s; z-index:900; }
.whatsapp-float:hover { transform:scale(1.1); box-shadow:0 6px 28px rgba(37,211,102,0.45); }

/* ===== CARRITO ===== */
.cart-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:1100; opacity:0; pointer-events:none; transition:opacity 0.25s; }
.cart-overlay.open { opacity:1; pointer-events:all; }
.cart-panel { position:fixed; top:0; right:0; width:380px; max-width:100vw; height:100vh; background:var(--cart-bg); border-left:1px solid var(--border); z-index:1200; display:flex; flex-direction:column; transform:translateX(100%); transition:transform 0.3s cubic-bezier(0.4,0,0.2,1); }
.cart-panel.open { transform:translateX(0); }
.cart-header { display:flex; justify-content:space-between; align-items:center; padding:20px 24px; border-bottom:1px solid var(--border); }
.cart-header h2 { font-size:18px; font-weight:700; color:var(--text); }
.cart-close { background:var(--surface); border:1px solid var(--border); color:var(--text-muted); width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:0.2s; }
.cart-close:hover { background:var(--surface-hover); color:var(--text); }
.cart-items { flex:1; overflow-y:auto; padding:16px 24px; display:flex; flex-direction:column; gap:12px; }
.cart-empty { color:var(--text-muted); font-size:14px; text-align:center; margin-top:40px; }
.cart-item { display:flex; gap:12px; align-items:flex-start; padding:12px; background:var(--surface); border:1px solid var(--border); border-radius:10px; }
.cart-item img { width:52px; height:52px; object-fit:cover; border-radius:8px; background:var(--surface); }
.cart-item-info { flex:1; }
.cart-item-info strong { font-size:14px; color:var(--text); display:block; margin-bottom:4px; }
.cart-item-info span  { font-size:13px; color:var(--accent); font-weight:600; }
.cart-item-controls { display:flex; align-items:center; gap:8px; margin-top:8px; }
.qty-btn { width:24px; height:24px; border-radius:6px; border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:0.15s; }
.qty-btn:hover { background:var(--surface-hover); }
.qty-num { font-size:14px; color:var(--text); min-width:20px; text-align:center; }
.remove-btn { background:none; border:none; color:var(--text-muted); cursor:pointer; padding:4px; transition:color 0.2s; }
.remove-btn:hover { color:#f87171; }
.cart-footer { padding:16px 24px 24px; border-top:1px solid var(--border); }
.cart-total { display:flex; justify-content:space-between; font-size:16px; color:var(--text); align-items:center; }
.cart-total strong { font-size:20px; color:var(--text); font-family:'Syne',sans-serif; }

/* ===== TOAST ===== */
.dz-toast {
  position:fixed; bottom:90px; right:24px; z-index:9999;
  background:#1e293b; border:1px solid rgba(255,255,255,0.1);
  border-radius:10px; padding:11px 18px;
  font-size:14px; color:#e2e8f0;
  transform:translateY(20px); opacity:0;
  transition:transform 0.25s ease, opacity 0.25s ease;
  pointer-events:none; max-width:260px;
}
[data-theme="light"] .dz-toast { background:#1e293b; color:#f1f5f9; }
.dz-toast.show { transform:translateY(0); opacity:1; }

/* ===== HISTORIAL PAGE ===== */
.hist-wrap { max-width:760px; margin:60px auto; padding:0 20px 60px; }
.hist-wrap h1 { font-size:28px; font-weight:800; color:var(--text); margin-bottom:6px; }
.hist-wrap .sub { font-size:14px; color:var(--text-muted); margin-bottom:36px; }
.hist-card { background:var(--surface); border:1px solid var(--border); border-radius:14px; overflow:hidden; margin-bottom:16px; }
.hist-card-head { display:flex; justify-content:space-between; align-items:center; padding:14px 20px; border-bottom:1px solid var(--border); }
.hist-date { font-size:13px; color:var(--text-muted); }
.hist-total { font-family:'Syne',sans-serif; font-size:17px; font-weight:700; color:var(--accent); }
.hist-items { padding:14px 20px; display:flex; flex-direction:column; gap:8px; }
.hist-item { display:flex; justify-content:space-between; font-size:14px; color:var(--text-sub); }
.hist-item span { color:var(--text-muted); }
.hist-status { display:inline-block; font-size:11px; font-weight:600; padding:2px 8px; border-radius:4px; background:rgba(34,197,94,0.12); color:#4ade80; }
.hist-empty { text-align:center; padding:60px 20px; color:var(--text-muted); }
.hist-empty h3 { font-size:18px; font-weight:600; color:var(--text); margin-bottom:8px; }

/* ===== VISTOS RECIENTEMENTE ===== */
.recently-viewed { padding-bottom:0 !important; }
.recently-viewed .cat-section { padding-top:0; }

/* ===== RESPONSIVE ===== */
@media(max-width:900px){
  .repair-banner-inner { grid-template-columns:1fr; gap:48px; }
  .repair-banner-text p { max-width:100%; }
  .filter-bar { padding:20px 20px 0; gap:10px; }
  .filter-right { margin-left:0; }
}
@media(max-width:768px){
  .navbar { padding:0 16px; gap:8px; }
  .navbar nav { display:none; }
  .historial-nav-btn span { display:none; }
  .hero { padding:60px 20px; }
  .catalog-wrap { padding:0 16px 40px; }
  .benefits-section { padding:60px 16px; }
  .repair-banner { padding:60px 20px; }
  .cart-panel { width:100vw; }
  .modal-box { flex-direction:column; max-height:95vh; }
  .modal-gallery-col { width:100%; flex-direction:row; }
  .modal-img-wrap { min-height:220px; flex:1; }
  .gallery-thumbs { flex-direction:column; width:60px; padding:6px; border-top:none; border-left:1px solid var(--border); }
  .gallery-thumb { width:46px; height:46px; }
}
@media(max-width:480px){
  .hero-ctas { flex-direction:column; align-items:center; }
  .hero-stats { flex-wrap:wrap; gap:16px; }
  .stat-div { display:none; }
  .navbar-actions .auth-btn { display:none; }
  .repair-services-grid { grid-template-columns:1fr; }
  .filter-bar { flex-direction:column; align-items:flex-start; }
  .filter-search-wrap { width:100%; }
  .modal-gallery-col { flex-direction:column; }
  .gallery-thumbs { flex-direction:row; width:100%; border-left:none; border-top:1px solid var(--border); }
}

/* ================================================================
   MEJORAS — Digital Zone
   ================================================================ */

/* ---- Oferta badge ---- */
.oferta-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-left: 4px;
}
.price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
  display: block;
  margin-bottom: 2px;
}
.product-price-wrap { display: flex; flex-direction: column; }

/* ---- Precio original en modal ---- */
.modal-orig-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  font-size: 14px;
  color: var(--text-muted);
}
.modal-orig-price del { text-decoration: line-through; }

/* ---- Botón WA consultar en modal ---- */
.modal-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  background: #25d366;
  color: #fff;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.modal-wa-btn:hover { background: #1ebe57; transform: translateY(-1px); }
.modal-wa-btn:active { transform: none; }

/* ---- Card hover mejorado ---- */
.product-card {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.2s ease !important;
}
.product-card:hover {
  transform: translateY(-10px) scale(1.015) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28), 0 0 0 1px var(--border-hover) !important;
}
.product-img-wrap img {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.product-card:hover .product-img-wrap img {
  transform: scale(1.07);
}
.add-btn {
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s !important;
}
.add-btn:hover:not(:disabled) {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(34,197,94,0.35) !important;
}

/* ---- Cart count pulse ---- */
@keyframes cart-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.cart-count.pulse { animation: cart-pulse 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ---- Stagger card entrance ---- */
.will-animate { opacity: 0; transform: translateY(22px); }
.will-animate.animated { opacity: 1; transform: translateY(0); transition: opacity 0.45s ease, transform 0.45s ease; }

/* ---- Search shortcut hint ---- */
#filter-search::placeholder::after { content: " (/)"; }

/* ================================================================
   MOBILE + REVIEWS + PUSH — Digital Zone
   ================================================================ */

/* ---- Bottom Navigation (mobile only) ---- */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: rgba(2, 6, 23, 0.94);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
[data-theme="light"] .bottom-nav {
  background: rgba(248, 250, 252, 0.94);
  border-top: 1px solid rgba(0,0,0,0.08);
}
@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  /* Push page content up so bottom nav doesn't overlap */
  body { padding-bottom: 70px; }
}
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-decoration: none; color: var(--text-muted);
  font-size: 10px; font-family: 'DM Sans', sans-serif; font-weight: 500;
  position: relative; padding: 4px 0; cursor: pointer;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.bn-item:hover, .bn-item.active { color: var(--accent); }
.bn-item svg { transition: transform 0.2s; }
.bn-item:active svg { transform: scale(0.88); }
.bn-cart { color: var(--text-muted); }
.bn-badge {
  position: absolute; top: 0; right: calc(50% - 18px);
  background: var(--green); color: #fff;
  font-size: 9px; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 8px; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* ---- Improved mobile modal ---- */
@media (max-width: 640px) {
  .product-modal { border-radius: 20px 20px 0 0; bottom: 0; top: auto; max-height: 92vh; overflow-y: auto; }
  .modal-gallery { height: 240px; }
  .modal-body { padding: 16px; }
  .modal-actions { flex-wrap: wrap; gap: 8px; }
  .modal-actions .add-btn { flex: 1 1 100%; }
}

/* ---- Swipe indicator on modal ---- */
.modal-content::before {
  content: ""; display: block; width: 36px; height: 4px;
  background: var(--border-hover); border-radius: 2px;
  margin: 8px auto 0;
}
@media (min-width: 641px) { .modal-content::before { display: none; } }

/* ---- Better touch targets ---- */
@media (max-width: 768px) {
  .add-btn, .qty-btn, .fav-btn, .auth-btn, .nav-item { min-height: 44px; }
  .filter-btn { padding: 10px 16px; }
}

/* ---- Reviews Section in Modal ---- */
.modal-reviews-section {
  border-top: 1px solid var(--border);
  margin-top: 20px; padding-top: 16px;
}
.modal-reviews-title {
  font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 12px;
}
.reviews-avg { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.reviews-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.review-item {
  background: var(--surface-hover, rgba(255,255,255,0.03));
  border: 1px solid var(--border); border-radius: 10px; padding: 12px;
}
.review-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.review-name { font-weight: 600; font-size: 13px; color: var(--text); }
.review-comment { font-size: 13px; color: var(--text-sub); margin: 0; line-height: 1.5; }

/* ---- Review Form ---- */
.review-form-inner { display: flex; flex-direction: column; gap: 10px; }
.review-form-label { font-size: 13px; color: var(--text-sub); margin: 0; }
.star-row { display: flex; gap: 6px; }
.star-input {
  font-size: 24px; cursor: pointer; color: var(--text-muted);
  transition: color 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.star-input:hover { color: #fbbf24; transform: scale(1.2); }
#review-comment {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: 13px; resize: vertical; outline: none; transition: border 0.2s;
}
#review-comment:focus { border-color: var(--border-hover); }
.review-submit-btn {
  align-self: flex-start; padding: 9px 18px;
  background: linear-gradient(135deg, var(--green), var(--green-dark, #16a34a));
  color: #fff; border: none; border-radius: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s, transform 0.15s;
}
.review-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ---- Push notification permission button (if shown) ---- */
.push-prompt {
  position: fixed; bottom: 80px; left: 16px; right: 16px; z-index: 150;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.push-prompt-text { flex: 1; font-size: 13px; color: var(--text-sub); }
.push-prompt-text strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.push-yes { padding: 8px 14px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-family: 'DM Sans',sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; }
.push-no { padding: 8px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; }

/* ---- Analytics link in admin sidebar ---- */
.an-sidebar-link { color: var(--accent) !important; }


/* ================================================================
   MOBILE IMPROVEMENTS
   ================================================================ */
@media (max-width: 768px) {
  .whatsapp-float { bottom: 82px; right: 16px; width: 50px; height: 50px; }
}
@media (max-width: 600px) {
  .filter-group {
    display: flex; flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px;
  }
  .filter-group::-webkit-scrollbar { display: none; }
  .filter-group .pill { flex-shrink: 0; }
  #filter-price { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  #filter-price::-webkit-scrollbar { display: none; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card-body { padding: 10px 12px 12px; gap: 5px; }
  .product-card h3 { font-size: 13px; }
  .product-price   { font-size: 16px; }
  .add-btn         { font-size: 12px; padding: 9px 10px; }
  #admin-nav-link  { display: none !important; }
  /* Overflow fixes */
  .filter-bar      { padding: 12px 12px 0; gap: 8px; }
  .filter-group    { max-width: 100%; }
  .trust-inner     { gap: 8px 16px; }
  .trust-badge     { font-size: 12px; padding: 6px 12px; }
  .hero-stats      { gap: 12px; justify-content: center; }
  .repair-banner-inner { padding: 0; }
  .benefits-grid   { gap: 12px; }
  .hist-card-head  { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 600px) {
  .modal-box { width:100vw; max-height:94vh; border-radius:20px 20px 0 0; }
  .modal-overlay { align-items: flex-end; }
  .modal-info-col { padding: 16px; }
  .modal-title { font-size: 20px; }
  .modal-price { font-size: 24px; }
}

/* ================================================================
   BANNER HERO DESTACADO
   ================================================================ */
#hero-banner {
  background: linear-gradient(135deg, rgba(115,222,253,0.07), rgba(34,197,94,0.05));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.hero-banner-inner {
  max-width: 1200px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.hero-banner-text { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-banner-badge {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.hero-banner-text h2 { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }
.hero-banner-text p  { font-size: 13px; color: var(--text-sub); margin: 0; }
.hero-banner-text .btn { padding: 8px 16px; font-size: 13px; white-space: nowrap; }
.hero-banner-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; flex-shrink: 0; padding: 4px 8px;
  border-radius: 6px; transition: background .15s;
}
.hero-banner-close:hover { background: var(--surface-hover); }
@media (max-width: 600px) {
  .hero-banner-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-banner-text  { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ================================================================
   CUPÓN DE DESCUENTO EN CARRITO
   ================================================================ */
.coupon-wrap { margin-bottom: 10px; }
.coupon-row  { display: flex; gap: 8px; }
.coupon-row input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 13px; outline: none;
  transition: border .2s; letter-spacing: 0.05em;
}
.coupon-row input:focus { border-color: var(--border-hover); }
.coupon-row button {
  background: var(--surface-hover); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 14px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 13px; cursor: pointer;
  transition: background .15s; white-space: nowrap;
}
.coupon-row button:hover { background: var(--surface); }

/* ================================================================
   BOTÓN AVISAME
   ================================================================ */
.notify-me-btn {
  width: 100%; padding: 11px; background: transparent;
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text-sub); font-family: 'DM Sans', sans-serif;
  font-size: 14px; cursor: pointer; transition: .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.notify-me-btn:hover { border-color: var(--border-hover); color: var(--text); }
.notify-me-btn:disabled { opacity: .6; cursor: default; }

/* ================================================================
   TRUST BADGES
   ================================================================ */
.trust-section { padding: 32px 24px; border-top: 1px solid var(--border); }
.trust-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px 28px;
}
.trust-badge {
  display: flex; align-items: center; gap: 9px;
  color: var(--text-muted); font-size: 13px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 40px; padding: 8px 16px;
  transition: color .2s, border-color .2s;
}
.trust-badge svg { color: var(--accent); flex-shrink: 0; }
.trust-badge:hover { color: var(--text); border-color: var(--border-hover); }

/* ================================================================
   FAQ SECTION
   ================================================================ */
.faq-section { padding: 64px 24px 72px; border-top: 1px solid var(--border); }
.faq-inner   { max-width: 820px; margin: 0 auto; }
.faq-list    { display: flex; flex-direction: column; gap: 8px; }
.faq-item    {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; transition: border-color .2s;
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px; background: none; border: none;
  cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 15px;
  font-weight: 500; color: var(--text); text-align: left;
}
.faq-icon { font-size: 22px; color: var(--text-muted); flex-shrink: 0; transition: transform .25s; }
.faq-q.open .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .2s ease;
  font-size: 14px; line-height: 1.7; color: var(--text-sub); padding: 0 20px;
}
.faq-a.open { max-height: 200px; padding: 0 20px 16px; }

/* ================================================================
   CART ACCOUNT STRIP
   ================================================================ */
.cart-account-strip {
  margin: 12px 16px 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; padding: 16px;
}
.cas-benefits { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.cas-item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-sub); }
.cas-icon { font-size: 15px; flex-shrink: 0; }
.cas-btn {
  display: block; width: 100%; text-align: center; padding: 11px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff; border-radius: 10px; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: opacity .2s;
}
.cas-btn:hover { opacity: .9; }
.cas-sub { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.cas-sub a { color: var(--text-sub); text-decoration: underline; }
@media (max-width: 480px) {
  .cart-account-strip { margin: 10px 12px 0; padding: 14px; }
  .cas-item { font-size: 12px; }
}

/* ================================================================
   VIEWERS BADGE
   ================================================================ */
@keyframes pulse-dot { 0%,100% { opacity:1; } 50% { opacity:.35; } }

/* ===== CAT SEE-ALL ===== */
.cat-see-all { text-align: center; padding: 10px 0 6px; }
.cat-see-all-btn { background:var(--surface); border:1px solid var(--border); color:var(--accent); font-family:'DM Sans',sans-serif; font-size:13px; font-weight:500; padding:9px 22px; border-radius:40px; cursor:pointer; transition:background .2s,border-color .2s,transform .15s; }
.cat-see-all-btn:hover { background:var(--accent-dim); border-color:var(--border-hover); transform:translateY(-1px); }

/* ===== URGENCY BADGES ===== */
@keyframes urgency-pulse { 0%,100%{opacity:1} 50%{opacity:.65} }
.urgency-badge { display:inline-block; background:rgba(239,68,68,0.15); border:1px solid rgba(239,68,68,0.35); color:#f87171; font-size:10px; font-weight:600; letter-spacing:0.04em; text-transform:uppercase; padding:3px 8px; border-radius:20px; animation:urgency-pulse 2s ease-in-out infinite; }
/* .stock-badge defined above */

/* ===== CART FLASH ===== */
@keyframes cart-flash-anim { 0%{transform:scale(1)} 30%{transform:scale(1.35)} 60%{transform:scale(0.9)} 100%{transform:scale(1)} }
.cart-flash { animation: cart-flash-anim 0.38s ease !important; }

/* ===== MODAL SCALE-IN ===== */
@keyframes modal-scale-in { from{opacity:0;transform:scale(.94) translateY(10px)} to{opacity:1;transform:scale(1) translateY(0)} }
.modal-overlay.open .modal-box { animation: modal-scale-in .22s cubic-bezier(.34,1.56,.64,1) both; }

/* ===== FAQ FIX ===== */
.faq-icon { font-size: 22px; color: var(--text-muted); flex-shrink: 0; transition: transform .3s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-q:hover { color: var(--accent); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 20px; color: var(--text-sub); font-size: 14px; line-height: 1.65;
}
.faq-item.open .faq-a { max-height: 200px; padding: 0 20px 16px; }

/* ===== SCROLL TO TOP ===== */
#scroll-top-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 800;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-sub); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s, background .2s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
#scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
#scroll-top-btn:hover { background: var(--surface-hover); transform: translateY(-2px); }

/* ===== ZOOM EN MODAL ===== */
.modal-img-wrap { overflow: hidden; cursor: zoom-in; }
.modal-img-wrap img { transition: transform .35s ease; transform-origin: center center; }
.modal-img-wrap:hover img { transform: scale(1.55); }
.modal-img-wrap.zoomed { cursor: zoom-out; }
.modal-img-wrap.zoomed img { transform: scale(1.55); }

/* ===== PRODUCTOS RELACIONADOS ===== */
.related-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.related-section h4 { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.related-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; transition: border-color .2s, transform .15s; }
.related-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.related-card-img { height: 72px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.related-card-img img { width: 100%; height: 100%; object-fit: cover; }
.related-card-body { padding: 8px; }
.related-card-name { font-size: 11px; font-weight: 500; line-height: 1.3; margin-bottom: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card-price { font-size: 11px; color: var(--accent); font-weight: 600; }

/* ===== FILTRO PRECIO SLIDER ===== */
.price-slider-wrap { padding: 8px 4px 4px; }
.price-slider-wrap input[type=range] {
  width: 100%; accent-color: var(--accent);
  height: 4px; cursor: pointer;
}
.price-slider-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.price-slider-val { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 4px; }

/* ===== VISTA LISTA / GRILLA ===== */
.view-toggle-wrap { display: flex; align-items: center; gap: 6px; }
.view-btn { background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: .15s; }
.view-btn.active { border-color: var(--border-hover); color: var(--accent); background: var(--accent-dim); }

/* List view cards */
.catalog-list-view .products-grid { display: flex !important; flex-direction: column; gap: 10px; }
.catalog-list-view .product-card { display: grid !important; grid-template-columns: 110px 1fr; min-height: 0; }
.catalog-list-view .product-img-wrap { height: 110px; border-radius: 12px 0 0 12px; }
.catalog-list-view .product-img-wrap img { border-radius: 12px 0 0 12px; }
.catalog-list-view .product-card-body { padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; }
.catalog-list-view .product-card-body h3 { font-size: 14px; margin-bottom: 3px; }
.catalog-list-view .product-card-body p { font-size: 12px; -webkit-line-clamp: 1; }
.catalog-list-view .stock-badge { border-radius: 0 0 0 12px; right: auto; width: auto; padding: 4px 8px; font-size: 10px; }

/* ===== HAMBURGER + MOBILE DRAWER ===== */
.nav-mobile-only { display: none !important; }

.ham-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 36px; height: 36px; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: border-color .2s;
}
.ham-btn:hover { border-color: var(--border-hover); }
.ham-line {
  display: block; width: 16px; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .25s;
}
.ham-btn.open .ham-line:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.ham-btn.open .ham-line:nth-child(2) { opacity: 0; }
.ham-btn.open .ham-line:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-drawer { display: none; position: fixed; inset: 0; z-index: 999; }
.mobile-drawer.open { display: block; }
.mobile-drawer-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.mobile-drawer-panel {
  position: absolute; top: 72px; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--border);
  transform: translateY(-20px); opacity: 0;
  transition: transform .38s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .25s ease;
  display: flex; flex-direction: column;
}
.mobile-drawer.open .mobile-drawer-panel { transform: translateY(0); opacity: 1; }
.mobile-drawer-links { padding: 8px 0; }
.mobile-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px; color: var(--text-sub); font-size: 15px;
  text-decoration: none; border-bottom: 1px solid var(--border);
  transition: background .15s, color .15s;
}
.mobile-nav-link:last-child { border-bottom: none; }
.mobile-nav-link:hover { background: var(--surface-hover); color: var(--text); }
.mobile-nav-link span { font-size: 18px; width: 24px; text-align: center; }
.mobile-nav-highlight { color: var(--accent) !important; font-weight: 600; }
.mobile-nav-admin { color: var(--accent); }
.mobile-drawer-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}

@media (max-width: 768px) {
  .nav-desktop-only { display: none !important; }
  .nav-mobile-only { display: flex !important; }
}

/* ===== ETIQUETAS PERSONALIZADAS ===== */
.product-tags { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:6px; }
.product-tag {
  font-size:10px; font-weight:700; letter-spacing:.6px; text-transform:uppercase;
  padding:2px 8px; border-radius:20px; border:1px solid transparent;
}
.product-tag-nuevo    { background:rgba(74,222,128,0.12); color:#4ade80; border-color:rgba(74,222,128,0.3); }
.product-tag-exclusivo{ background:rgba(168,85,247,0.12); color:#c084fc; border-color:rgba(168,85,247,0.3); }
.product-tag-importado{ background:rgba(56,189,248,0.12); color:#38bdf8; border-color:rgba(56,189,248,0.3); }
.product-tag-oferta   { background:rgba(251,146,60,0.12); color:#fb923c; border-color:rgba(251,146,60,0.3); }
.product-tag-liquidacion{ background:rgba(248,113,113,0.12); color:#f87171; border-color:rgba(248,113,113,0.3); }
.product-tag-custom   { background:rgba(148,163,184,0.12); color:#94a3b8; border-color:rgba(148,163,184,0.3); }

/* ===== CART ITEM VISUAL (resumen con fotos) ===== */
.cart-item { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--border); }
.cart-item:last-child { border-bottom:none; }
.cart-item img { width:54px; height:54px; object-fit:cover; border-radius:10px; flex-shrink:0; border:1px solid var(--border); }
.cart-item-info { flex:1; min-width:0; }
.cart-item-info strong { display:block; font-size:13px; color:var(--text); line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cart-item-info span { font-size:12px; color:var(--accent); font-weight:600; }
.cart-item-controls { display:flex; align-items:center; gap:6px; margin-top:4px; }
.qty-btn { width:22px; height:22px; border-radius:6px; border:1px solid var(--border); background:var(--bg-2); color:var(--text); font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:.15s; }
.qty-btn:hover { border-color:var(--accent); color:var(--accent); }
.qty-num { font-size:13px; font-weight:600; min-width:16px; text-align:center; }
.remove-btn { background:none; border:none; color:var(--text-muted); font-size:14px; cursor:pointer; padding:4px; border-radius:6px; flex-shrink:0; transition:.15s; }
.remove-btn:hover { color:#f87171; background:rgba(248,113,113,0.1); }

/* ===== NOTA AL PEDIDO ===== */
.cart-note-wrap { margin-bottom:10px; }
.cart-note-wrap label { font-size:11px; color:var(--text-muted); font-weight:600; letter-spacing:.5px; text-transform:uppercase; display:block; margin-bottom:4px; }
.cart-note-input {
  width:100%; box-sizing:border-box; padding:8px 10px; font-size:13px;
  background:var(--bg-2); border:1px solid var(--border); border-radius:8px;
  color:var(--text); resize:none; font-family:inherit; line-height:1.4;
  transition:border-color .2s;
}
.cart-note-input:focus { outline:none; border-color:var(--accent); }

/* ===== COMPARTIR CARRITO ===== */
.cart-share-btn {
  display:flex; align-items:center; justify-content:center; gap:6px;
  width:100%; padding:8px; margin-bottom:8px;
  background:none; border:1px solid var(--border); border-radius:10px;
  color:var(--text-sub); font-size:13px; cursor:pointer; transition:.2s;
}
.cart-share-btn:hover { border-color:var(--accent); color:var(--accent); }

/* ===== PULL-TO-REFRESH ===== */
.ptr-indicator {
  display:flex; align-items:center; justify-content:center; gap:8px;
  height:0; overflow:hidden; transition:height .2s ease;
  font-size:13px; color:var(--text-sub); background:var(--bg);
}
.ptr-indicator.visible { height:44px; }
.ptr-spinner {
  width:16px; height:16px; border:2px solid var(--border);
  border-top-color:var(--accent); border-radius:50%;
  animation:spin .6s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }

/* ===== TRANSICIÓN DE PÁGINAS ===== */
body.page-leaving { animation:pageOut .25s ease forwards; }
@keyframes pageOut {
  to { opacity:0; transform:translateY(8px); }
}
body { animation:pageIn .3s ease; }
@keyframes pageIn {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ===== CUENTA ===== */
.cuenta-modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.7);
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  z-index:3000; display:flex; align-items:flex-end;
  opacity:0; pointer-events:none; transition:opacity .25s;
}
.cuenta-modal-overlay.open { opacity:1; pointer-events:all; }
.cuenta-panel {
  background:var(--bg); border-radius:24px 24px 0 0; width:100%; max-width:480px;
  margin:0 auto; max-height:90vh; overflow-y:auto;
  transform:translateY(30px); transition:transform .3s cubic-bezier(0.34,1.56,0.64,1);
  padding:24px 20px 40px;
}
.cuenta-modal-overlay.open .cuenta-panel { transform:translateY(0); }
.cuenta-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.cuenta-header h2 { font-family:'Syne',sans-serif; font-size:20px; font-weight:700; }
.cuenta-close { background:none; border:1px solid var(--border); color:var(--text-sub); width:32px; height:32px; border-radius:50%; cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; transition:.2s; }
.cuenta-close:hover { color:var(--text); border-color:var(--border-hover); }
.cuenta-avatar-wrap { display:flex; flex-direction:column; align-items:center; margin-bottom:20px; }
.cuenta-avatar {
  width:72px; height:72px; border-radius:50%; object-fit:cover;
  border:3px solid var(--accent); cursor:pointer; transition:.2s;
}
.cuenta-avatar:hover { opacity:.85; }
.cuenta-avatar-label { font-size:11px; color:var(--text-muted); margin-top:6px; cursor:pointer; }
.cuenta-section { margin-bottom:20px; }
.cuenta-section-title { font-size:11px; font-weight:700; letter-spacing:.8px; text-transform:uppercase; color:var(--text-muted); margin-bottom:10px; }
.cuenta-field { margin-bottom:10px; }
.cuenta-field label { font-size:12px; color:var(--text-sub); display:block; margin-bottom:4px; }
.cuenta-field input {
  width:100%; box-sizing:border-box; padding:10px 12px;
  background:var(--bg-2); border:1px solid var(--border); border-radius:10px;
  color:var(--text); font-size:14px; font-family:inherit; transition:.2s;
}
.cuenta-field input:focus { outline:none; border-color:var(--accent); }
.cuenta-save-btn {
  width:100%; padding:12px; background:var(--accent); color:#fff;
  border:none; border-radius:12px; font-size:14px; font-weight:600; cursor:pointer;
  transition:.2s; margin-top:4px;
}
.cuenta-save-btn:hover { opacity:.88; }
.cuenta-save-btn:disabled { opacity:.5; cursor:not-allowed; }
.referral-box {
  background:var(--bg-2); border:1px solid var(--border); border-radius:12px;
  padding:14px; display:flex; align-items:center; gap:10px;
}
.referral-code { font-size:18px; font-weight:700; font-family:monospace; letter-spacing:2px; color:var(--accent); flex:1; }
.referral-copy-btn { padding:6px 14px; background:var(--accent); color:#fff; border:none; border-radius:8px; font-size:12px; font-weight:600; cursor:pointer; transition:.2s; }
.referral-copy-btn:hover { opacity:.85; }
.referral-info { font-size:12px; color:var(--text-muted); margin-top:8px; line-height:1.5; }
.cuenta-nav-btn {
  display:flex; align-items:center; justify-content:space-between;
  width:100%; padding:12px 0; background:none; border:none; border-bottom:1px solid var(--border);
  color:var(--text); font-size:14px; cursor:pointer; text-align:left; transition:.15s;
}
.cuenta-nav-btn:hover { color:var(--accent); }
.cuenta-nav-btn:last-child { border-bottom:none; }
