/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: #f4f5f7; color: #1a1a2e; line-height: 1.5; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }

/* ─── Variables ────────────────────────────────────────── */
:root {
  --blue: #0053A6;
  --blue-dark: #003D7A;
  --blue-light: #2E86DE;
  --yellow: #FFC72C;
  --dark: #0B1F3A;
  --dark2: #123A63;
  --danger: #CC0000;
  --gray: #6b7280;
  --gray-light: #e5e7eb;
  --gray-bg: #f4f5f7;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-sm: 6px;
  --transition: .2s ease;
}

/* ─── Container ────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ─── Header Top ───────────────────────────────────────── */
.header-top { background: var(--dark); color: #aaa; font-size: 12px; padding: 6px 0; }
.header-top-inner { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.header-top-actions { display: flex; align-items: center; gap: 12px; }
.top-call-link { color: #fff; font-weight: 600; letter-spacing: .3px; transition: color var(--transition); }
.top-call-link:hover { color: var(--yellow); }
.top-policies-btn { background: none; border: none; color: #aaa; font-size: 12px; cursor: pointer; padding: 0; transition: color var(--transition); }
.top-policies-btn:hover { color: var(--yellow); }
.top-quote-btn { background: var(--blue); border: none; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; padding: 5px 12px; border-radius: 4px; transition: background var(--transition); letter-spacing: .3px; }
.top-quote-btn:hover { background: var(--blue-dark); }

/* ─── Header Main ──────────────────────────────────────── */
.header-main { background: var(--white); border-bottom: 3px solid var(--blue); box-shadow: var(--shadow-md); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 0; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon svg { width: 44px; height: 44px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main { font-size: 13px; font-weight: 500; color: var(--gray); letter-spacing: .5px; }
.logo-sub { font-size: 20px; font-weight: 800; color: var(--blue); letter-spacing: 1px; }

.header-inalco-logo { height: 76px; width: auto; object-fit: contain; flex-shrink: 0; border-right: 1.5px solid var(--gray-light); padding-right: 24px; margin-right: 4px; }
.header-search { flex: 1; }
.search-box { display: flex; background: var(--gray-bg); border: 2px solid var(--gray-light); border-radius: 50px; overflow: hidden; transition: border-color var(--transition); }
.search-box:focus-within { border-color: var(--blue); }
.search-box input { flex: 1; border: none; background: transparent; padding: 10px 16px; font-size: 14px; outline: none; }
.search-btn { background: var(--blue); color: white; padding: 10px 18px; border-radius: 0 50px 50px 0; transition: background var(--transition); }
.search-btn:hover { background: var(--blue-dark); }

.call-btn { display: flex; align-items: center; gap: 6px; background: #16a34a; color: white; padding: 10px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; transition: background var(--transition), transform var(--transition); }
.call-btn:hover { background: #15803d; transform: translateY(-1px); }
.call-label { font-size: 13px; }
.cart-btn { display: flex; align-items: center; gap: 6px; background: var(--blue); color: white; padding: 10px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; transition: background var(--transition), transform var(--transition); position: relative; }
.cart-btn:hover { background: var(--blue-dark); transform: translateY(-1px); }
.cart-badge { background: var(--yellow); color: var(--dark); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 50px; min-width: 20px; text-align: center; }

/* ─── Hero Banner Animado ──────────────────────────────── */
.hero { background: var(--dark); color: white; padding: 32px 0 28px; position: relative; overflow: hidden; border-bottom: 3px solid var(--yellow); }

/* Fondo: carrusel de fotos que rota automáticamente (ver initHeroCarousel en app.js) */
.hero-photos { position: absolute; inset: 0; z-index: 0; }
.hero-photo { position: absolute; inset: 0; background-size: contain; background-repeat: no-repeat; background-position: center; opacity: 0; transition: opacity 1.8s ease; }
.hero-photo.active { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; z-index: 0; background: linear-gradient(100deg, rgba(6,20,40,.90) 15%, rgba(6,20,40,.68) 55%, rgba(6,20,40,.45) 100%); }

/* Fondo decorativo — líneas de velocidad */
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-lines { position: absolute; inset: 0; overflow: hidden; }
.hero-lines span { position: absolute; left: -100%; width: 55%; height: 2px; background: linear-gradient(to right, transparent, rgba(0,83,166,.5), transparent); animation: speedLine 3.5s ease-in-out infinite; border-radius: 2px; }
.hero-lines span:nth-child(1) { top: 18%; animation-delay: 0s; }
.hero-lines span:nth-child(2) { top: 36%; animation-delay: .7s; background: linear-gradient(to right, transparent, rgba(0,56,130,.4), transparent); }
.hero-lines span:nth-child(3) { top: 54%; animation-delay: 1.4s; width: 38%; }
.hero-lines span:nth-child(4) { top: 72%; animation-delay: 2.1s; width: 48%; background: linear-gradient(to right, transparent, rgba(0,83,166,.5), transparent); }
.hero-lines span:nth-child(5) { top: 88%; animation-delay: 2.8s; width: 32%; background: linear-gradient(to right, transparent, rgba(0,56,130,.4), transparent); }

/* Layout dos columnas */
.hero-split { display: grid; grid-template-columns: 1fr 380px; gap: 36px; align-items: center; position: relative; z-index: 1; }

/* Columna izquierda */
.hero-left { animation: heroFadeUp .8s ease both; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border: 1.5px solid rgba(255,255,255,.3); color: var(--yellow); padding: 5px 14px; border-radius: 50px; font-size: 12px; font-weight: 700; letter-spacing: .5px; margin-bottom: 16px; backdrop-filter: blur(2px); }
.hero-title { font-size: 44px; font-weight: 900; line-height: 1.1; margin-bottom: 12px; letter-spacing: -1px; color: white; }
.hero-title span { color: var(--yellow); display: inline-block; animation: pulseBlue 3s ease-in-out infinite; }
.hero-subtitle { color: rgba(255,255,255,.82); font-size: 15px; margin-bottom: 24px; line-height: 1.6; }
.hero-stats { display: flex; gap: 32px; margin-bottom: 28px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 32px; font-weight: 900; color: var(--yellow); line-height: 1; }
.stat-label { font-size: 11px; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .6px; margin-top: 2px; }
.hero-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--yellow); color: var(--dark); padding: 12px 26px; border-radius: var(--radius-sm); font-weight: 700; font-size: 15px; transition: background var(--transition), transform var(--transition), box-shadow var(--transition); box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.hero-cta:hover { background: #e6b325; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.45); }

/* Columna derecha: anillos animados */
.hero-right { display: flex; flex-direction: column; align-items: center; gap: 12px; animation: heroFadeIn 1.1s ease both; }
.hero-logo-wrap { position: relative; display: flex; align-items: center; justify-content: center; width: 360px; height: 312px; }
.hero-logo-ring { position: absolute; border-radius: 50%; }
.hero-logo-ring-1 { width: 324px; height: 324px; border: 2px solid rgba(255,255,255,.3); animation: ringPulse 3s ease-in-out infinite; }
.hero-logo-ring-2 { width: 252px; height: 252px; border: 2px dashed rgba(255,199,44,.4); animation: ringPulse 3s ease-in-out infinite .9s; }
.hero-logo-ring-3 { width: 186px; height: 186px; border: 2px solid rgba(255,255,255,.4); animation: ringPulse 3s ease-in-out infinite 1.8s; }

/* Chispas */
.hero-logo-sparks { position: absolute; inset: 0; pointer-events: none; }
.spark { position: absolute; border-radius: 50%; animation: sparkFly 2.5s ease-in-out infinite; }
.s1 { top: 8%;  left: 48%; width: 8px; height: 8px; background: var(--blue); animation-delay: 0s; }
.s2 { top: 48%; right: 5%; width: 6px; height: 6px; background: #0038a0; animation-delay: .5s; }
.s3 { bottom: 8%;  left: 48%; width: 8px; height: 8px; background: var(--blue); animation-delay: 1s; }
.s4 { top: 48%; left: 5%;  width: 6px; height: 6px; background: #0038a0; animation-delay: 1.5s; }
.s5 { top: 18%; right: 18%; width: 5px; height: 5px; background: var(--yellow); animation-delay: 2s; }
.s6 { bottom: 18%; left: 18%; width: 5px; height: 5px; background: var(--yellow); animation-delay: 2.5s; }

.hero-dealer-label { font-size: 11px; color: rgba(255,255,255,.65); letter-spacing: 2.5px; text-transform: uppercase; font-weight: 600; }

/* Keyframes */
@keyframes gearSpin    { to { transform: rotate(360deg); } }
@keyframes gearSpinRev { to { transform: rotate(-360deg); } }
@keyframes speedLine   { 0% { left: -60%; opacity: 0; } 30% { opacity: 1; } 100% { left: 110%; opacity: 0; } }
@keyframes heroFadeUp  { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroFadeIn  { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes ringPulse   { 0%,100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.07); opacity: 1; } }
@keyframes logoFloat   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes sparkFly    { 0%,100% { transform: scale(1) translateY(0); opacity: .9; } 50% { transform: scale(2) translateY(-10px); opacity: .2; } }
@keyframes pulseBlue    { 0%,100% { text-shadow: none; } 50% { text-shadow: 0 0 20px rgba(0,83,166,.5); } }

/* ─── Main Layout ──────────────────────────────────────── */
.main { padding: 28px 0 48px; }
.layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }

/* ─── Sidebar ──────────────────────────────────────────── */
.sidebar { position: sticky; top: 82px; }
.filter-panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.filter-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; color: var(--dark); }
.filter-group { margin-bottom: 20px; }
.filter-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray); margin-bottom: 8px; }
.filter-options { display: flex; flex-direction: column; gap: 4px; }
.filter-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 4px 6px; border-radius: var(--radius-sm); transition: background var(--transition); }
.filter-check:hover { background: var(--gray-bg); }
.filter-check input[type=checkbox] { accent-color: var(--blue); width: 15px; height: 15px; }
.filter-check .count { margin-left: auto; font-size: 11px; background: var(--gray-light); color: var(--gray); padding: 1px 7px; border-radius: 50px; }
.filter-input { width: 100%; border: 1.5px solid var(--gray-light); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; outline: none; transition: border-color var(--transition); }
.filter-input:focus { border-color: var(--blue); }
.btn-clear { width: 100%; background: var(--gray-bg); color: var(--gray); border: 1.5px solid var(--gray-light); border-radius: var(--radius-sm); padding: 8px; font-size: 13px; font-weight: 600; transition: all var(--transition); }
.btn-clear:hover { border-color: var(--blue); color: var(--blue); background: white; }

/* ─── Catalog Header ───────────────────────────────────── */
.catalog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.catalog-info { font-size: 14px; color: var(--gray); }
.catalog-info strong { color: var(--dark); font-weight: 700; }
.sort-select { border: 1.5px solid var(--gray-light); border-radius: var(--radius-sm); padding: 7px 12px; font-size: 13px; outline: none; background: white; transition: border-color var(--transition); }
.sort-select:focus { border-color: var(--blue); }

/* ─── Product Grid ─────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* ─── Product Card ─────────────────────────────────────── */
.product-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform var(--transition), box-shadow var(--transition); cursor: pointer; border: 1.5px solid transparent; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--blue); }
.product-card.out-of-stock { opacity: .7; }

.card-img { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); height: 160px; display: flex; align-items: center; justify-content: center; position: relative; padding: 16px; overflow: hidden; }
.card-img-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #ccc; }
.card-img-placeholder svg { opacity: .4; }
.card-img-placeholder span { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.card-img-photo { width: 100%; height: 100%; object-fit: contain; }
.card-marca-badge { position: absolute; top: 8px; left: 8px; background: var(--dark); color: white; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 50px; letter-spacing: .5px; }
.card-stock-badge { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 50px; }
.card-stock-badge.in-stock { background: #dcfce7; color: #166534; }
.card-stock-badge.low-stock { background: #fef3c7; color: #92400e; }
.card-stock-badge.out-of-stock { background: #fee2e2; color: #991b1b; }

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-codigo { font-size: 10px; color: var(--gray); font-family: monospace; letter-spacing: .3px; }
.card-title { font-size: 13px; font-weight: 600; color: var(--dark); line-height: 1.35; flex: 1; }
.card-compat { font-size: 11px; color: var(--gray); line-height: 1.3; }
.card-compat span { background: var(--gray-bg); padding: 1px 6px; border-radius: 4px; margin-right: 3px; display: inline-block; margin-bottom: 2px; }

.card-footer { padding: 12px 14px; border-top: 1px solid var(--gray-light); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-price { font-size: 17px; font-weight: 800; color: var(--blue); }
.card-price .currency { font-size: 12px; font-weight: 600; }
.card-add-btn { background: var(--blue); color: white; border-radius: var(--radius-sm); padding: 7px 12px; font-size: 12px; font-weight: 700; transition: background var(--transition); white-space: nowrap; }
.card-add-btn:hover { background: var(--blue-dark); }
.card-add-btn:disabled { background: #ccc; cursor: not-allowed; }
.card-qty-control { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 26px; height: 26px; border-radius: 50%; background: var(--gray-light); color: var(--dark); font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.qty-btn:hover { background: var(--blue); color: white; }
.qty-num { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }

/* ─── No Results ───────────────────────────────────────── */
.no-results { text-align: center; padding: 60px 20px; color: var(--gray); }
.no-results p { margin: 16px 0 24px; font-size: 15px; }

/* ─── Cart Sidebar ─────────────────────────────────────── */
.cart-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200; backdrop-filter: blur(2px); }
.cart-overlay.open { display: block; }
.cart-sidebar { position: fixed; top: 0; right: -420px; width: 400px; max-width: 95vw; height: 100vh; background: white; box-shadow: -4px 0 30px rgba(0,0,0,.15); z-index: 201; display: flex; flex-direction: column; transition: right .3s ease; }
.cart-sidebar.open { right: 0; }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--gray-light); }
.cart-header h2 { font-size: 18px; font-weight: 700; }
.cart-close { color: var(--gray); padding: 4px; border-radius: 4px; transition: color var(--transition), background var(--transition); }
.cart-close:hover { color: var(--blue); background: var(--gray-bg); }
.cart-body { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; color: var(--gray); gap: 12px; font-size: 14px; }
.cart-footer { padding: 16px 20px; border-top: 2px solid var(--gray-light); background: white; }
.cart-subtotal { display: flex; justify-content: space-between; font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.cart-note { font-size: 11px; color: var(--gray); margin-bottom: 14px; }
.btn-checkout { width: 100%; background: var(--blue); color: white; padding: 13px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; margin-bottom: 8px; transition: background var(--transition); }
.btn-checkout:hover { background: var(--blue-dark); }
.btn-clear-cart { width: 100%; background: transparent; color: var(--gray); padding: 8px; font-size: 13px; font-weight: 500; transition: color var(--transition); }
.btn-clear-cart:hover { color: var(--blue); }

/* ─── Cart Item ────────────────────────────────────────── */
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-light); }
.cart-item-img { width: 52px; height: 52px; background: var(--gray-bg); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 2px; }
.cart-item-code { font-size: 11px; color: var(--gray); font-family: monospace; }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cart-item-price { font-size: 14px; font-weight: 700; color: var(--blue); }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button { width: 24px; height: 24px; border-radius: 50%; background: var(--gray-light); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.cart-item-qty button:hover { background: var(--blue); color: white; }
.cart-item-qty span { font-size: 13px; font-weight: 700; min-width: 18px; text-align: center; }
.cart-item-remove { color: var(--gray); padding: 4px; border-radius: 4px; transition: color var(--transition); }
.cart-item-remove:hover { color: var(--blue); }

/* ─── Modal ────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 300; backdrop-filter: blur(3px); }
.modal-overlay.open { display: block; }
.product-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -60%); width: 640px; max-width: 95vw; max-height: 90vh; overflow-y: auto; background: white; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); z-index: 301; opacity: 0; pointer-events: none; transition: transform .3s ease, opacity .3s ease; }
.product-modal.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.modal-close { position: absolute; top: 14px; right: 14px; color: var(--gray); padding: 6px; border-radius: 6px; z-index: 1; background: rgba(255,255,255,.9); transition: color var(--transition), background var(--transition); }
.modal-close:hover { color: var(--blue); background: white; }
.modal-img { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); height: 260px; display: flex; align-items: center; justify-content: center; border-radius: 14px 14px 0 0; overflow: hidden; }
.modal-img img { width: 100%; height: 100%; object-fit: contain; }
.modal-thumbs { display: flex; gap: 8px; padding: 12px 24px 0; overflow-x: auto; }
.modal-thumb { width: 56px; height: 56px; object-fit: contain; background: var(--gray-bg); border-radius: var(--radius-sm); border: 2px solid transparent; cursor: pointer; flex-shrink: 0; transition: border-color var(--transition); }
.modal-thumb:hover { border-color: var(--gray); }
.modal-thumb.active { border-color: var(--blue); }
.modal-body { padding: 24px; }
.modal-marca { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.modal-title { font-size: 22px; font-weight: 800; line-height: 1.2; margin-bottom: 6px; }
.modal-codigo { font-size: 12px; color: var(--gray); font-family: monospace; margin-bottom: 16px; }
.modal-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.modal-price { font-size: 30px; font-weight: 800; color: var(--blue); }
.modal-stock-row { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.modal-stock-label { font-size: 13px; font-weight: 600; }
.modal-stock-num { font-size: 13px; font-weight: 700; }
.modal-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray); margin-bottom: 8px; margin-top: 16px; }
.modal-compat-list { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-compat-tag { background: var(--gray-bg); border: 1px solid var(--gray-light); padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 500; }
.modal-add-row { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--gray-light); }
.modal-qty-control { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--gray-light); border-radius: var(--radius-sm); padding: 6px 10px; }
.modal-qty-control button { width: 28px; height: 28px; border-radius: 50%; background: var(--gray-bg); font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.modal-qty-control button:hover { background: var(--blue); color: white; }
.modal-qty-control span { font-size: 16px; font-weight: 700; min-width: 24px; text-align: center; }
.btn-modal-add { flex: 1; background: var(--blue); color: white; padding: 13px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; transition: background var(--transition); }
.btn-modal-add:hover { background: var(--blue-dark); }
.btn-modal-add:disabled { background: #ccc; cursor: not-allowed; }

/* ─── Toast ────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--dark); color: white; padding: 12px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; transform: translateX(120%); transition: transform .3s ease; pointer-events: auto; }
.toast.show { transform: translateX(0); }
.toast.success { border-left: 3px solid #22c55e; }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--yellow); }

/* ─── Buttons ──────────────────────────────────────────── */
.btn-primary { background: var(--blue); color: white; padding: 10px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; transition: background var(--transition); }
.btn-primary:hover { background: var(--blue-dark); }

/* ─── Ubicación / Mapa ─────────────────────────────────── */
.map-section { background: var(--gray-bg); padding: 48px 0; border-top: 1px solid var(--gray-light); }
.map-header { text-align: center; margin-bottom: 20px; }
.map-title { font-size: 26px; font-weight: 800; color: var(--dark); margin-bottom: 6px; }
.map-address { font-size: 14px; color: var(--gray); }
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); line-height: 0; }
.map-embed iframe { display: block; }
.map-directions-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: fit-content; margin: 20px auto 0; background: var(--blue); color: white; padding: 11px 24px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; transition: background var(--transition); }
.map-directions-btn:hover { background: var(--blue-dark); }

/* ─── Footer ───────────────────────────────────────────── */
.footer { background: var(--dark); color: #9ca3af; padding: 40px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand .logo-main { color: #9ca3af; font-size: 14px; }
.footer-brand .logo-sub { color: var(--blue); font-size: 22px; font-weight: 800; }
.footer-brand p { margin-top: 10px; font-size: 13px; line-height: 1.6; }
.footer-info p { font-size: 13px; margin-bottom: 8px; }
.footer-bottom { padding: 16px 0; font-size: 12px; text-align: center; opacity: .5; }

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero-title { font-size: 30px; }
  .hero-stats { gap: 24px; }
  .stat-num { font-size: 26px; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .header-search { order: 3; flex: 0 0 100%; }
  .cart-label { display: none; }
  .hero-title { font-size: 26px; }
  .header-top-inner { flex-direction: column; gap: 2px; font-size: 11px; }
}

/* ─── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-bg); }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ─── Skeleton loader ──────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Cart Buttons ─────────────────────────────────────── */
.btn-wa-cart { width: 100%; background: #25d366; color: white; padding: 11px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 7px; transition: background var(--transition); }
.btn-wa-cart:hover { background: #1ebe5a; }

/* ─── Logo Slider ──────────────────────────────────────────── */
.logo-slider { background: white; border-top: 1px solid var(--gray-light); border-bottom: 3px solid var(--blue); overflow: hidden; padding: 8px 0; position: relative; }
.logo-slider::before,
.logo-slider::after { content: ''; position: absolute; top: 0; width: 80px; height: 100%; z-index: 2; pointer-events: none; }
.logo-slider::before { left: 0; background: linear-gradient(to right, white 0%, transparent 100%); }
.logo-slider::after  { right: 0; background: linear-gradient(to left, white 0%, transparent 100%); }
.logo-slider-track { overflow: hidden; width: 100%; }
.logo-slider-inner { display: flex; align-items: center; width: max-content; animation: logoScroll 28s linear infinite; }
.logo-slider-inner:hover { animation-play-state: paused; }
.logo-slide { display: flex; align-items: center; justify-content: center; padding: 6px 32px; border-right: 1px solid #f0f0f0; flex-shrink: 0; min-width: 160px; }
.logo-slide-inner { display: flex; align-items: center; justify-content: center; height: 60px; }
.logo-slide svg { height: 52px; width: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,.06)); transition: filter .2s; }
.logo-slide:hover svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,.15)); }
.logo-slide-accent .logo-slide-inner { opacity: .35; }
.logo-img { height: 56px; width: auto; max-width: 200px; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0,0,0,.08)); transition: filter .2s, transform .2s; }
.logo-slide:hover .logo-img { filter: drop-shadow(0 2px 8px rgba(0,0,0,.18)); transform: scale(1.04); }
.logo-slide-dark { background: #111; border-radius: 10px; padding: 4px 24px; border-right: none; margin: 0 16px; }
.logo-slide-dark .logo-img { height: 64px; filter: none; }
@keyframes logoScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ─── Model Tags Bar ───────────────────────────────────── */
.model-tags-bar { background: white; border-bottom: 1px solid var(--gray-light); padding: 10px 0; overflow: hidden; }
.model-tags-inner { display: flex; align-items: center; gap: 12px; }
.model-tags-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray); white-space: nowrap; flex-shrink: 0; }
.model-tags-scroll { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.model-tags-scroll::-webkit-scrollbar { display: none; }
.model-tag { background: var(--gray-bg); border: 1.5px solid var(--gray-light); color: var(--dark); padding: 5px 13px; border-radius: 50px; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all var(--transition); flex-shrink: 0; }
.model-tag:hover, .model-tag.active { background: var(--blue); border-color: var(--blue); color: white; }

/* ─── Outlet Section ───────────────────────────────────── */
.outlet-section { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); padding: 40px 0; margin-top: 20px; }
.outlet-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.outlet-title-block { display: flex; flex-direction: column; gap: 4px; }
.outlet-badge { display: inline-block; background: var(--yellow); color: var(--dark); font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 50px; letter-spacing: 1px; width: fit-content; }
.outlet-title { font-size: 26px; font-weight: 800; color: white; }
.outlet-subtitle { color: #9ca3af; font-size: 14px; }
.outlet-empty { text-align: center; padding: 40px; color: #6b7280; font-size: 14px; }
.outlet-section .product-card { border-color: rgba(245,166,35,.3); }
.outlet-section .product-card:hover { border-color: var(--yellow); }
.card-outlet-badge { position: absolute; bottom: 8px; right: 8px; background: var(--yellow); color: var(--dark); font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 50px; }
.price-original { font-size: 12px; color: var(--gray); text-decoration: line-through; margin-left: 4px; }


/* ─── Order Modal ──────────────────────────────────────── */
.order-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -60%); width: 680px; max-width: 96vw; max-height: 92vh; overflow-y: auto; background: white; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); z-index: 301; opacity: 0; pointer-events: none; transition: transform .3s ease, opacity .3s ease; }
.order-modal.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.order-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--gray-light); position: sticky; top: 0; background: white; z-index: 1; }
.order-modal-header h2 { font-size: 19px; font-weight: 700; }
.order-modal-body { padding: 20px 24px 28px; }
.form-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gray); margin: 18px 0 10px; border-top: 1px solid var(--gray-light); padding-top: 18px; }
.form-section-title:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--dark); }
.req { color: var(--danger); }
.form-group input, .form-group textarea, .form-group select { border: 1.5px solid var(--gray-light); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 14px; outline: none; font-family: inherit; transition: border-color var(--transition); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--blue); }
.form-group input.error, .form-group textarea.error { border-color: #ef4444; }
.form-error { font-size: 11px; color: #ef4444; min-height: 14px; }
.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.delivery-option { cursor: pointer; }
.delivery-option input[type=radio] { display: none; }
.delivery-option-box { border: 2px solid var(--gray-light); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transition: border-color var(--transition), background var(--transition); }
.delivery-option-box span { font-size: 13px; font-weight: 600; }
.delivery-option-box small { font-size: 11px; color: var(--gray); }
.delivery-option input:checked + .delivery-option-box { border-color: var(--blue); background: #eaf2ff; }
.order-summary-box { background: var(--gray-bg); border-radius: var(--radius); padding: 14px; margin-top: 8px; font-size: 13px; }
.order-summary-box .sum-item { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed #e5e7eb; }
.order-summary-box .sum-total { display: flex; justify-content: space-between; padding: 8px 0 0; font-weight: 700; font-size: 15px; }
.form-actions { margin-top: 18px; }
.btn-submit-order { width: 100%; background: var(--blue); color: white; padding: 14px; border-radius: var(--radius-sm); font-size: 16px; font-weight: 700; transition: background var(--transition); }
.btn-submit-order:hover { background: var(--blue-dark); }

/* ─── Call Lead Modal ──────────────────────────────────── */
.call-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -60%); width: 420px; max-width: 95vw; background: white; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); z-index: 301; opacity: 0; pointer-events: none; transition: transform .3s ease, opacity .3s ease; padding: 32px 28px 28px; text-align: center; }
.call-modal.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.call-modal-icon { width: 72px; height: 72px; background: #16a34a; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.call-modal h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.call-modal p { font-size: 13px; color: var(--gray); margin-bottom: 20px; }
.call-modal .form-group { text-align: left; }
.call-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.btn-call-direct { background: #16a34a; color: white; padding: 11px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background var(--transition); }
.btn-call-direct:hover { background: #15803d; }
.btn-call-direct.small { padding: 8px 14px; font-size: 13px; }
.btn-call-register { background: var(--blue); color: white; padding: 11px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; transition: background var(--transition); }
.btn-call-register:hover { background: var(--blue-dark); }

/* ─── Policies Modal ───────────────────────────────────── */
.policies-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -60%); width: 700px; max-width: 96vw; max-height: 90vh; overflow-y: auto; background: white; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); z-index: 301; opacity: 0; pointer-events: none; transition: transform .3s ease, opacity .3s ease; padding: 32px; }
.policies-modal.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.policies-content h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.policies-subtitle { font-size: 13px; color: var(--gray); margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-light); }
.policy-block { margin-bottom: 20px; }
.policy-block h3 { font-size: 15px; font-weight: 700; color: var(--blue); margin-bottom: 6px; }
.policy-block p { font-size: 13px; line-height: 1.65; color: #374151; }
.policy-block ul { margin-left: 16px; font-size: 13px; line-height: 1.8; color: #374151; }
.policies-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--gray-light); }
.sernac-link { font-size: 13px; color: var(--blue); font-weight: 600; }
.sernac-link:hover { text-decoration: underline; }

