:root {
    --bg: #e7e9ee;
    --card: #ffffff;
    --texto: #14171f;
    --texto-suave: #6b7280;
    --primario: #e82125;
    --primario-hover: #8f2026;
    --primario-texto: #ffffff;
    --borde: #e8e9ed;
    --sombra: 0 1px 2px rgba(20, 23, 31, 0.04), 0 6px 16px rgba(20, 23, 31, 0.06);
    --radio: 14px;
    --rojo: #e82125;
    --morado: #3397ca;
    --verde-descuento: #16a34a;
    --verde-descuento-bg: #dcfce7;
    --ancho-contenido: min(1800px, 90%);
}

* { box-sizing: border-box; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--texto);
}

a { color: inherit; }

/* ---------- Header ---------- */

.header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--card);
    border-bottom: 1px solid var(--borde);
}

.header-inner {
    max-width: var(--ancho-contenido);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--texto);
    white-space: nowrap;
}
.logo img { height: 48px; width: auto; }
.logo-nombre {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--texto);
}

.buscador-combo {
    flex: 1;
    display: flex;
    max-width: 560px;
    border: 1px solid var(--borde);
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg);
}

.buscador-combo select {
    border: none;
    background: var(--card);
    padding: 0 10px 0 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--texto-suave);
    border-right: 1px solid var(--borde);
    max-width: 175px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.buscador-combo input[type=text] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--texto);
    min-width: 0;
}
.buscador-combo input[type=text]:focus { outline: none; }

.buscador-combo button {
    border: none;
    background: var(--primario);
    color: var(--primario-texto);
    padding: 0 20px;
    cursor: pointer;
    font-size: 15px;
}

.boton-telegram {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primario);
    color: var(--primario-texto);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s ease;
}
.boton-telegram:hover { background: var(--primario-hover); }

/* ---------- Banner (ancho completo) ---------- */

.hero-wrap {
    max-width: var(--ancho-contenido);
    margin: 0 auto;
    padding: 24px 24px 0;
}

/* ---------- Layout (sidebar + contenido) ---------- */

.layout {
    max-width: var(--ancho-contenido);
    margin: 0 auto;
    padding: 24px 24px 60px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: start;
}

.sidebar {
    background: var(--card);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 6px;
    position: sticky;
    top: 78px;
}

.sidebar-titulo {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--texto-suave);
    padding: 12px 14px 6px;
}

.lista-categorias { display: flex; flex-direction: column; }

.lista-categorias a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 9px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--texto);
}
.lista-categorias a:hover { background: var(--bg); }
.lista-categorias a.activa {
    background: var(--primario);
    color: var(--primario-texto);
    font-weight: 600;
}
.lista-categorias .icono { font-size: 15px; }

.principal { min-width: 0; }

/* ---------- Hero ---------- */

.hero {
    background: linear-gradient(135deg, #fdeceb, var(--bg));
    background-size: cover;
    background-position: center;
    border: 1px solid var(--borde);
    border-radius: 18px;
    padding: 44px 32px;
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    isolation: isolate;
}

.hero-con-imagen { border: none; }

.hero-con-imagen::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 10, 10, 0.55);
    border-radius: 18px;
    z-index: -1;
}

