/* ================================================
   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: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* Variables — Tema SoftSmart */
:root {
    --primary:     #0a0a0a;   /* Negro corporativo (header, menú, footer) */
    --primary-dark:#000000;   /* Negro puro para hover y bordes */
    --primary-light:#1a1a1a;  /* Gris muy oscuro para highlights */
    --accent:      #FFB400;   /* Amarillo digitalcode para CTA / precios */
    --accent-hover:#E6A200;
    --accent-light:#FFF8E1;   /* Fondo sutil amarillo claro */
    --yellow:      #FFE600;   /* Amarillo badge "En oferta" y botón carrito */
    --yellow-hover:#E6CF00;
    --yellow-dark: #B8A000;   /* Texto sobre amarillo si hace falta contraste */
    --success:     #25D366;   /* Verde WhatsApp */
    --success-dark:#128C7E;
    --danger:      #dc2626;
    --warning:     #d97706;
    --text:        #2C3E50;   /* Texto principal — gris azulado oscuro */
    --text-muted:  #7B8794;   /* Texto secundario */
    --border:      #E0E0E0;   /* Borde neutro gris */
    --bg:          #F4F4F4;   /* Fondo general gris muy claro */
    --bg-section:  #FFFFFF;   /* Fondo de secciones */
    --white:       #ffffff;
    --radius:      6px;       /* Bordes más rectos que el original */
    --radius-lg:   8px;
    --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:   0 2px 6px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
    --shadow-lg:   0 4px 12px rgba(0,0,0,.08);
    --transition:  .2s ease;
    --font:        'Plus Jakarta Sans', 'Open Sans', system-ui, sans-serif;
}

/* 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(--primary);
    color: #fff;
    font-size: 12px;
    padding: 8px 0;
    min-height: 36px;
    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: 16px; font-size: 12px; 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(--primary);
    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 amarillo del carrito — protagonista visual del header */
.header__cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--yellow);
    color: var(--primary);
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    transition: all var(--transition);
    white-space: nowrap;
}
.header__cart-btn:hover { background: var(--yellow-hover); 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(--primary);
    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(--primary); }
.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; }

.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__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; }

.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); }

/* 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(--primary); 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
   ================================================ */
.page-header { background: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; padding: 20px 0; }
.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;
}

/* ── 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%; }

    /* 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: 24px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    user-select: none;
}

/* ── 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: 44px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    user-select: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}
/* ── 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:13px; color:var(--text-muted); line-height:1.7; font-family:'Plus Jakarta Sans','Plus Jakarta Sans Fallback',system-ui,sans-serif; }
.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;
}

/* 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;
    }
    .category-promo {
        padding: 12px 16px;
    }
    .category-promo__text {
        font-size: 13px;
    }
}