/* ==========================================================
   FA EXPRESS — Tienda online (estética oscura original)
   ========================================================== */
:root {
    --primary: #1561F0;
    --primary-dark: #0051D5;
    --accent: #5AC8FA;
    --bg: #131313;
    --bg-2: #0d0d0d;
    --surface: #2B2B2B;
    --surface-2: #1f1f1f;
    --border: rgba(134, 134, 139, 0.2);
    --border-strong: rgba(134, 134, 139, 0.35);
    --text: #ffffff;
    --muted: #86868B;
    --ok: #34C759;
    --warn: #FF9500;
    --danger: #FF3B30;
    --wa: #25D366;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.45);
    --transition: all .3s cubic-bezier(.4, 0, .2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --header-h: 80px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--primary); color: #fff; }

.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.grow { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.highlight-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    display: inline-block;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 12px 28px;
    border: 1px solid transparent; border-radius: 980px;
    font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center;
    background: var(--surface); color: var(--text);
    transition: var(--transition);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(21, 97, 240, .3); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 8px 20px rgba(21, 97, 240, .4); }
.btn-dark { background: #fff; color: #131313; }
.btn-dark:hover { background: #e8e8ed; }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-outline-light { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #1fb855; box-shadow: 0 8px 20px rgba(37, 211, 102, .3); }
.btn-link { background: none; color: var(--muted); min-height: 36px; }
.btn-link:hover { color: #fff; transform: none; }
.btn-sm { min-height: 40px; padding: 10px 18px; font-size: 13px; }
.btn-lg { min-height: 54px; padding: 16px 38px; font-size: 16px; font-weight: 700; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); color: #fff; font-size: 1rem; transition: var(--transition); }
.icon-btn:hover { background: #3a3a3a; }

/* ---------- Header ---------- */
.topbar { background: linear-gradient(90deg, var(--primary-dark), var(--primary)); color: #fff; font-size: 13px; font-weight: 600; text-align: center; padding: 8px 16px; }
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(19, 19, 19, .95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 14px; min-height: var(--header-h); flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; margin-right: auto; }
.brand img { width: auto; height: 46px; filter: drop-shadow(0 3px 15px rgba(21, 97, 240, .6)); transition: var(--transition); }
.brand:hover img { transform: scale(1.05); filter: drop-shadow(0 6px 25px rgba(21, 97, 240, .8)); }
.header-search { order: 3; flex: 1 1 100%; display: flex; position: relative; }
.header-search input {
    width: 100%; height: 44px; padding: 0 48px 0 20px;
    border-radius: 25px; border: 1px solid rgba(134, 134, 139, .3);
    background: var(--surface); color: #fff; font: inherit; font-size: 14px; transition: var(--transition);
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21, 97, 240, .15); }
.header-search button { position: absolute; right: 5px; top: 5px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; }
.header-nav { display: none; gap: 30px; }
.header-nav a { color: var(--muted); font-size: 14px; font-weight: 500; position: relative; transition: var(--transition); }
.header-nav a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background: var(--primary); transition: var(--transition); }
.header-nav a:hover { color: #fff; }
.header-nav a:hover::after { width: 100%; }
.cart-toggle {
    position: relative; height: 44px; padding: 0 18px; border-radius: 22px; border: 0;
    background: var(--primary); color: #fff; display: flex; align-items: center; gap: 8px; transition: var(--transition);
}
.cart-toggle:hover { background: var(--primary-dark); transform: translateY(-2px); }
.cart-badge {
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
    background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(calc(100vh - var(--header-h)), 820px); min-height: min(calc(100svh - var(--header-h)), 820px); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; animation: slowZoom 30s ease-in-out infinite alternate; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(19, 19, 19, .95) 0%, rgba(2, 2, 2, .35) 50%, rgba(19, 19, 19, .95) 100%); }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(transparent, var(--bg)); z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; padding-top: 60px; padding-bottom: 110px; animation: fadeInUp 1s ease-out; }
.hero-badge {
    display: inline-block; padding: 10px 24px; margin-bottom: 30px;
    background: rgba(21, 97, 240, .2); border: 1px solid rgba(21, 97, 240, .5); border-radius: 50px;
    font-size: 14px; font-weight: 600; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out .2s both;
}
.hero-title { font-size: clamp(2.6rem, 9vw, 4.5rem); font-weight: 900; letter-spacing: -2px; line-height: 1.1; margin-bottom: 26px; animation: fadeInUp 1s ease-out .3s both; }
.hero-subtitle { font-size: clamp(1rem, 2.4vw, 1.25rem); color: rgba(255, 255, 255, .8); margin-bottom: 42px; animation: fadeInUp 1s ease-out .4s both; }
.br-desktop { display: none; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 48px; animation: fadeInUp 1s ease-out .5s both; }
.hero-features { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 36px; animation: fadeInUp 1s ease-out .6s both; }
.hero-features li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .9); font-size: 15px; font-weight: 500; }
.feature-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(21, 97, 240, .3); border: 1px solid rgba(21, 97, 240, .5); color: var(--primary); font-size: 14px; font-weight: 700; }
.scroll-indicator {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: rgba(255, 255, 255, .6); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
    animation: bounce 2s ease-in-out infinite;
}
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-10px); } }

