/* ================================================
   Main CSS
   ================================================ */

/* Fuentes self-hosted — declaradas aquí para que el navegador
   las descubra solo al procesar el CSS externo, no en el primer parse HTML */
@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('/fonts/BricolageGrotesque-var.woff2') format('woff2');
    font-weight: 500 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Instrument Sans';
    src: url('/fonts/InstrumentSans-var.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* Variables — Tema SoftSmart */
:root {
    --primary:     #10233F;   /* Azul tinta (header, menú, footer) */
    --primary-dark:#0A1830;
    --primary-light:#1C3357;
    --accent:      #0E7C66;   /* Verde pino: CTA y precios */
    --accent-hover:#0A5E4D;
    --accent-light:#E3F2EE;
    --yellow:      #FFD23F;   /* Amarillo boleto: pago al recibir y etiquetas */
    --yellow-hover:#F2C21F;
    --yellow-dark: #8A6A00;
    --success:     #25D366;   /* Verde WhatsApp */
    --success-dark:#128C7E;
    --danger:      #C8233A;
    --warning:     #B45309;
    --text:        #10233F;
    --text-muted:  #4A5872;
    --border:      #D9E0DD;
    --bg:          #F2F4F3;
    --bg-section:  #FFFFFF;
    --white:       #ffffff;
    --radius:      10px;
    --radius-lg:   14px;
    --shadow:      0 1px 2px rgba(16,35,63,.06);
    --shadow-md:   0 2px 8px rgba(16,35,63,.07);
    --shadow-lg:   0 10px 24px rgba(16,35,63,.10);
    --transition:  .2s ease;
    --font:        'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display:     'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;

    /* Tema editable desde admin → Configuración → Apariencia */
    --header-bg:   var(--primary);
    --footer-bg:   var(--primary);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* Container */
.container { width: 75%; max-width: 1600px; margin: 0 auto; padding: 0 20px; }

/* ================================================
   Top Bar — SoftSmart style
   ================================================ */
.topbar {
    background: var(--header-bg);
    color: #fff;
    font-size: 10px;
    padding: 6px 0;
    min-height: 28px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar__badges { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.topbar__badge { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,.9); font-weight: 500; }
.topbar__badge a { color: rgba(255,255,255,.9); transition: color var(--transition); }
.topbar__badge a:hover { color: #fff; }
.topbar__badge--live { color: #fff; }
.topbar__links { display: flex; gap: 12px; font-size: 10px; align-items: center; }
.topbar__links a { color: rgba(255,255,255,.9); padding: 0 6px; border-right: 1px solid rgba(255,255,255,.2); }
.topbar__links a:last-child { border-right: none; }
.topbar__links a:hover { color: #fff; }
.live-dot { width: 6px; height: 6px; background: #4ade80; border-radius: 50%; display: inline-block; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.topbar__wa { display: flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; transition: color var(--transition); }
.topbar__wa:hover { color: rgba(255,255,255,.85); }

/* ================================================
   Header — SoftSmart style
   ================================================ */
.header {
    background: var(--header-bg);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    min-height: 96px;
    padding: 14px 0;
}
.header__search-wrap { justify-self: start; width: 100%; max-width: 360px; }
.header__search-form { display: flex; position: relative; }
.header__search-input {
    width: 100%;
    padding: 11px 44px 11px 16px;
    border: 2px solid rgba(255,255,255,.35);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    background: #fff;
    color: var(--text);
    transition: border-color var(--transition);
}
.header__search-input:focus { border-color: var(--yellow); }
.header__search-input::placeholder { color: #94a3b8; }
.header__search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: transparent;
    border-radius: var(--radius);
}
.header__search-btn:hover { background: var(--accent-light); }

.header__logo { display: flex; align-items: center; flex-shrink: 0; justify-self: center; }
.header__logo img { height: 48px; width: auto; }
.header__logo-text { font-size: 32px; font-weight: 800; color: #fff; letter-spacing: -0.5px; font-style: italic; }

.nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav__link { padding: 7px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 600; color: rgba(255,255,255,.85); transition: all var(--transition); white-space: nowrap; }
.nav__link:hover { color: #fff; background: rgba(255,255,255,.10); }
.nav__link.active { color: #fff; background: rgba(255,255,255,.15); font-weight: 700; }

.header__actions { display: flex; align-items: center; gap: 12px; justify-self: end; }

/* Botón del carrito — gris muy claro casi blanco */
.header__cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F5F6F8;
    color: var(--primary);
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    transition: all var(--transition);
    white-space: nowrap;
    border: 1px solid #E5E7EB;
}
.header__cart-btn:hover { background: #FFFFFF; border-color: #D1D5DB; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.header__cart-btn svg { flex-shrink: 0; }

.header__login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 4px;
    transition: opacity var(--transition);
}
.header__login:hover { opacity: .85; }

.header__btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius); color: rgba(255,255,255,.85); transition: all var(--transition); }
.header__btn:hover { background: rgba(255,255,255,.12); color: #fff; }

.header__cart { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius); color: rgba(255,255,255,.85); transition: all var(--transition); }
.header__cart:hover { background: rgba(255,255,255,.12); color: #fff; }
.header__cart-badge { position: absolute; top: 4px; right: 4px; background: var(--yellow); color: var(--primary); font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.header__hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.header__hamburger span { display: block; width: 22px; height: 2px; background: rgba(255,255,255,.95); border-radius: 2px; transition: all var(--transition); }

/* Menú horizontal debajo del header — íconos + labels mayúsculas */
.main-menu {
    background: var(--header-bg);
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 4px 0;
}
.main-menu__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.main-menu__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background var(--transition);
    white-space: nowrap;
    border-radius: var(--radius);
}
.main-menu__link:hover { background: rgba(255,255,255,.10); }
.main-menu__link.active { background: rgba(255,255,255,.15); }
.main-menu__link svg { flex-shrink: 0; }
.main-menu__link--home { padding: 12px 14px; }

/* Search bar (ahora oculto — usamos el buscador inline en header) */
.search-bar { display: none; border-top: 1px solid rgba(255,255,255,.1); padding: 12px 0; background: var(--header-bg); }
.search-bar.active { display: block; }
.search-bar__form { display: flex; gap: 8px; }
.search-bar__input { flex: 1; padding: 10px 16px; border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); font-size: 14px; outline: none; transition: border-color var(--transition); background: rgba(255,255,255,.08); color: #fff; }
.search-bar__input:focus { border-color: var(--yellow); }
.search-bar__btn { background: var(--yellow); color: var(--primary); padding: 10px 16px; border-radius: var(--radius); display: flex; align-items: center; transition: background var(--transition); }
.search-bar__btn:hover { background: var(--yellow-hover); }

/* Mobile Nav */
.mobile-nav { position: fixed; top: 0; right: -320px; width: 300px; height: 100vh; background: var(--white); z-index: 200; box-shadow: var(--shadow-lg); transition: right var(--transition); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.mobile-nav.open { right: 0; }
.mobile-nav__close { align-self: flex-end; font-size: 20px; color: var(--text-muted); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); }
.mobile-nav__close:hover { background: var(--bg); }
.mobile-nav__link { display: block; padding: 12px 16px; font-weight: 500; border-radius: var(--radius); color: var(--text); transition: all var(--transition); }
.mobile-nav__link:hover { background: var(--accent-light); color: var(--accent); }
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 150; }
.overlay.active { display: block; }

/* ================================================
   Hero Banner
   ================================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #1e3a6e 100%);
    color: #fff;
    padding: 24px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero__inner { position: relative; display: flex; align-items: center; gap: 48px; justify-content: space-between; }
.hero__content { flex: 1; max-width: 600px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 6px; background: rgba(37,99,235,.3); border: 1px solid rgba(37,99,235,.5); color: #93c5fd; padding: 4px 12px; border-radius: 100px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.hero__title { font-size: clamp(22px, 3.5vw, 38px); font-weight: 800; line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 8px; }
.hero__title span { color: #60a5fa; }
.hero__subtitle { color: rgba(255,255,255,.75); font-size: 15px; margin-bottom: 16px; max-width: 520px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__badges { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.hero__badge { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.8); }
.hero__badge svg { color: #4ade80; flex-shrink: 0; }
.hero__image { flex-shrink: 0; width: 280px; display: none; }

/* ================================================
   Buttons
   ================================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius); font-weight: 600; font-size: 14px; transition: all var(--transition); cursor: pointer; white-space: nowrap; border: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.btn--outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.3); }
.btn--outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.btn--wa { background: #15803d; color: #fff; }
.btn--wa:hover { background: #166534; }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--lg { padding: 14px 28px; font-size: 16px; }
.btn--full { width: 100%; }
.btn--secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--border); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #b91c1c; }

/* ================================================
   Sección general
   ================================================ */
.section { padding: 48px 0; background: #ffffff; }
.section--gray { background: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.section__header { text-align: center; margin-bottom: 32px; }
.section__eyebrow { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.section__title { font-size: clamp(22px, 3vw, 32px); font-weight: 800; color: var(--primary); letter-spacing: -0.3px; }
.section__subtitle { color: var(--text-muted); margin-top: 8px; }
.section__header--left { text-align: left; margin-bottom: 20px; }
.section__header--left .section__title { font-size: 20px; }

/* ================================================
   Product Grid — SoftSmart style
   ================================================ */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
/* Relacionados: una sola fila con flechas. Estira si hay pocos; se navega con ‹ › si hay muchos. */
.rel-carousel { position: relative; }
.products-grid--rel {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;        /* Firefox: sin barra */
    -ms-overflow-style: none;     /* Edge/IE viejo */
}
.products-grid--rel::-webkit-scrollbar { display: none; }  /* Chrome/Safari */
.products-grid--rel > .product-card {
    flex: 1 0 220px;
    scroll-snap-align: start;
}
.rel-arrow {
    position: absolute; top: 42%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border, #e5e7eb); background: #fff; color: #0a1628;
    font-size: 24px; line-height: 1; cursor: pointer; z-index: 3;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
    display: flex; align-items: center; justify-content: center;
}
.rel-arrow:hover { background: #f8fafc; }
.rel-arrow--prev { left: -6px; }
.rel-arrow--next { right: -6px; }
.rel-arrow[hidden] { display: none; }
@media (max-width: 640px) {
    .products-grid--rel > .product-card { flex-basis: 160px; }
    .rel-arrow { width: 34px; height: 34px; font-size: 20px; }
}

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

/* Badge amarillo estilo SoftSmart — pegado a la esquina, no redondo */
.product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    background: var(--yellow);
    color: var(--text);
    letter-spacing: 0;
    text-transform: none;
}
.product-card__badge--popular { background: var(--yellow); color: var(--text); }
.product-card__badge--nuevo   { background: var(--yellow); color: var(--text); }
.product-card__badge--oferta  { background: var(--yellow); color: var(--text); }
.product-card__badge--descuento {
    background: #16a34a; color: #fff;
    left: auto; right: 10px;        /* esquina opuesta a "Popular" */
    box-shadow: 0 2px 4px rgba(22,163,74,.25);
}
.product-card__badge--nxm {
    background: #fef3c7; color: #b45309;
    left: auto; right: 10px;
}
.product-card__badge--timer {
    top: 44px; bottom: auto; left: auto; right: 10px;
    background: #1e293b; color: #fff;
    display: inline-flex; align-items: center; gap: 5px;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 4px rgba(15,23,42,.25);
}
.product-card__badge--timer.is-expired { opacity: .55; }
.product-card__badge--recomendado {
    left: 10px; right: auto;
    background: #4f46e5; color: #fff;
    display: inline-flex; align-items: center; gap: 4px;
    box-shadow: 0 2px 4px rgba(79,70,229,.25);
}
/* Referencia "incluye regalo" en la tarjeta */
.product-card__gift {
    align-self: center;
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700;
    color: #7c3aed; background: #f3e8ff;
    border-radius: 100px; padding: 2px 10px;
}

/* Regalo destacado en la ficha de producto */
.pd-gift { margin-top: 8px; font-size: 13px; color: #7c3aed; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 8px; padding: 8px 12px; }
.pd-gift strong { font-weight: 800; }
.pd-gift__label { display: block; }
.pd-gift__items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pd-gift__item { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; background: #fff; border: 1px solid #ddd6fe; border-radius: 6px; padding: 3px 9px 3px 3px; }
.pd-gift__item img { width: 26px; height: 26px; flex: none; object-fit: contain; border-radius: 4px; background: #fff; }
.pd-gift__item > span { font-size: 12px; font-weight: 600; color: #6d28d9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Regalos incluidos (carrito / checkout) */
.cart-gifts { margin-top: 16px; border: 1px dashed #c4b5fd; background: #faf5ff; border-radius: var(--radius); padding: 12px 16px; }
.cart-gifts__title { font-size: 13px; font-weight: 800; color: #7c3aed; margin-bottom: 8px; }
.cart-gifts__item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.cart-gifts__item img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--border); }
.cart-gifts__name { flex: 1; font-size: 13px; font-weight: 600; }
.cart-gifts__free { font-size: 12px; font-weight: 800; color: #16a34a; }

/* Upsell en checkout */
.co-upsell { margin-top: 14px; border: 1px solid #fcd34d; background: #fffbeb; border-radius: var(--radius); padding: 14px 16px; }
/* Separador entre los totales y la oferta especial */
.co-upsell-sep { margin-top: 16px; border-top: 2px dashed var(--border); }
.co-upsell__title { font-size: 13px; font-weight: 800; color: #b45309; margin-bottom: 2px; }
.co-upsell__sub { font-size: 12px; color: #92400e; margin-bottom: 10px; }
.co-upsell__item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #fde68a; }
.co-upsell__item:first-of-type { border-top: none; }
.co-upsell__item img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--border); }
.co-upsell__info { flex: 1; min-width: 0; }
.co-upsell__name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.co-upsell__price { font-size: 12px; margin-top: 2px; }
.co-upsell__price s { color: var(--text-muted); }
.co-upsell__price b { color: #16a34a; }
.co-upsell__btn { flex-shrink: 0; border: none; background: var(--primary); color: #fff; font-weight: 700; font-size: 12px; padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.co-upsell__btn:disabled { opacity: .6; cursor: default; }

/* Pack: collage de las imágenes de los integrantes (sin archivo generado) */
.pack-montage { position: relative; width: 100%; height: 100%; display: grid; gap: 2px; background: #fff; }
.pack-montage--1 { grid-template-columns: 1fr; }
.pack-montage--2 { grid-template-columns: 1fr 1fr; }
.pack-montage--3, .pack-montage--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pack-montage--3 .pack-montage__cell:first-child { grid-column: 1 / span 2; }
.pack-montage__cell { display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 2px; min-height: 0; min-width: 0; }
.pack-montage__cell img { width: 100%; height: 100%; object-fit: contain; }
.pack-montage__ribbon { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: #0a1628; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 2px 10px; border-radius: 100px; box-shadow: 0 2px 4px rgba(0,0,0,.25); }

.product-card__img { aspect-ratio: 1; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; padding: 20px; }
.product-card__img img { width: 100%; height: 100%; object-fit: contain; transition: transform var(--transition); }
.product-card:hover .product-card__img img { transform: scale(1.03); }
.product-card__img-placeholder { width: 80px; height: 80px; opacity: .2; }

.product-card__body { padding: 14px 16px 10px; flex: 1; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.product-card__cat { font-size: 12px; font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.product-card__name { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.4; min-height: 2.8em; }
.product-card__desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; flex: 1; }
.product-card__footer { display: flex; align-items: center; justify-content: center; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.product-card__price { font-size: 22px; font-weight: 700; color: var(--primary); }
.product-card__price-note { font-size: 10px; color: var(--text-muted); font-weight: 400; display: none; }

/* Precio con descuento: original tachado (ancla) + precio real destacado */
.precio-promo { display: inline-flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.05; }
.precio-promo__old { font-size: .68em; font-weight: 500; color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(220,38,38,.6); }
.precio-promo__new { color: #16a34a; font-weight: inherit; }

/* Prueba social: badge de esquina "+N vendidos" (debajo del badge de oferta) */
.product-card__badge--vendidos {
    top: 40px; left: 10px; right: auto;
    background: #fff7ed; color: #b45309;
    border: 1px solid #fed7aa;
    box-shadow: 0 2px 4px rgba(180,83,9,.15);
}

/* Autocomplete del header — sólo precio final + badge -% */
.hs-item__price .hs-price-new { color: var(--primary); font-weight: 700; }
.hs-item__price .hs-price-off { background: #16a34a; color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 100px; margin-left: 4px; }

.product-card__actions { padding: 0 12px 14px; display: flex; gap: 6px; align-items: center; }
.btn--cart { flex: 1; min-width: 0; background: var(--primary); color: #fff; padding: 9px 6px; border-radius: var(--radius); font-size: 13px; font-weight: 600; transition: all var(--transition); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn--cart:hover { background: var(--primary-dark); }
.btn--view { flex-shrink: 0; background: var(--bg); color: var(--text-muted); padding: 9px 12px; border-radius: var(--radius); font-size: 13px; border: 1px solid var(--border); transition: all var(--transition); white-space: nowrap; }
.btn--view:hover { border-color: var(--primary); color: var(--primary); }

/* ================================================
   Category Pills
   ================================================ */
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-pill { padding: 6px 16px; border-radius: 100px; font-size: 13px; font-weight: 600; border: 2px solid var(--border); color: var(--text-muted); transition: all var(--transition); cursor: pointer; background: var(--white); }
.cat-pill:hover, .cat-pill.active { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ================================================
   Features / Benefits
   ================================================ */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.feature-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; text-align: center; transition: all var(--transition); }
.feature-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.feature-card__icon { width: 48px; height: 48px; background: var(--accent-light); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 24px; }
.feature-card__title { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.feature-card__desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ================================================
   Carrito
   ================================================ */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.cart-table { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cart-table table { width: 100%; border-collapse: collapse; }
.cart-table th { padding: 14px 20px; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); text-align: left; background: var(--bg); }
.cart-table td { padding: 16px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: none; }
.cart-item__img { width: 56px; height: 56px; border-radius: var(--radius); object-fit: cover; background: var(--bg); }
.cart-item__name { font-weight: 600; font-size: 14px; }
.cart-item__cat { font-size: 12px; color: var(--text-muted); }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 28px; height: 28px; border-radius: var(--radius); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; transition: all var(--transition); color: var(--text-muted); }
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-input {
    width: 52px;
    height: 32px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 32px;
    color: var(--text);
    background: #fff;
    /* Ocultar spinners — los botones +/- son la única forma de cambiar cantidad */
    -moz-appearance: textfield;
    appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.qty-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Contenedor del control de cantidad — alineación vertical perfecta */
.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.qty-control .qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}
.cart-summary { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 90px; }
.cart-summary__title { font-size: 16px; font-weight: 800; margin-bottom: 20px; }
.cart-summary__row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.cart-summary__row:last-of-type { border-bottom: none; }
.cart-summary__total { font-size: 18px; font-weight: 800; color: var(--primary); }
.cart-summary__label { color: var(--text-muted); }
.cart-empty { text-align: center; padding: 60px 20px; }
.cart-empty__icon { font-size: 48px; margin-bottom: 16px; }
.cart-empty__title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.cart-empty__desc { color: var(--text-muted); margin-bottom: 24px; }

/* ================================================
   Checkout
   ================================================ */
/* Checkout — 3 columnas: datos | resumen (más ancho) | pago */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr 1fr;
    gap: 16px;
    align-items: stretch;
}
.checkout-zona-datos   { grid-column: 1; }
.checkout-zona-resumen { grid-column: 2; }
.checkout-zona-pago    { grid-column: 3; position: sticky; top: 90px; }
.checkout-zona-datos .checkout-form,
.checkout-zona-resumen.order-summary { height: 100%; box-sizing: border-box; }

/* Cards */
.checkout-form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; height: 100%; box-sizing: border-box; }

/* Step labels */
.co-step-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); margin-bottom: 12px; }
.co-step-label--pago { color: var(--accent); }

/* Campos verticales dentro de la col datos */
.co-fields-row { display: flex; flex-direction: column; gap: 10px; }
.form-group { margin-bottom: 0; }
.form-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .4px; }
.form-label span { color: var(--danger); }
.form-input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; outline: none; transition: border-color var(--transition); color: var(--text); background: var(--bg); box-sizing: border-box; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); background: #fff; }
.form-input.error { border-color: var(--danger); }
.form-error { font-size: 11px; color: var(--danger); margin-top: 3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Gateways */
.gateways { display: flex; flex-direction: column; gap: 8px; }
.gateway-option { border: 2px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; transition: all var(--transition); display: flex; align-items: center; gap: 10px; }
.gateway-option:hover { border-color: var(--accent); }
.gateway-option.selected { border-color: var(--accent); background: var(--accent-light); }
.gateway-option input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.gateway-option__info { flex: 1; }
.gateway-option__name { font-weight: 700; font-size: 13px; }
.gateway-option__desc { font-size: 11px; color: var(--text-muted); }
.gateway-option__logo { font-size: 18px; }

/* Botón pagar y trust */
.co-pagar-wrap { margin-top: 16px; }
.co-trust-mini { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 8px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.co-trust-icons { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted); }

/* Notas informativas bajo el checkout (2 columnas) */
.co-notas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.co-nota { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.co-nota__title { display: inline-block; font-size: 14px; font-weight: 800; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.co-nota__text { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin: 0; }
.co-nota--factura  { background: #fefce8; border-color: #fde68a; }
.co-nota--factura  .co-nota__title  { background: #fde68a; color: #854d0e; }
.co-nota--garantia { background: #f0fdf4; border-color: #bbf7d0; }
.co-nota--garantia .co-nota__title  { background: #bbf7d0; color: #166534; }

/* Resumen */
.order-summary { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.order-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.order-item:last-child { border-bottom: none; }
.order-item__img { width: 56px; height: 56px; border-radius: 6px; object-fit: contain; background: #fff; padding: 4px; flex-shrink: 0; border: 1px solid var(--border); }
.order-item__name { font-size: 14px; font-weight: 700; flex: 1; line-height: 1.35; color: var(--text); }
.order-item__price { font-size: 16px; font-weight: 800; white-space: nowrap; color: var(--primary); }
.co-resumen-footer {
    padding-top: 10px;
    margin-top: 6px;
    border-top: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* Cupón — compacto, alineado con el total */
.co-cupon { margin-top: 0; flex-shrink: 0; }
.co-cupon-row { display: flex; gap: 4px; }
.co-cupon-row input {
    width: 140px;
    padding: 5px 8px;
    font-size: 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    text-transform: uppercase;
    background: var(--bg);
    height: 28px;
}
.co-cupon-row input:focus { border-color: var(--accent); background: #fff; }
.co-cupon-row button {
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    height: 28px;
}
.co-cupon-row button:hover { background: var(--accent); }

/* ================================================
   Confirmación
   ================================================ */
.confirm-box { max-width: 600px; margin: 60px auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; text-align: center; }
.confirm-box__icon { width: 72px; height: 72px; background: #dcfce7; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 36px; }
.confirm-box__title { font-size: 26px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.confirm-box__subtitle { color: var(--text-muted); margin-bottom: 24px; }
.confirm-box__order { background: var(--bg); border-radius: var(--radius); padding: 16px; margin-bottom: 24px; }
.confirm-box__order-id { font-size: 22px; font-weight: 800; color: var(--primary); }

/* ================================================
   Alerts / Notices
   ================================================ */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.alert--success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert--error { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.alert--warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.alert--info { background: var(--accent-light); color: var(--accent); border: 1px solid #bfdbfe; }

/* ================================================
   Trust Bar
   ================================================ */
.trust-bar { display: none; }
.trust-bar__inner { display: none; }

.trust-item__icon { font-size: 24px; width: 28px; text-align: center; flex-shrink: 0; }
.trust-item__title { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.2; }
.trust-item__desc { font-size: 11px; color: rgba(255,255,255,.6); line-height: 1.2; }

/* ================================================
   Footer
   ================================================ */
.footer { background: var(--footer-bg); color: rgba(255,255,255,.8); padding: 32px 0 0; }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.6fr; gap: 28px; margin-bottom: 28px; align-items: start; }
.footer__logo { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.5px; display: block; margin-bottom: 6px; }
.footer__desc { font-size: 12px; line-height: 1.5; margin-bottom: 14px; }
.footer__title { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__links a { font-size: 13px; transition: color var(--transition); }
.footer__links a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; }
.footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; color: rgba(255,255,255,.5); }
.footer__payments { display: flex; gap: 8px; }
.payment-badge { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.7); }

/* ================================================
   Page Header
   ================================================ */
.site-banner { padding: 12px 0; }
.page-header { background: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; padding: 20px 0; }
.page-header + .section { padding-top: 20px; }
.page-header__title { font-size: 24px; font-weight: 800; color: var(--primary); }
.page-header__breadcrumb { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.page-header__breadcrumb a { color: var(--accent); }

/* ================================================
   Spinner / Loading
   ================================================ */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 1024px) {
    .footer__inner { grid-template-columns: 1fr 1fr; }
    .hero__image { display: none; }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .header__hamburger { display: flex; }
    .cart-layout { grid-template-columns: 1fr; }
    .footer__inner { grid-template-columns: 1fr; gap: 24px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .form-row { grid-template-columns: 1fr; }
    .hero { padding: 20px 0 !important; }
    .hero__side { display: none !important; }
    .hero__content { max-width: 100% !important; }
    .hero__eyebrow { font-size: 11px !important; padding: 3px 10px !important; margin-bottom: 8px !important; }
    .hero__title { font-size: 20px !important; margin-bottom: 6px !important; }
    .hero__subtitle { font-size: 13px !important; margin-bottom: 12px !important; }
    .hero__badges { gap: 6px 16px !important; margin-top: 10px !important; flex-direction: row !important; flex-wrap: nowrap !important; }
    .hero__badge { font-size: 11px !important; white-space: nowrap !important; }
    .hero__inner { flex-direction: column !important; gap: 12px !important; }
    .trust-bar__inner { display: none; }
    .topbar__contact { display: none; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr 1fr; }
    .hero__actions { flex-direction: row; gap: 8px; }
    .hero__actions .btn--lg { padding: 10px 14px; font-size: 13px; }
    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3) { display: none; }
}

/* ================================================
   Responsive — Solo Mobile (PC sin cambios)
   ================================================ */

/* Helpers show/hide */
.show-mobile  { display: none !important; }
.show-desktop { display: block !important; }

/* Barra inferior móvil */

/* Cart cards mobile */
.cart-card-mobile {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
}
.cart-card-mobile__img {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: var(--radius);
    background: var(--bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-card-mobile__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-card-mobile__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cart-card-mobile__name  { font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--text); }
.cart-card-mobile__price { font-size: 14px; font-weight: 800; color: var(--accent); }
.cart-card-mobile__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.cart-card-mobile__footer strong {
    margin-left: auto;
    font-size: 15px;
    color: var(--primary);
    white-space: nowrap;
}

/* Galería de la ficha de producto (carrusel con flechas) */
.pd-gallery__track { display: flex; height: 100%; transition: transform .35s ease; }
.pd-gallery__slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.pd-gallery__slide img { width: 100%; height: 100%; object-fit: contain; }
.pd-gallery__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border); background: rgba(255,255,255,.92);
    color: var(--text); font-size: 24px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 2; box-shadow: var(--shadow); transition: background var(--transition);
}
.pd-gallery__nav:hover { background: #fff; }
.pd-gallery__nav--prev { left: 10px; }
.pd-gallery__nav--next { right: 10px; }
.pd-gallery__dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.pd-gallery__dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(0,0,0,.22); cursor: pointer; padding: 0; }
.pd-gallery__dot.is-active { background: var(--primary); }

/* ── Mobile ≤768px ──────────────────────────────── */
/* Layout del producto se apila antes que el resto: si caben mal las 2 cols, mejor stack ya */
@media (max-width: 960px) {
    .pd-wrap {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    .pd-wrap > div:first-child {
        width: 100% !important;
        max-width: 340px;
        margin: 0 auto;
    }
    .pd-wrap > div:last-child {
        width: 100% !important;
    }
    .pd-btn {
        flex-wrap: nowrap !important;
    }
    .pd-btn .btn {
        flex: 1 !important;
        padding: 12px 8px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {

    /* Helpers */
    .show-mobile  { display: block !important; }
    .show-desktop { display: none !important; }

    /* Nav */
    .nav { display: none; }
    .header__hamburger { display: flex; }
    .topbar { display: none; }

    /* Grid productos */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-card__body  { padding: 10px; }
    .product-card__name  { font-size: 12px; line-height: 1.3; }
    .product-card__price { font-size: 16px; }
    .product-card__desc  { display: none; }
    .product-card__actions { padding: 0 8px 10px; gap: 4px; }
    .btn--cart { font-size: 12px; padding: 9px 6px; }
    .btn--view { padding: 9px 8px; font-size: 12px; }

    /* Carrito */
    .cart-layout  { grid-template-columns: 1fr; gap: 16px; }
    .cart-summary { position: static; padding: 20px; }

    /* Checkout */
    .checkout-layout {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .checkout-zona-datos   { order: 1; }
    .checkout-zona-resumen { order: 2; }
    .checkout-zona-pago    { order: 3; position: static; }
    .co-fields-row { flex-direction: column; }
    .form-row      { grid-template-columns: 1fr !important; }
    #btn-pagar     { width: 100%; }
    .co-notas      { grid-template-columns: 1fr; }

    /* Footer */
    .footer__inner    { grid-template-columns: 1fr; gap: 24px; }
    .trust-bar__inner { display: none; }

    /* Qty táctil — mobile un poco más grande para dedos */
    .qty-btn   { width: 36px; height: 36px; }
    .qty-input { width: 48px; height: 36px; line-height: 36px; font-size: 15px; }
}

/* ── Mobile pequeño ≤480px ──────────────────────── */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .products-grid   { gap: 8px; }
    .product-card__name  { font-size: 11px; }
    .product-card__price { font-size: 14px; }
    .btn--view { display: none; }
    .btn--cart { font-size: 11px; padding: 8px 4px; }
    /* iOS: evitar zoom en inputs */
    .form-input, input[type="text"], input[type="email"],
    input[type="tel"], select, textarea { font-size: 16px !important; }
    /* Excepción: inputs compactos del cupón y qty — no queremos que suban a 16px */
    .co-cupon-row input[type="text"],
    #cupon-input { font-size: 11px !important; }
    .btn     { min-height: 44px; }
    .btn--sm { min-height: 36px; }
}

/* Fix overflow horizontal */
html, body { overflow-x: hidden; }

/* ── Qty control en cards de productos ───────────── */
.card-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}
.card-qty-btn {
    width: 26px;
    height: 26px;
    background: var(--bg);
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    flex-shrink: 0;
}
.card-qty-btn:hover { background: var(--accent-light); color: var(--accent); }
.card-qty-val {
    width: 34px;
    height: 26px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    font-family: inherit;
    -moz-appearance: textfield;
    appearance: textfield;
}
.card-qty-val::-webkit-outer-spin-button,
.card-qty-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Qty control en página de producto ───────────── */
.pd-qty-control {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.pd-qty-btn {
    width: 38px;
    height: 38px;
    background: var(--bg);
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.pd-qty-btn:hover { background: var(--accent-light); color: var(--accent); }
.pd-qty-val {
    width: 52px;
    height: 38px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-radius: 0;
    outline: none;
    padding: 0;
    font-family: inherit;
    -moz-appearance: textfield;
    appearance: textfield;
}
.pd-qty-val::-webkit-outer-spin-button,
.pd-qty-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* ── Hero side stats ─────────────────────────────── */
.hero__side {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 280px;
}
.hero__stat {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}
.hero__stat-num {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.hero__stat-label {
    font-size: 11px;
    color: rgba(255,255,255,.65);
    line-height: 1.3;
}

/* Hero title break — solo en desktop */
.hero__br-desktop { display: none; }
@media (min-width: 769px) {
    .hero__br-desktop { display: inline; }
}

/* ================================================
   Rich Content — renderiza HTML de TinyMCE
   ================================================ */
.rich-content { font-size:15px; color:var(--text-muted); line-height:1.7; font-family:var(--font); }
.rich-content p  { margin-bottom:10px; }
.rich-content h2 { font-size:15px; font-weight:800; color:var(--primary); margin:14px 0 6px; }
.rich-content h3 { font-size:13px; font-weight:700; color:var(--primary); margin:12px 0 5px; }
.rich-content ul { list-style:disc !important; padding-left:20px; margin:8px 0 12px; }
.rich-content ul[style*="circle"] { list-style:disc !important; }
.rich-content ul[style*="square"] { list-style:disc !important; }
.rich-content ol { list-style:decimal !important; padding-left:20px; margin:8px 0 12px; }
.rich-content li { margin-bottom:5px; line-height:1.6; list-style:inherit !important; }
.rich-content li:empty, .rich-content li:blank { display:none; }
.rich-content strong { color:var(--text); font-weight:700; }
.rich-content em { font-style:italic; }
.rich-content a  { color:var(--accent); text-decoration:underline; }
.rich-content table { width:100%; border-collapse:collapse; margin:10px 0; font-size:12px; }
.rich-content table th { background:var(--bg); font-weight:700; padding:9px 13px; border:1px solid var(--border); color:var(--primary); text-align:left; }
.rich-content table td { padding:8px 13px; border:1px solid var(--border); color:var(--text-muted); }
.rich-content table tr:nth-child(even) td { background:var(--bg); }
.rich-content br { display:block; margin-bottom:4px; }
/* ================================================
   WhatsApp botón flotante — SoftSmart
   ================================================ */
.wa-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(37,211,102,.4);
    z-index: 90;
    transition: transform var(--transition), box-shadow var(--transition);
    animation: wa-pulse 2.5s infinite;
}
.wa-float:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(37,211,102,.55);
}
@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 6px 16px rgba(37,211,102,.4), 0 0 0 0 rgba(37,211,102,.35); }
    50%      { box-shadow: 0 6px 16px rgba(37,211,102,.4), 0 0 0 14px rgba(37,211,102,0); }
}
@media (max-width: 640px) {
    .wa-float { width: 48px; height: 48px; bottom: 16px; left: 16px; }
    .wa-float svg { width: 26px; height: 26px; }
}

/* ================================================
   Responsive SoftSmart — header en mobile
   ================================================ */
@media (max-width: 960px) {
    .container { width: 100%; }
    .header { min-height: 58px; }
    .header__inner {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
        min-height: 58px;
        padding: 8px 16px;
    }
    .header__search-wrap { display: none; }  /* se mueve al mobile menu */
    .header__logo { justify-self: start; padding-left: 4px; }
    .header__logo-text { font-size: 20px; }
    .header__logo img { height: 34px; }
    .header__cart-btn { padding: 7px 11px; font-size: 13px; }
    .header__cart-btn span { display: none; }  /* solo ícono en mobile */
    .header__login { display: none; }
    .header__hamburger { display: flex; }
    .main-menu { display: none; }  /* se mueve al mobile menu */

    /* Menos espacio vertical entre header y contenido */
    .section { padding: 20px 0; }
    .section__header { margin-bottom: 16px; }
    .section__header--left { margin-bottom: 12px; }
}

/* Títulos de sección SoftSmart-style — MAYÚSCULAS con separación */
.section__title {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}/* ============================================================================
   Category Promo Banner
   Pegar este bloque al FINAL de /public/css/main.css
   ============================================================================ */

/* Layout del page-header con banner a la derecha */
.page-header--with-promo .page-header__layout {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.page-header--with-promo .page-header__info {
    flex: 0 0 auto;
    min-width: 0;
}
.page-header--with-promo .category-promo {
    flex: 0 1 auto;          /* NO se estira: solo ocupa lo que su contenido necesita */
    min-width: 0;
    margin-left: auto;       /* Empujar hacia el centro por la izquierda */
    margin-right: auto;      /* Empujar hacia el centro por la derecha */
}

/* El banner — estilo neutro: fondo gris claro, borde completo, sombra sutil */
.category-promo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    box-shadow: 0 2px 6px rgba(15, 23, 42, .06);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.category-promo:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .1);
}
.category-promo__text {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    line-height: 1.45;
    margin: 0;
    text-align: center;
    width: 100%;
    min-width: 0;
}

/* Responsive — en móvil el banner pasa debajo del título */
@media (max-width: 768px) {
    .page-header--with-promo .page-header__layout {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .page-header--with-promo .category-promo {
        flex: 1 1 auto;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .category-promo {
        padding: 12px 16px;
    }
    .category-promo__text {
        font-size: 13px;
    }
}

/* ============================================================
   Banner reutilizable para descripciones de categoría
   Uso: <a class="cat-banner" href="..."> ... </a>
   ============================================================ */
.cat-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    background: linear-gradient(90deg, #061b77 0%, #0a48c9 55%, #2d7fff 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    font-family: Arial, Helvetica, sans-serif;
    text-decoration: none;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.cat-banner__badge {
    background: #ff5a2f;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .5px;
    flex-shrink: 0;
    line-height: 1;
}
.cat-banner__title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}
.cat-banner__sep {
    color: rgba(255, 255, 255, .35);
    font-size: 14px;
    flex-shrink: 0;
}
.cat-banner__item {
    color: rgba(255, 255, 255, .95);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.cat-banner__spacer { flex: 1; }
.cat-banner__cta {
    background: #fff;
    color: #0a48c9;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}
/* Variantes para mostrar/ocultar según viewport */
.cat-banner--desktop { display: flex; }
.cat-banner--mobile  { display: none; }
@media (max-width: 768px) {
    .cat-banner--desktop { display: none; }
    .cat-banner--mobile  { display: flex; gap: 8px; padding: 8px 10px; height: auto; }
    .cat-banner--mobile .cat-banner__spacer { display: none; }
    /* En mobile el título envuelve hasta 2 líneas, el CTA no */
    .cat-banner--mobile .cat-banner__title {
        flex: 1 1 0;
        min-width: 0;
        white-space: normal;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Chips de subcategorías en el header de categoría */
.subcat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.subcat-chip {
    display: inline-block;
    padding: 5px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    transition: all var(--transition);
}
.subcat-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ============================================================
   Banner de descuento dinámico con cuenta regresiva (site-wide)
   ============================================================ */
.promo-cd {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 9px 16px;
    background: linear-gradient(90deg, #061b77 0%, #0a48c9 55%, #2d7fff 100%);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    color: #fff;
    font-family: var(--font);
    text-align: center;
}
.promo-cd__badge {
    background: #ff5a2f;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    padding: 4px 12px;
    border-radius: 20px;
    flex-shrink: 0;
}
.promo-cd__text {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, .95);
}
.promo-cd__pct {
    font-size: 16px;
    font-weight: 800;
    color: #ffe600;
}
.promo-cd__timer {
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, .14);
    padding: 4px 12px;
    border-radius: 8px;
    flex-shrink: 0;
}
.promo-cd__val {
    font-variant-numeric: tabular-nums;
    letter-spacing: .5px;
}
@media (max-width: 768px) {
    .promo-cd { gap: 6px 10px; padding: 8px 12px; }
    .promo-cd__text  { font-size: 12px; }
    .promo-cd__pct   { font-size: 14px; }
    .promo-cd__timer { font-size: 12px; padding: 3px 10px; }
}

/* ============================================================================
   Tema Todimas — capa final sobre los componentes heredados
   ============================================================================ */
body { font-size: 16px; }
.container { width: 100%; max-width: 1240px; padding: 0 24px; }
h1, h2, h3, .section__title, .product-card__name, .header__logo-text, .hero__title, .footer__logo { font-family: var(--display); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.section__title, .main-menu__link, .section__eyebrow, .cart-table th, .co-step-label, .form-label, .footer__title { text-transform: none; letter-spacing: 0; }
.section__title { font-weight: 750; letter-spacing: -0.02em; color: var(--text); }
.section__eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); }
.form-label { font-size: 13px; color: var(--text); }
.footer__title { font-size: 15px; }

.topbar { font-size: 12.5px; background: var(--primary-dark); border-bottom: 0; }
.topbar__links { font-size: 12.5px; }
.header__logo-text { font-style: normal; font-weight: 800; letter-spacing: -0.03em; }
.header__search-input { border-radius: 999px; }
.header__cart-btn { border-radius: 999px; }
.main-menu { background: var(--primary); border-top: 1px solid rgba(255,255,255,.1); }
.main-menu__link { font-weight: 600; font-size: 15px; }

.btn { border-radius: var(--radius); font-weight: 700; }
.btn--primary:hover { background: var(--accent-hover); }

.product-card { border-radius: var(--radius-lg); border-color: var(--border); }
.product-card:hover { transform: none; box-shadow: var(--shadow-lg); }
.product-card__badge { border-radius: 999px; font-weight: 700; }
.product-card__name { font-weight: 650; letter-spacing: -0.01em; }
.product-card__price { font-family: var(--display); letter-spacing: -0.02em; }
.product-card__price-note { color: var(--accent-hover); font-weight: 600; }
.product-card__actions .card-qty-control, .product-card__actions .btn--view { display: none; }
.product-card__actions .btn--cart { flex: 1; min-height: 44px; border-radius: var(--radius); background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; }
.product-card__actions .btn--cart:hover { background: var(--accent-hover); }
.btn--cart, .btn--cart.btn--dark { background: var(--accent); color: #fff; }
.btn--cart:hover, .btn--cart.btn--dark:hover { background: var(--accent-hover); }
.pd-cod { min-height: 48px; margin-bottom: 12px; background: var(--yellow); color: var(--primary); font-size: 15px; }
.pd-cod:hover { background: var(--yellow-hover); }
.pasos { list-style: none; padding: 0; }

/* Portada: la promesa de pago al recibir */
.inicio { background: var(--primary); color: #fff; padding: 48px 0 52px; }
.inicio__grid { display: grid; gap: 28px; align-items: center; }
.inicio__titulo { font-family: var(--display); font-weight: 780; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -0.035em; max-width: 15ch; text-wrap: balance; }
.inicio__bajada { margin-top: 14px; font-size: 18px; color: rgba(255,255,255,.78); max-width: 46ch; }
.inicio__acciones { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.inicio__acciones .btn { min-height: 50px; padding: 0 24px; font-size: 16px; }
.inicio__acciones .btn--ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.inicio__acciones .btn--ghost:hover { border-color: #fff; }
.boleto {
    --muesca: 13px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 26px 30px;
    background: var(--yellow);
    color: var(--primary);
    border-radius: 8px;
    -webkit-mask: radial-gradient(circle var(--muesca) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                  radial-gradient(circle var(--muesca) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--muesca) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
          radial-gradient(circle var(--muesca) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.boleto__izq { padding-right: 18px; border-right: 2px dashed rgba(16,35,63,.35); }
.boleto__titulo { font-family: var(--display); font-weight: 780; font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; }
.boleto__lista { margin-top: 10px; display: grid; gap: 4px; font-size: 15px; }
.boleto__lista li::before { content: '✓'; font-weight: 800; margin-right: 8px; color: var(--accent-hover); }
.boleto__der { text-align: center; font-family: var(--display); font-weight: 800; line-height: 1; }
.boleto__cero { font-size: 54px; letter-spacing: -0.04em; }
.boleto__der small { display: block; font-family: var(--font); font-size: 13px; font-weight: 600; margin-top: 6px; }

.pasos { counter-reset: paso; display: grid; gap: 22px; margin-top: 8px; }
.pasos li { counter-increment: paso; position: relative; padding-left: 58px; color: var(--text-muted); max-width: 42ch; }
.pasos li::before { content: counter(paso); position: absolute; left: 0; top: -2px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--primary); font: 800 20px/1 var(--display); }
.pasos strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 2px; }

@media (min-width: 900px) {
    .inicio { padding: 72px 0 76px; }
    .inicio__grid { grid-template-columns: 1.2fr 1fr; gap: 56px; }
    .pasos { grid-template-columns: repeat(3, 1fr); gap: 36px; }
}
@media (max-width: 960px) {
    .container { padding: 0 16px; }
    .boleto { padding: 22px 24px; }
    .boleto__cero { font-size: 44px; }
}

/* Checkout: "Paga al recibir" destacado */
.gateway-option.gateway-option--cod { border-left: 5px solid var(--yellow); }
.gateway-option--cod .gateway-option__name { font-weight: 800; }
.co-cod-nota { margin: 8px 0 0; padding: 10px 12px; font-size: 13px; color: var(--text-muted); background: var(--bg); border-radius: var(--radius); }