.hero.hero-con-imagen .hero-eyebrow { color: #fecaca; }
.hero.hero-con-imagen h1, .hero.hero-con-imagen p { color: #ffffff; }
.hero.hero-con-imagen h1 { background: none; -webkit-text-fill-color: #ffffff; }

.hero-eyebrow {
    margin: 0 0 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primario);
}

.hero h1 {
    margin: 0 0 12px;
    font-size: clamp(24px, 3.4vw, 34px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    background: linear-gradient(90deg, var(--texto) 0%, var(--primario) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero p {
    margin: 0 auto 20px;
    max-width: 460px;
    color: var(--texto-suave);
    font-size: 14.5px;
}

.hero-boton {
    display: inline-block;
    background: var(--texto);
    color: #fff;
    text-decoration: none;
    padding: 13px 26px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: opacity 0.15s ease;
}
.hero-boton:hover { opacity: 0.85; }

.hero-plano {
    text-align: center;
    padding: 40px 24px 8px;
}

.hero-plano h1 {
    margin: 0 0 10px;
    font-size: clamp(26px, 3.6vw, 38px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    background: linear-gradient(90deg, var(--texto) 0%, var(--primario) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero-plano p {
    margin: 0 auto;
    max-width: 560px;
    color: var(--texto-suave);
    font-size: 15px;
}

/* ---------- Tarjetas promocionales por categoría ---------- */

.promo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}
@media (min-width: 720px) {
    .promo-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

.promo-card {
    display: flex;
    flex-direction: column;
    background: var(--texto);
    color: #ffffff;
    border-radius: var(--radio);
    padding: 16px;
    text-decoration: none;
    box-shadow: var(--sombra);
    transition: background 0.15s ease, transform 0.15s ease;
}
.promo-card:hover { background: #2a2f3d; transform: translateY(-2px); }

.promo-card-cabecera {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.promo-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 16px;
    flex-shrink: 0;
}

.promo-card h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.promo-card p {
    margin: 0 0 14px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.75);
    flex-grow: 1;
}

.promo-boton {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--texto);
    background: #ffffff;
    text-align: center;
    padding: 8px 10px;
    border-radius: 8px;
}

/* ---------- Secciones / carruseles ---------- */

.seccion { margin-bottom: 36px; }

.seccion-encabezado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.seccion-encabezado h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.resultados-barra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.orden-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--texto-suave);
    white-space: nowrap;
}

.orden-form select {
    padding: 8px 12px;
    border: 1px solid var(--borde);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: var(--card);
    color: var(--texto);
}

.carrusel-wrap { position: relative; }

.carrusel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.carrusel::-webkit-scrollbar { display: none; }

.carrusel .tarjeta { flex: 0 0 200px; scroll-snap-align: start; }

.flecha {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--borde);
    background: var(--card);
    box-shadow: var(--sombra);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.flecha-izq { left: -14px; }
.flecha-der { right: -14px; }

/* ---------- Tarjetas de producto ---------- */

.resultados-info {
    font-size: 13.5px;
    color: var(--texto-suave);
    margin: 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.tarjeta {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    overflow: hidden;
    box-shadow: var(--sombra);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tarjeta:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(20,23,31,0.06), 0 12px 28px rgba(20,23,31,0.10);
}

.tarjeta-img-wrap { position: relative; }

.tarjeta-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #ffffff;
    padding: 8%;
    display: block;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
}
.badge-nuevo { background: var(--morado); left: auto; right: 10px; }
.badge-oferta { background: var(--verde-descuento); }

.tarjeta-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.tarjeta-categoria {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primario);
}

.tarjeta-titulo {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.tarjeta-precios {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.tarjeta-precio-antes {
    font-size: 12.5px;
    color: var(--texto-suave);
    text-decoration: line-through;
}
.tarjeta-precio-antes::before { content: "$"; }

.tarjeta-precio {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.tarjeta-precio::before {
    content: "$";
    font-weight: 600;
    color: var(--texto-suave);
    margin-right: 1px;
}

.tarjeta-precio-descuento {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--verde-descuento-bg);
    color: var(--verde-descuento);
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
}

.estado {
    text-align: center;
    color: var(--texto-suave);
    padding: 60px 24px;
    font-size: 14.5px;
}

/* ---------- Paginación ---------- */

.paginador {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 36px;
    font-size: 14px;
}

.paginador a {
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--borde);
    background: var(--card);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
}
.paginador a.deshabilitado { opacity: 0.4; pointer-events: none; }
.paginador span { color: var(--texto-suave); }

/* ---------- Página de producto ---------- */

.producto-detalle {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

.migas {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
    color: var(--texto-suave);
    margin-bottom: 20px;
}
.migas a { color: var(--texto-suave); text-decoration: none; }
.migas a:hover { color: var(--primario); text-decoration: underline; }
.migas-actual {
    color: var(--texto);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
}

.producto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    background: var(--card);
    border: 1px solid var(--borde);
    border-radius: 18px;
    padding: 32px;
    box-shadow: var(--sombra);
}

.producto-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid var(--borde);
    border-radius: 12px;
    padding: 6%;
}

.producto-info { display: flex; flex-direction: column; }

.producto-categoria {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primario);
    margin-bottom: 10px;
}

.producto-titulo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0 0 16px;
}

.producto-precios {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.producto-precio-antes {
    font-size: 18px;
    color: var(--texto-suave);
    text-decoration: line-through;
}
.producto-precio-antes::before { content: "$"; }

.producto-precio {
    font-size: 34px;
    font-weight: 800;
    color: var(--primario);
}
.producto-precio::before {
    content: "$";
    font-weight: 600;
    margin-right: 2px;
}

.producto-boton {
    display: inline-block;
    text-align: center;
    background: var(--primario);
    color: var(--primario-texto);
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    transition: background 0.15s ease;
}
.producto-boton:hover { background: var(--primario-hover); }

.producto-nota {
    margin-top: 16px;
    font-size: 12.5px;
    color: var(--texto-suave);
}

.producto-descripcion {
    margin-top: 20px;
    background: var(--card);
    border: 1px solid var(--borde);
    border-radius: 18px;
    padding: 24px 32px;
    box-shadow: var(--sombra);
}
.producto-descripcion h2 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--texto-suave);
    margin: 0 0 12px;
}
.producto-descripcion p {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--texto);
}