/* ─── Footer Links ─────────────────────────────────────── */
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link-btn { background: none; border: none; color: #9ca3af; font-size: 13px; cursor: pointer; text-align: left; padding: 0; transition: color var(--transition); font-family: inherit; }
.footer-link-btn:hover { color: var(--yellow); }

/* ─── Responsive new elements ──────────────────────────── */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .call-modal-actions { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .call-label { display: none; }
  .delivery-options { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .header-top-actions { gap: 6px; }
  .top-policies-btn { display: none; }
}

/* ─── Quote Modal ───────────────────────────────────────── */
.quote-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.95); width: 90%; max-width: 700px; max-height: 90vh; overflow-y: auto; background: white; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.25); z-index: 1001; opacity: 0; pointer-events: none; transition: all .25s ease; }
.quote-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.quote-intro { font-size: 13px; color: var(--gray); margin-bottom: 20px; line-height: 1.5; background: #f8f9ff; border-left: 3px solid var(--blue); padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.form-hint { display: block; font-size: 11px; color: #9ca3af; margin-top: 3px; }

/* ─── Receipt Modal ─────────────────────────────────────── */
.receipt-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.95); width: 90%; max-width: 520px; background: white; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.25); z-index: 1001; opacity: 0; pointer-events: none; transition: all .3s ease; overflow: hidden; }
.receipt-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.receipt-header { background: linear-gradient(135deg, var(--dark) 0%, #1a2a1a 100%); color: white; text-align: center; padding: 32px 24px 24px; }
.receipt-check { width: 56px; height: 56px; background: #16a34a; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 14px; box-shadow: 0 4px 16px rgba(22,163,74,.4); }
.receipt-header h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.receipt-sub { color: #9ca3af; font-size: 13px; }
.receipt-body { padding: 24px; }
.receipt-code-block { text-align: center; background: #f8f9fa; border: 1.5px dashed var(--gray-light); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 20px; }
.receipt-code-label { display: block; font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.receipt-code { font-size: 20px; font-weight: 900; color: var(--dark); letter-spacing: 2px; font-family: monospace; }
.receipt-qr-section { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 20px; }
.receipt-qr-section > div { border: 2px solid var(--gray-light); border-radius: var(--radius-sm); padding: 10px; background: white; }
.receipt-qr-hint { font-size: 12px; color: var(--gray); text-align: center; }
.receipt-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 13px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--gray-light); }
.receipt-info-grid span:nth-child(odd) { color: var(--gray); font-size: 12px; }
.receipt-info-grid span:nth-child(even) { font-weight: 600; }
.receipt-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.receipt-item { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.receipt-item span:last-child { font-weight: 700; color: var(--dark); }
.receipt-total { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; background: #eaf2ff; border: 1.5px solid rgba(0,83,166,.2); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--blue); }
.receipt-footer { display: flex; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--gray-light); background: #fafafa; }
.receipt-footer .btn-primary { flex: 1; }
.btn-print { background: white; border: 1.5px solid var(--gray-light); color: var(--gray); padding: 10px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.btn-print:hover { border-color: var(--dark); color: var(--dark); }
@media print {
  body > *:not(.receipt-modal) { display: none !important; }
  .receipt-modal { position: static; transform: none; box-shadow: none; opacity: 1; pointer-events: auto; width: 100%; max-width: 100%; }
  .receipt-footer { display: none; }
}