/* ---------- Beneficios ---------- */
.trust { background: var(--bg); position: relative; z-index: 2; }
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 10px; padding-bottom: 20px; }
.trust-item { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; transition: var(--transition); }
.trust-item strong { line-height: 1.25; }
.trust-item span { line-height: 1.4; }
@media (min-width: 640px) {
    .trust-grid { gap: 14px; }
    .trust-item { flex-direction: row; align-items: center; gap: 14px; padding: 18px; }
}
.trust-item:hover { border-color: var(--primary); transform: translateY(-3px); }
.trust-item svg { color: var(--primary); flex-shrink: 0; }
.trust-item strong { display: block; font-size: 14px; }
.trust-item span { font-size: 12px; color: var(--muted); }

/* ---------- Secciones ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; letter-spacing: -1px; margin: 0; }
.section-head-center { justify-content: center; text-align: center; margin-bottom: 44px; }
.link-more { color: var(--primary); font-weight: 600; font-size: 14px; white-space: nowrap; }

/* ---------- Categorías ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cat-card {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
    aspect-ratio: 4 / 3; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
    padding: 16px; transition: var(--transition);
}
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: var(--transition); }
.cat-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(13, 13, 13, .92)); }
.cat-card span, .cat-card small { position: relative; z-index: 1; }
.cat-card span { font-weight: 700; font-size: 16px; }
.cat-card small { color: var(--accent); font-size: 12px; font-weight: 600; }
.cat-card:hover { border-color: var(--primary); transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.cat-card:hover img { opacity: .8; transform: scale(1.08); }

/* ---------- Toolbar catálogo ---------- */
.toolbar { display: grid; gap: 16px; margin-bottom: 18px; }
.chips { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 4px 20px 8px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0; padding: 10px 22px; border-radius: 20px; border: 1px solid var(--border);
    background: var(--surface); color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; transition: var(--transition);
}
.chip:hover, .chip.is-active { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(21, 97, 240, .3); }
.toolbar-right { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.input, .field input, .field select, .field textarea {
    width: 100%; min-height: 46px; padding: 11px 18px;
    border: 1px solid rgba(134, 134, 139, .3); border-radius: 23px;
    background: var(--surface); color: #fff; font: inherit; font-size: 14px; transition: var(--transition);
}
.field textarea { border-radius: 16px; resize: vertical; }
select.input, .field select {
    appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2386868B' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21, 97, 240, .15); }
.results-count { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 22px; }

/* ---------- Tarjetas de producto ---------- */
/* Panel contenedor estilo listado de Mercado Libre, en modo oscuro */
.ml-panel {
    position: relative; background: linear-gradient(180deg, #1c1c1f 0%, #18181a 100%); color: #fff;
    border: 1px solid rgba(255, 255, 255, .06); border-radius: 16px; padding: 12px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 50px rgba(0, 0, 0, .45);
}
.ml-panel .empty-state { color: var(--muted); }
.product-grid { --gap: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.product-grid-scroll { grid-auto-flow: column; grid-auto-columns: calc((100% - var(--gap)) / 2); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 4px; margin: -4px; }
.product-grid-scroll::-webkit-scrollbar { display: none; }
.product-grid-scroll .card { scroll-snap-align: start; }

/* Ficha pareja: foto cuadrada que llena el recuadro + datos abajo */
.card {
    position: relative; display: flex; flex-direction: column; min-width: 0;
    background: var(--surface); border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; overflow: hidden;
    transition: box-shadow .25s, transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(21, 97, 240, .7); box-shadow: 0 14px 30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(21, 97, 240, .35), 0 0 24px rgba(21, 97, 240, .18); z-index: 1; }
.card-link { display: flex; flex-direction: column; height: 100%; color: #fff; }
.card-media { position: relative; display: block; aspect-ratio: 1; background: var(--bg-2); overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-media::after { content: ''; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, rgba(0, 0, 0, .25)); pointer-events: none; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 14px; flex: 1; }
.card-title {
    font-size: 14px; font-weight: 400; line-height: 1.35; color: rgba(255, 255, 255, .88); margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em;
    transition: color .2s;
}
.card:hover .card-title { color: #6fa0ff; }
.card-old { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.card-old s { color: var(--muted); }
.card-off { background: rgba(52, 199, 89, .16); color: #4cd77a; border: 1px solid rgba(52, 199, 89, .35); font-weight: 700; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.card-price { font-size: 24px; font-weight: 500; color: #fff; line-height: 1.15; letter-spacing: -.3px; }
.card-price .cur { margin-right: 4px; color: rgba(255, 255, 255, .85); }
.card-price sup { font-size: 12px; margin-left: 1px; }
.card-consult { font-size: 15px; font-weight: 600; white-space: nowrap; color: #6fa0ff; }
@media (min-width: 640px) { .card-consult { font-size: 16px; } }
.card-sold { font-size: 12px; color: var(--muted); }
.card-tag { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; margin-top: 4px; }
.card-tag-low { color: #4cd77a; background: rgba(52, 199, 89, .14); }
.card-tag-out { color: var(--muted); background: rgba(255, 255, 255, .06); }
.card-add {
    position: absolute; top: 10px; right: 10px; z-index: 2; height: 38px; min-width: 38px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 0; border-radius: 19px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600;
    box-shadow: 0 4px 14px rgba(21, 97, 240, .5); transition: transform .15s, background .15s, opacity .2s;
}
.card-add span { display: none; }
.card-add:hover { background: var(--primary-dark); transform: scale(1.05); }

.carousel-arrow {
    position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12); background: rgba(43, 43, 43, .95); color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .5); display: none; place-items: center; transition: transform .15s, background .15s;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.carousel-arrow:hover { transform: scale(1.08); background: var(--primary); border-color: var(--primary); }
.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }

.badge { display: inline-block; padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 600; color: #fff; background: var(--primary); backdrop-filter: blur(10px); }
.badge-sale { background: var(--danger); }
.badge-warn { background: var(--warn); }
.badge-dark { background: rgba(0, 0, 0, .75); }
.badge-featured { background: var(--ok); }
.card-cat { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--primary); }
.price-consult { font-weight: 600; color: var(--muted); font-size: 15px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- Pasos / FAQ ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: var(--transition); }
.steps li:hover { border-color: var(--primary); transform: translateY(-4px); }
.steps h3 { font-size: 18px; margin: 16px 0 8px; }
.steps p { color: var(--muted); margin: 0; font-size: 15px; }
.step-n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(21, 97, 240, .2); border: 1px solid rgba(21, 97, 240, .5); color: #fff; font-weight: 700; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 22px; transition: border-color .2s; }
.faq details[open] { border-color: rgba(21, 97, 240, .5); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 30px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 13px; font-size: 24px; font-weight: 300; color: var(--primary); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); color: var(--muted); padding: 56px 0 0; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 36px; }
.site-footer h3 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.site-footer a { transition: color .2s; }
.site-footer a:hover { color: #fff; }
.brand-footer { margin-bottom: 16px; display: inline-flex; }
.site-footer .muted { font-size: 14px; max-width: 380px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 20px; padding-bottom: 90px; font-size: 13px; }

.wa-float {
    position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%;
    background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(37, 211, 102, .4); transition: var(--transition);
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Carrito (drawer) ---------- */
.cart-drawer { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.cart-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.cart-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(430px, 100%);
    background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-xl);
}
.cart-drawer.is-open { pointer-events: auto; }
.cart-drawer.is-open .cart-backdrop { opacity: 1; }
.cart-drawer.is-open .cart-panel { transform: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.cart-head h2 { font-size: 20px; margin: 0; }
.cart-head .icon-btn { background: var(--bg); }
.cart-items { flex: 1; overflow-y: auto; padding: 6px 20px; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); align-items: start; }
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; background: var(--bg); }
.cart-item-info { display: grid; gap: 4px; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.cart-item-name:hover { color: var(--primary); }
.cart-item-price { color: var(--muted); font-size: 13px; }
.cart-item-side { display: grid; justify-items: end; gap: 8px; font-size: 15px; }
.link-remove { border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; padding: 0; }
.link-remove:hover { color: var(--danger); }
.cart-foot { padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: grid; gap: 10px; background: var(--surface-2); }
.cart-total-row { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total-row strong { font-size: 24px; }
.cart-foot .muted { margin: 0; }
.cart-empty { display: grid; justify-items: center; gap: 14px; padding: 70px 0; color: var(--muted); text-align: center; }
.free-ship { background: rgba(21, 97, 240, .12); border: 1px solid rgba(21, 97, 240, .35); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; }
.free-ship .bar { display: block; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); margin-top: 8px; overflow: hidden; }
.free-ship .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: inherit; transition: width .3s; }

.qty { display: inline-flex; align-items: center; border: 1px solid rgba(134, 134, 139, .3); border-radius: 999px; height: 54px; overflow: hidden; background: var(--bg); }
.qty button { width: 46px; height: 100%; border: 0; background: none; color: #fff; font-size: 20px; transition: background .2s; }
.qty button:hover:not(:disabled) { background: var(--primary); }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty input { width: 44px; border: 0; text-align: center; font: inherit; font-weight: 700; color: #fff; background: none; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 32px; width: max-content; }
.qty-sm button { width: 32px; font-size: 16px; }
.qty-sm span { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }

/* ---------- Toasts ---------- */
.toast-zone { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--ok); color: #fff; padding: 14px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-xl); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; }
.toast.is-in { opacity: 1; transform: none; }
.toast-err { border-left-color: var(--danger); }

/* ---------- Ficha de producto ---------- */
.product-page { padding-top: 24px; padding-bottom: 48px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current] { color: #fff; font-weight: 500; }
.pdp { display: grid; gap: 28px; }
.pdp-gallery { width: 100%; max-width: 380px; margin: 0 auto; }
.pdp-main { position: relative; aspect-ratio: 1; background: var(--bg-2); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.pdp-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.pdp-main:hover img { transform: scale(1.04); }
.pdp-badge { position: absolute; top: 16px; right: 16px; font-size: 13px; }
.pdp-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.pdp-thumb { width: 76px; height: 76px; flex-shrink: 0; border: 2px solid var(--border); border-radius: 12px; background: var(--bg-2); padding: 0; overflow: hidden; transition: border-color .2s; }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb:hover { border-color: rgba(255, 255, 255, .3); }
.pdp-thumb.is-active { border-color: var(--primary); }
.pdp-info h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 800; letter-spacing: -1px; margin: 8px 0 14px; }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.pdp-price strong { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -1px; }
.pdp-price s { color: var(--muted); font-size: 18px; }
.pdp-stock { display: inline-block; font-weight: 600; font-size: 13px; color: var(--ok); background: rgba(52, 199, 89, .12); padding: 6px 14px; border-radius: 20px; margin-bottom: 24px; }
.pdp-stock.is-low { color: var(--warn); background: rgba(255, 149, 0, .12); }
.pdp-stock.is-out { color: var(--danger); background: rgba(255, 59, 48, .12); }
.pdp-buy { display: flex; gap: 10px; margin-bottom: 12px; }
.pdp-buy .btn-lg { padding-left: 16px; padding-right: 16px; white-space: nowrap; }
@media (max-width: 380px) { .pdp-buy .btn-lg { font-size: 14px; } .qty button { width: 40px; } .qty input { width: 34px; } }
.pdp-wa-link { display: block; text-align: center; color: var(--wa); font-weight: 600; font-size: 14px; margin: 16px 0 4px; }
.pdp-wa-link:hover { text-decoration: underline; }
.pdp-perks { list-style: none; padding: 18px 20px; margin: 24px 0; display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; font-size: 14px; color: var(--muted); }
.pdp-perks li { display: flex; gap: 10px; align-items: baseline; }
.pdp-perks li::before { content: '✓'; flex-shrink: 0; width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; background: rgba(21, 97, 240, .3); border: 1px solid rgba(21, 97, 240, .5); color: var(--primary); font-size: 11px; font-weight: 700; }
.pdp-perks strong { color: #fff; }
.pdp-desc h2 { font-size: 18px; }
.pdp-desc p { color: rgba(255, 255, 255, .75); }

.sticky-buy {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: rgba(31, 31, 31, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); transform: translateY(110%); transition: transform .25s;
}
.sticky-buy.is-visible { transform: none; }
.sticky-buy > div { display: grid; min-width: 0; }
.sticky-buy span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-buy strong { font-size: 18px; }
body:has(.sticky-buy.is-visible) .wa-float { bottom: 90px; }

/* ---------- Checkout ---------- */
.checkout-page { padding-top: 32px; padding-bottom: 56px; }
.checkout-page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -1px; }
.checkout { display: grid; gap: 20px; }
.checkout-main { display: grid; gap: 20px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; min-width: 0; }
fieldset.panel { margin: 0; }
.panel legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; margin-bottom: 18px; padding: 0; }
.panel legend + * { clear: both; }
.panel legend .step-n { width: 32px; height: 32px; font-size: 14px; }
.panel h2 { font-size: 18px; }
.grid-2 { display: grid; gap: 14px; margin-bottom: 14px; }
.field { display: grid; gap: 8px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { background: var(--bg); }
.hp { position: absolute; left: -9999px; }
.options { display: grid; gap: 10px; margin-bottom: 18px; }
.option {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
    padding: 16px 18px; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--bg); cursor: pointer; transition: var(--transition);
}
.option:hover { border-color: rgba(21, 97, 240, .6); }
.option:has(input:checked) { border-color: var(--primary); background: rgba(21, 97, 240, .1); box-shadow: 0 0 0 1px var(--primary); }
.option input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
.option-body { display: grid; gap: 2px; }
.option-body strong { font-size: 15px; }
.option-body small { color: var(--muted); font-size: 12px; }
.option-price { font-weight: 700; font-size: 14px; text-align: right; }
@media (max-width: 639px) {
    /* En celular el precio/etiqueta pasa debajo del nombre para no apretar el texto */
    .option { grid-template-columns: auto 1fr; gap: 6px 14px; padding: 14px; }
    .option input { grid-row: span 2; align-self: start; margin-top: 2px; }
    .option-price, .option-tag { grid-column: 2; justify-self: start; text-align: left; }
    .option-price { color: #6fa0ff; }
}
.option-tag { font-size: 11px; font-weight: 700; background: var(--primary); color: #fff; padding: 4px 10px; border-radius: 999px; }
.alert { background: rgba(255, 149, 0, .12); border: 1px solid rgba(255, 149, 0, .4); color: #ffc46b; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.checkout-summary h2 { font-size: 20px; }
.summary-items { display: grid; gap: 14px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.summary-item { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.summary-thumb { position: relative; width: 54px; height: 54px; border-radius: 12px; background: var(--bg); }
.summary-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.summary-thumb b { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }
.summary-name { line-height: 1.3; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; color: rgba(255, 255, 255, .85); }
.summary-total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px; color: #fff; }
.summary-total strong { font-size: 26px; }
.form-error { background: rgba(255, 59, 48, .12); border: 1px solid rgba(255, 59, 48, .4); color: #ff8a84; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; margin: 14px 0 0; }
.checkout-summary .btn { margin-top: 16px; }

/* ---------- Pedido ---------- */
.order-page { padding-top: 32px; padding-bottom: 56px; display: grid; gap: 20px; }
.order-hero { text-align: center; padding: 40px 22px; }
.order-hero h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; }
.order-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; font-size: 30px; font-weight: 800; background: rgba(52, 199, 89, .15); border: 1px solid rgba(52, 199, 89, .5); color: var(--ok); }
.order-icon-pendiente { background: rgba(255, 149, 0, .15); border-color: rgba(255, 149, 0, .5); color: var(--warn); }
.order-icon-cancelado { background: rgba(255, 59, 48, .15); border-color: rgba(255, 59, 48, .5); color: var(--danger); }
.order-code { font-size: 15px; }
.order-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.order-grid { display: grid; gap: 20px; }
.status { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .08); }
.status-pagado, .status-preparando { background: rgba(21, 97, 240, .2); color: #6fa0ff; }
.status-enviado, .status-entregado { background: rgba(52, 199, 89, .18); color: var(--ok); }
.status-pendiente { background: rgba(255, 149, 0, .18); color: var(--warn); }
.status-cancelado { background: rgba(255, 59, 48, .18); color: var(--danger); }
.page-msg { padding: 100px 20px; text-align: center; }

/* ==========================================================
   Breakpoints
   ========================================================== */
@media (min-width: 640px) {
    .trust-grid { grid-template-columns: 1fr 1fr; }
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .ml-panel { padding: 16px; }
    .product-grid { --gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-grid-scroll { grid-template-columns: none; grid-auto-columns: calc((100% - (var(--n3, 3) - 1) * var(--gap)) / var(--n3, 3)); }
    .toolbar-right { grid-template-columns: 1fr 200px; }
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .span-2 { grid-column: span 2; }
    .steps { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    .order-grid { grid-template-columns: 1fr 1fr; }
    .br-desktop { display: inline; }
}

@media (min-width: 960px) {
    .trust-grid { grid-template-columns: repeat(4, 1fr); }
    .header-inner { flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; gap: 28px; }
    .brand { margin-right: 0; }
    .brand img { height: 52px; }
    .header-search { order: 0; flex: 1 1 auto; max-width: 420px; margin: 0 auto; }
    .header-nav { display: flex; }
    .cat-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .ml-panel { padding: 18px; }
    .product-grid { --gap: 16px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .product-grid-scroll { grid-template-columns: none; grid-auto-columns: calc((100% - (var(--n5, 5) - 1) * var(--gap)) / var(--n5, 5)); }
    .carousel-arrow { display: grid; }
    .carousel-arrow[hidden] { display: none !important; }
    .card-add { opacity: 0; transform: translateY(-4px); }
    .card:hover .card-add, .card-add:focus-visible { opacity: 1; transform: none; }
    .card-add span { display: inline; }
    .toolbar { grid-template-columns: 1fr; justify-items: center; }
    .chips { flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; overflow: visible; }
    .toolbar-right { grid-template-columns: 320px 200px; }
    .section { padding: 80px 0; }
    .pdp { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 56px; align-items: start; }
    .pdp-gallery { max-width: none; }
    .pdp-gallery { position: sticky; top: calc(var(--header-h) + 24px); }
    .checkout { grid-template-columns: 1fr 400px; align-items: start; }
    .checkout-summary { position: sticky; top: calc(var(--header-h) + 24px); }
    .footer-bottom { padding-bottom: 28px; }
    .sticky-buy { display: none; }
}

@media (min-width: 1240px) {
    .product-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .product-grid-scroll { grid-template-columns: none; grid-auto-columns: calc((100% - (var(--n6, 6) - 1) * var(--gap)) / var(--n6, 6)); }
}

@media (hover: none) {
    .card-add { opacity: 1; transform: none; }
    .card-add span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================
   Selector de tema (claro / oscuro)
   ========================================================== */
.theme-toggle {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text); display: grid; place-items: center; transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); transform: rotate(15deg); }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ==========================================================
   MODO CLARO
   ========================================================== */
html[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f5f7;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #f3f4f6;
    --border: rgba(16, 24, 40, .09);
    --border-strong: rgba(16, 24, 40, .16);
    --text: #16161a;
    --muted: #6b6b76;
    --shadow-xl: 0 16px 36px rgba(16, 24, 40, .14);
}
html[data-theme="light"] .site-header { background: rgba(255, 255, 255, .92); }
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .header-search input,
html[data-theme="light"] .header-nav a:hover,
html[data-theme="light"] .btn-link:hover,
html[data-theme="light"] .input,
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .card-link,
html[data-theme="light"] .card-price,
html[data-theme="light"] .qty button,
html[data-theme="light"] .qty input,
html[data-theme="light"] .toast,
html[data-theme="light"] .breadcrumb [aria-current],
html[data-theme="light"] .pdp-perks strong,
html[data-theme="light"] .summary-total { color: var(--text); }
html[data-theme="light"] .qty button:hover:not(:disabled) { color: #fff; }
html[data-theme="light"] .card-title,
html[data-theme="light"] .card-price .cur,
html[data-theme="light"] .pdp-desc p,
html[data-theme="light"] .field,
html[data-theme="light"] .summary-row { color: #3a3a44; }
html[data-theme="light"] .step-n { color: var(--primary); }

html[data-theme="light"] .ml-panel { background: #fff; border-color: rgba(16, 24, 40, .06); box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 10px 30px rgba(16, 24, 40, .08); }
html[data-theme="light"] .card { border-color: rgba(16, 24, 40, .08); }
html[data-theme="light"] .card:hover { border-color: rgba(21, 97, 240, .5); box-shadow: 0 14px 30px rgba(16, 24, 40, .14), 0 0 0 1px rgba(21, 97, 240, .25); }
html[data-theme="light"] .card:hover .card-title { color: var(--primary); }
html[data-theme="light"] .card-media { background: #f3f4f6; }
html[data-theme="light"] .card-media::after { display: none; }
html[data-theme="light"] .card-consult { color: var(--primary); }
html[data-theme="light"] .card-off,
html[data-theme="light"] .card-tag-low { color: #0a8f3c; }
html[data-theme="light"] .card-tag-out,
html[data-theme="light"] .status { background: rgba(16, 24, 40, .06); }
html[data-theme="light"] .carousel-arrow { background: #fff; color: var(--primary); border-color: rgba(16, 24, 40, .08); box-shadow: 0 4px 14px rgba(16, 24, 40, .18); }
html[data-theme="light"] .carousel-arrow:hover { background: var(--primary); color: #fff; }
html[data-theme="light"] .free-ship .bar { background: rgba(16, 24, 40, .08); }
html[data-theme="light"] .pdp-thumb:hover { border-color: rgba(16, 24, 40, .25); }
html[data-theme="light"] .sticky-buy { background: rgba(255, 255, 255, .96); }
html[data-theme="light"] .alert { color: #8a4b00; }
html[data-theme="light"] .form-error { color: #b42318; }
html[data-theme="light"] .status-pagado,
html[data-theme="light"] .status-preparando { color: var(--primary); }
html[data-theme="light"] .trust-item,
html[data-theme="light"] .faq details,
html[data-theme="light"] .panel { box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }

/* El hero (sobre la foto) y el footer quedan oscuros en ambos modos */
html[data-theme="light"] .hero { color: #fff; }
html[data-theme="light"] .site-footer {
    --bg-2: #131313; --muted: #86868B; --border: rgba(134, 134, 139, .2); --text: #fff;
    background: #131313;
}
.logo-for-light { display: none; }
html[data-theme="light"] .site-header .logo-for-dark { display: none; }
html[data-theme="light"] .site-header .logo-for-light { display: block; filter: drop-shadow(0 3px 12px rgba(21, 97, 240, .25)); }
.tracking-box { display: grid; gap: 6px; justify-items: start; background: rgba(21, 97, 240, .1); border: 1px solid rgba(21, 97, 240, .35); border-radius: 14px; padding: 14px 16px; margin: 4px 0 18px; }
.tracking-box strong { font-size: 18px; letter-spacing: .5px; font-family: ui-monospace, monospace; }
.card-tag-consulta { color: #4cd77a; background: rgba(37, 211, 102, .12); }
html[data-theme="light"] .card-tag-consulta { color: #0a8f3c; }

/* ---------- Catálogo iPhone ---------- */
.catalog-hero { position: relative; overflow: hidden; padding: 64px 0 40px; text-align: center; background: radial-gradient(700px 300px at 50% 0%, rgba(21, 97, 240, .28), transparent 70%); }
.catalog-hero .hero-badge { margin-bottom: 18px; }
.catalog-hero h1 { font-size: clamp(2.4rem, 8vw, 4.2rem); font-weight: 900; letter-spacing: -2px; margin-bottom: 14px; }
.catalog-hero p { color: var(--muted); max-width: 620px; margin: 0 auto 26px; font-size: clamp(1rem, 2.4vw, 1.15rem); }
.catalog-perks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; list-style: none; padding: 0; margin: 0; color: var(--text); font-size: 14px; font-weight: 500; }
.catalog-perks li { display: flex; align-items: center; gap: 8px; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.model-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
    background: var(--surface); border: 1px solid rgba(255, 255, 255, .07); transition: transform .25s, border-color .25s, box-shadow .25s;
}
.model-card:hover { transform: translateY(-4px); border-color: rgba(21, 97, 240, .7); box-shadow: 0 16px 34px rgba(0, 0, 0, .5), 0 0 24px rgba(21, 97, 240, .18); }
.model-media { display: block; aspect-ratio: 1; background: var(--bg-2); overflow: hidden; }
.model-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.model-card:hover .model-media img { transform: scale(1.04); }
.model-body { display: flex; flex-direction: column; gap: 6px; padding: 14px; flex: 1; }
.model-body h2 { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.model-body p { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.model-body .btn { margin-top: auto; }
.model-new { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.catalog-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 22px; }
@media (min-width: 640px) { .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } .model-body { padding: 18px; } .model-body h2 { font-size: 18px; } }
@media (min-width: 1100px) { .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
html[data-theme="light"] .model-card { border-color: rgba(16, 24, 40, .08); }
.model-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 2px 0 8px; }
.model-price strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.model-price s { color: var(--muted); font-size: 13px; }
.model-price .price-consult { font-size: 14px; }
/* Menú: que los links nunca se partan; en pantallas medianas se oculta "Cómo comprar" */
.header-nav a { white-space: nowrap; }
@media (min-width: 960px) and (max-width: 1199px) {
    .header-nav { gap: 20px; }
    .header-nav a[href="/#como-comprar"] { display: none; }
}

/* ---------- Catálogo app: vendidos e instalación ---------- */
.model-card.is-sold .model-media img { filter: grayscale(1) brightness(.55); }
.model-card.is-sold .model-body h2, .model-card.is-sold .model-price strong { color: var(--muted); }
.model-card.is-sold:hover { transform: none; border-color: rgba(255, 255, 255, .07); box-shadow: none; }
.model-sold { position: absolute; top: 12px; left: 12px; z-index: 1; background: rgba(0, 0, 0, .8); color: #fff; border: 1px solid rgba(255, 255, 255, .25); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.install-bar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
    background: rgba(31, 31, 34, .97); border: 1px solid rgba(21, 97, 240, .5); box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: 560px; margin: 0 auto;
}
.install-bar img { border-radius: 10px; flex-shrink: 0; }
.install-text { flex: 1; min-width: 0; display: grid; font-size: 13px; line-height: 1.35; }
.install-text strong { font-size: 14px; color: #fff; }
.install-text span { color: var(--muted); }
.install-close { border: 0; background: none; color: var(--muted); font-size: 16px; padding: 4px; }
body:has(#installBar:not([hidden])) .wa-float { bottom: 96px; }
html[data-theme="light"] .install-bar { background: rgba(255, 255, 255, .97); }
html[data-theme="light"] .install-text strong { color: var(--text); }
/* Abierta como app instalada: sin barra de envíos ni buscador de la tienda */
@media (display-mode: standalone) {
    body.is-catalog-app .topbar, body.is-catalog-app .header-search, body.is-catalog-app .header-nav { display: none; }
    body.is-catalog-app .catalog-hero { padding-top: 34px; }
}
.footer-install { border: 0; background: none; padding: 0; color: #6fa0ff; font: inherit; font-weight: 600; cursor: pointer; }
.footer-install:hover { text-decoration: underline; }
/* Tienda abierta como app instalada: sin barra superior de avisos para ganar espacio */
html.is-standalone .topbar { display: none; }
html.is-standalone .site-header { padding-top: env(safe-area-inset-top); }

/* ==========================================================
   AJUSTE FINO PARA CELULARES (< 640px)
   Menos aire vacío, portada compacta, carruseles horizontales
   y grillas a todo el ancho.
   ========================================================== */
@media (max-width: 639px) {
    .container { padding-left: 14px; padding-right: 14px; }

    /* Secciones y títulos: menos espacio vacío */
    .section { padding: 34px 0; }
    .section-head { margin-bottom: 16px; }
    .section-head-center { margin-bottom: 18px; }
    .section-head h2 { font-size: 1.45rem; letter-spacing: -.5px; }

    /* Portada: entra en una pantalla con el contenido arriba */
    .hero { min-height: 0; }
    .hero-content { padding-top: 34px; padding-bottom: 40px; }
    .hero-badge { padding: 7px 16px; font-size: 12.5px; margin-bottom: 18px; }
    .hero-title { font-size: 2.35rem; letter-spacing: -1.2px; margin-bottom: 14px; }
    .hero-subtitle { font-size: .95rem; margin-bottom: 22px; }
    .hero-cta { flex-wrap: nowrap; gap: 10px; margin-bottom: 22px; }
    .hero-cta .btn-lg { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 12px 10px; font-size: 14.5px; }
    .hero-cta .btn-lg svg { width: 16px; height: 16px; }
    .hero-features { flex-wrap: nowrap; gap: 6px 14px; }
    .hero-features li { font-size: 12.5px; gap: 6px; white-space: nowrap; }
    .feature-icon { width: 20px; height: 20px; font-size: 11px; }
    .scroll-indicator, .hero::after { display: none; }

    /* Beneficios: tira horizontal deslizable en vez de 4 tarjetas altas */
    .trust-grid {
        display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        margin: 0; padding: 14px 14px 6px; /* ya es el .container: sin margen negativo */
    }
    .trust-grid::-webkit-scrollbar { display: none; }
    .trust-item { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 10px; padding: 12px 14px; scroll-snap-align: start; }
    .trust-item svg { width: 22px; height: 22px; }
    .trust-item strong { font-size: 13px; white-space: nowrap; }
    .trust-item span { font-size: 11.5px; white-space: nowrap; }

    /* Categorías: carrusel horizontal (sin la última tarjeta suelta) */
    .cat-grid {
        display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        margin: 0 -14px; padding: 0 14px 4px;
    }
    .cat-grid::-webkit-scrollbar { display: none; }
    .cat-card { flex: 0 0 40%; aspect-ratio: 1 / 1; padding: 12px; scroll-snap-align: start; border-radius: 16px; }
    .cat-card span { font-size: 14px; line-height: 1.2; }
    .cat-card small { font-size: 11px; }

    /* Productos: grilla a todo el ancho, sin el panel que la encajonaba */
    .ml-panel { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
    .product-grid { --gap: 10px; }
    .product-grid-scroll { margin: 0 -14px; padding: 2px 14px 6px; grid-auto-columns: 44%; }
    .card-body { padding: 10px 10px 12px; }
    .card-title { font-size: 13.5px; }
    .card-price { font-size: 20px; }
    .card-add { top: 8px; right: 8px; height: 34px; min-width: 34px; }

    /* Filtros del catálogo */
    .toolbar { gap: 10px; margin-bottom: 12px; }
    .chips { margin: 0 -14px; padding: 2px 14px 6px; }
    .chip { padding: 8px 16px; font-size: 13px; }
    .chip:hover, .chip.is-active { transform: none; }
    .toolbar-right { grid-template-columns: 1fr 140px; }
    .results-count { margin-bottom: 12px; font-size: 13px; }

    /* "Comprar es fácil": filas compactas en vez de tarjetas enormes */
    .steps { gap: 10px; }
    .steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: start; padding: 16px; }
    .steps li .step-n { grid-row: span 2; width: 32px; height: 32px; font-size: 14px; }
    .steps h3 { margin: 2px 0 4px; font-size: 16px; }
    .steps p { font-size: 13.5px; }

    /* Preguntas frecuentes */
    .faq details { padding: 0 16px; }
    .faq summary { padding: 14px 26px 14px 0; font-size: 14.5px; }

    /* Footer más compacto */
    .site-footer { padding-top: 36px; }
    .footer-grid { gap: 22px; padding-bottom: 24px; }
    .footer-bottom { flex-direction: column; gap: 6px; padding-bottom: 96px; }

    /* Página de producto */
    .product-page { padding-top: 14px; }
    .breadcrumb { margin-bottom: 14px; font-size: 12px; }
    .pdp { gap: 18px; }
    .pdp-gallery { max-width: none; }
    .pdp-info h1 { font-size: 1.6rem; margin: 4px 0 10px; }
    .pdp-price strong { font-size: 2rem; }
    .pdp-stock { margin-bottom: 16px; }
    .pdp-perks { margin: 18px 0; padding: 14px 16px; }

    /* Checkout */
    .checkout-page { padding-top: 18px; padding-bottom: 110px; }
    .checkout-page h1 { font-size: 1.6rem; margin-bottom: 14px; }
    .checkout, .checkout-main { gap: 14px; }
    .panel { padding: 16px; border-radius: 16px; }
    .panel legend { font-size: 16px; margin-bottom: 14px; }
    .grid-2 { gap: 10px; margin-bottom: 10px; }

    /* Página de pedido */
    .order-page { padding-top: 18px; gap: 14px; }
    .order-hero { padding: 26px 16px; }

    /* Catálogo iPhone */
    .catalog-hero { padding: 34px 0 18px; }
    .catalog-hero h1 { font-size: 2.3rem; letter-spacing: -1px; }
    .catalog-hero p { font-size: .95rem; margin-bottom: 18px; }
    .catalog-perks { gap: 8px 16px; font-size: 13px; }
    .catalog-grid { gap: 10px; }
    .model-body { padding: 12px; gap: 4px; }
    .model-body h2 { font-size: 15px; }
    .model-body p { font-size: 12.5px; -webkit-line-clamp: 2; }
    .model-price strong { font-size: 19px; }
}

/* Barra fija de total en el checkout (celular): se ve el total y se confirma sin bajar todo */
.checkout-bar { display: none; }
@media (max-width: 959px) {
    .checkout-bar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(24, 24, 27, .97);
        backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--border);
        transition: transform .25s;
    }
    .checkout-bar[hidden] { display: none; }
    .checkout-bar.is-out { transform: translateY(110%); }
    .checkout-bar > div { display: grid; line-height: 1.2; }
    .checkout-bar span { font-size: 12px; color: var(--muted); }
    .checkout-bar strong { font-size: 20px; }
    .checkout-bar .btn { flex-shrink: 0; min-height: 46px; padding: 0 20px; }
    body:has(.checkout-bar:not([hidden]):not(.is-out)) .wa-float { bottom: 86px; }
    html[data-theme="light"] .checkout-bar { background: rgba(255, 255, 255, .97); }
}
@media (max-width: 639px) {
    /* El "imán" del carrusel respeta el margen: la primera tarjeta no queda pegada al borde */
    .trust-grid, .cat-grid, .product-grid-scroll, .chips { scroll-padding-inline: 14px; }
}
@media (max-width: 639px) {
    .faq summary::after { top: 50%; margin-top: -15px; }
    /* El espacio extra al pie solo hace falta si está el botón flotante de WhatsApp */
    .footer-bottom { padding-bottom: 24px; }
    body:has(.wa-float) .footer-bottom { padding-bottom: 90px; }
}

/* iPhone hace zoom automático al tocar un campo con letra < 16px y deja la página agrandada.
   En celular todos los campos van a 16px para que eso no pase. */
@media (max-width: 959px) {
    input, select, textarea,
    .header-search input, .input, .field input, .field select, .field textarea { font-size: 16px; }
}