/* ---------- Footer ---------- */

.pie {
    border-top: 1px solid var(--borde);
    padding: 28px 24px;
    text-align: center;
    font-size: 12.5px;
    color: var(--texto-suave);
}

.pie a { text-decoration: none; }
.pie a:hover { color: var(--texto); }

.pie-marca { margin-bottom: 10px; }
.pie-marca a { color: var(--primario); font-weight: 600; }

.pie-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
}
.pie-links a { color: var(--texto-suave); }
.pie-links span { color: var(--borde); }

/* ---------- Páginas legales ---------- */

.pagina-legal-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.volver-legal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--texto-suave);
    text-decoration: none;
    margin-bottom: 16px;
}
.volver-legal:hover { color: var(--texto); }

.contenido-legal {
    background: var(--card);
    border: 1px solid var(--borde);
    border-radius: 18px;
    box-shadow: var(--sombra);
    padding: 44px 48px;
    line-height: 1.7;
    font-size: 14.5px;
    color: var(--texto);
}

.contenido-legal h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
}

.contenido-legal .actualizado {
    font-size: 12.5px;
    color: var(--texto-suave);
    margin: 0 0 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--borde);
}

.contenido-legal h2 {
    font-size: 16.5px;
    font-weight: 700;
    margin: 30px 0 10px;
}

.contenido-legal p { margin: 0 0 14px; }

.contenido-legal ul {
    margin: 0 0 14px;
    padding-left: 20px;
}
.contenido-legal li { margin-bottom: 6px; }

.contenido-legal a { color: var(--primario); font-weight: 600; }

.contenido-legal strong { font-weight: 700; }

.contenido-legal code {
    background: var(--bg);
    border: 1px solid var(--borde);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 13px;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.contacto-lista {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 20px;
}

.contacto-fila {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 4px;
    border-top: 1px solid var(--borde);
    font-size: 14.5px;
}
.contacto-fila:first-child { border-top: none; }

.contacto-fila .icono {
    font-size: 17px;
    width: 34px;
    height: 34px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 10px;
}

.contacto-fila a {
    color: var(--texto);
    text-decoration: none;
    font-weight: 600;
}
.contacto-fila a:hover { color: var(--primario); }

@media (max-width: 640px) {
    .contenido-legal { padding: 28px 22px; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; min-width: 0; }
    .lista-categorias { flex-direction: row; overflow-x: auto; gap: 8px; min-width: 0; }
    .lista-categorias a { flex: 0 0 auto; }
    .buscador-combo select { display: none; }
}

@media (max-width: 640px) {
    .header-inner { flex-wrap: wrap; }
    .buscador-combo { order: 3; max-width: none; width: 100%; }
    .boton-telegram { padding: 9px 14px; font-size: 12.5px; }
    .producto-grid { grid-template-columns: 1fr; padding: 20px; }
}
