/* ============================================================
   ARCHIVO: public/css/style.css
   Paleta: Negro profundo + Morado violeta + Blanco
   Fuentes: Bebas Neue (títulos) + Sora (cuerpo)
   Sin font-awesome — todos los íconos son SVG inline/sprite
   ============================================================ */

/* ── VARIABLES ────────────────────────────────────────────── */
:root {
    /* Colores base — fondo oscuro casi negro con tinte morado */
    --bg:           #09090f;
    --bg-2:         #10101a;
    --bg-3:         #17172a;
    --border:       #2a2040;
    --border-light: #3d2f60;

    /* Texto */
    --text:         #e8e0f5;
    --text-muted:   #7a6d99;

    /* Acento principal: morado vibrante */
    --accent:       #9333ea;   /* purple-600 */
    --accent-2:     #7c22d4;   /* hover más oscuro */
    --accent-glow:  rgba(147,51,234,0.35);
    --accent-soft:  rgba(147,51,234,0.12);

    /* Secundario: violeta claro */
    --violet:       #a855f7;
    --violet-light: #c084fc;

    /* Semánticos */
    --sale:         #f43f5e;
    --sale-soft:    rgba(244,63,94,0.12);
    --success:      #10b981;
    --warning:      #f59e0b;
    --white:        #ffffff;

    /* Estructura */
    --radius:       14px;
    --radius-sm:    9px;
    --radius-pill:  100px;
    --shadow:       0 8px 32px rgba(0,0,0,0.5);
    --shadow-accent:0 4px 24px rgba(147,51,234,0.4);
    --trans:        0.22s cubic-bezier(0.4,0,0.2,1);

    /* Tipografía */
    --font-title:   'Bebas Neue', sans-serif;
    --font-body:    'Sora', sans-serif;
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    min-height: 100vh;
    /* Sutil textura de puntos para profundidad */
    background-image: radial-gradient(circle at 1px 1px, rgba(147,51,234,0.06) 1px, transparent 0);
    background-size: 40px 40px;
}

a { color: var(--violet); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--violet-light); }
img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* SVG icon sizing global — todos los <svg> heredan esto */
svg {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ── NAVBAR ───────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9,9,15,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    gap: 24px;
}

/* Logo */
.navbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-title);
    font-size: 1.65rem;
    letter-spacing: 1px;
    color: var(--white);
    transition: opacity var(--trans);
}
.navbar__logo:hover { opacity: 0.85; color: var(--white); }
.navbar__logo .logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent);
    /* Efecto de brillo sutil en el ícono del logo */
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* Links nav */
.navbar__links {
    display: flex;
    list-style: none;
    gap: 2px;
    align-items: center;
}
.navbar__links a {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    transition: color var(--trans), background var(--trans);
}
.navbar__links a:hover {
    color: var(--white);
    background: var(--bg-3);
}

.navbar__actions { display: flex; align-items: center; gap: 10px; }

/* Botón carrito */
.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 1.15rem;
    transition: border-color var(--trans), color var(--trans), box-shadow var(--trans), transform var(--trans);
}
/* Efecto hover con brillo morado */
.cart-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
    color: var(--accent);
}
/* Efecto click/presión */
.cart-btn:active {
    transform: translateY(0) scale(0.96);
}

.cart-count {
    position: absolute;
    top: -7px;
    right: -7px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    /* Transición para el pulso al actualizar (manejado desde JS) */
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Hamburguesa móvil */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    font-size: 1.2rem;
    transition: border-color var(--trans), color var(--trans);
}
.menu-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ── BOTONES ──────────────────────────────────────────────── */
/* Todos los botones tienen: ripple en click, transición suave, sin outline feo */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    border: none;
    cursor: pointer;
    transition:
        background var(--trans),
        color var(--trans),
        box-shadow var(--trans),
        transform var(--trans),
        border-color var(--trans);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;  /* necesario para el efecto ripple */
    user-select: none;
}
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Efecto ripple CSS puro al hacer click */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    border-radius: inherit;
    transition: background 0.15s;
}
.btn:active::after {
    background: rgba(255,255,255,0.12);
}

/* Escala al presionar — sensación de presión física */
.btn:active { transform: scale(0.97); }

/* Btn primario: blanco/texto oscuro */
.btn--primary {
    background: var(--white);
    color: var(--bg);
}
.btn--primary:hover {
    background: var(--violet-light);
    color: var(--bg);
    box-shadow: 0 4px 20px rgba(192,132,252,0.4);
    transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0) scale(0.97); }

/* Btn acento: morado vibrante — el más importante */
.btn--accent {
    background: var(--accent);
    color: var(--white);
    /* Gradiente sutil de izquierda a derecha */
    background-image: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
}
.btn--accent:hover {
    background-image: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: var(--shadow-accent), 0 8px 24px rgba(147,51,234,0.3);
    transform: translateY(-2px);
    color: var(--white);
}
.btn--accent:active { transform: translateY(0) scale(0.97); }

/* Btn fantasma/outline */
.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--violet-light);
    background: var(--accent-soft);
}
.btn--ghost:active { transform: scale(0.97); }

/* Btn peligro */
.btn--danger {
    background: var(--sale-soft);
    color: var(--sale);
    border: 1px solid rgba(244,63,94,0.3);
}
.btn--danger:hover {
    background: var(--sale);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(244,63,94,0.4);
    transform: translateY(-1px);
}

/* Btn WhatsApp */
.btn--whatsapp {
    background: #25d366;
    color: var(--white);
    background-image: linear-gradient(135deg, #25d366 0%, #1da851 100%);
    font-size: 1rem;
}
.btn--whatsapp:hover {
    background-image: linear-gradient(135deg, #1da851 0%, #19923f 100%);
    box-shadow: 0 4px 20px rgba(37,211,102,0.45);
    transform: translateY(-2px);
    color: var(--white);
}

/* Btn deshabilitado */
.btn--disabled {
    background: var(--bg-3);
    color: var(--text-muted);
    cursor: not-allowed;
    border: 1px solid var(--border);
    opacity: 0.7;
}
.btn--disabled:hover, .btn--disabled:active {
    transform: none;
    box-shadow: none;
}

/* Modificadores de tamaño */
.btn--full { width: 100%; }
.btn--lg   { padding: 15px 32px; font-size: 0.95rem; border-radius: var(--radius); }
.btn--sm   { padding: 7px 14px; font-size: 0.78rem; }
.btn--add-cart { flex: 1; }

/* Icono SVG dentro del botón */
.btn svg { width: 1.1em; height: 1.1em; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    /* Gradiente morado en el fondo del hero */
    background:
        radial-gradient(ellipse 55% 70% at 75% 50%, rgba(147,51,234,0.14) 0%, transparent 65%),
        radial-gradient(ellipse 35% 55% at 15% 75%, rgba(124,58,237,0.09) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, #0d0a1a 100%);
}
/* Línea de cuadrícula sutil en el hero */
.hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(147,51,234,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147,51,234,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}
/* Brillo en esquina superior derecha */
.hero__bg::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(147,51,234,0.12) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 620px;
    padding: 80px 0;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--violet);
    margin-bottom: 20px;
    /* Pill decorativo */
    background: var(--accent-soft);
    border: 1px solid rgba(147,51,234,0.3);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
}

.hero__title {
    font-family: var(--font-title);
    font-size: clamp(4rem, 8.5vw, 8.5rem);
    line-height: 0.93;
    letter-spacing: -1px;
    color: var(--white);
    margin-bottom: 24px;
    /* Animación de entrada */
    animation: heroSlideIn 0.7s cubic-bezier(0.22,1,0.36,1) both;
}
.hero__accent {
    /* El accent text tiene un gradiente morado */
    background: linear-gradient(135deg, var(--violet-light) 0%, var(--accent) 60%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes heroSlideIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero__subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    animation: heroSlideIn 0.7s 0.15s cubic-bezier(0.22,1,0.36,1) both;
}

/* ── FILTROS ──────────────────────────────────────────────── */
.filters {
    padding: 28px 0 0;
    background: var(--bg);
    position: sticky;
    top: 66px;
    z-index: 90;
    border-bottom: 1px solid var(--border);
}

.filters__bar {
    display: flex;
    gap: 8px;
    padding-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.filters__bar::-webkit-scrollbar { display: none; }

.filter-chip {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    background: var(--bg-3);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: background var(--trans), color var(--trans), border-color var(--trans), transform var(--trans), box-shadow var(--trans);
    cursor: pointer;
}
.filter-chip:hover {
    color: var(--violet-light);
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}
.filter-chip.active {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* ── CATÁLOGO ─────────────────────────────────────────────── */
.catalog-section { padding: 48px 0 80px; }

.section-header { margin-bottom: 40px; }
.section-title {
    font-family: var(--font-title);
    font-size: 2.8rem;
    color: var(--white);
    letter-spacing: 1px;
}
.section-desc { color: var(--text-muted); margin-top: 8px; }

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

/* ── PRODUCT CARD ─────────────────────────────────────────── */
.product-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform var(--trans),
        box-shadow var(--trans),
        border-color var(--trans);
    position: relative;
}
.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(147,51,234,0.4);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(147,51,234,0.1);
}
.product-card--sale { border-color: rgba(244,63,94,0.3); }

/* Badges */
.badge {
    position: absolute;
    z-index: 2;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge--sale { background: var(--sale); color: var(--white); top: 12px; right: 12px; }
.badge--combo { background: var(--accent); color: var(--white); top: 12px; left: 12px; }
.badge--low-stock {
    background: rgba(245,158,11,0.15);
    color: var(--warning);
    border: 1px solid rgba(245,158,11,0.4);
    top: 44px;
    right: 12px;
}
.badge--sm { font-size: 0.6rem; padding: 2px 8px; position: static; display: inline-block; }

/* Imagen */
.product-card__img-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--bg-3);
    position: relative;
}
/* Overlay morado tenue al hover sobre la imagen */
.product-card__img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(147,51,234,0);
    transition: background 0.35s;
}
.product-card:hover .product-card__img-wrap::after {
    background: rgba(147,51,234,0.06);
}
.product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}
.product-card:hover .product-card__img { transform: scale(1.06); }

/* Body de la card */
.product-card__body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.product-card__category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--violet);
}

.product-card__name a {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--trans);
}
.product-card__name a:hover { color: var(--violet-light); }

/* Precios */
.product-card__price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.price--normal  { font-size: 1.2rem; font-weight: 700; color: var(--white); }
.price--sale    { font-size: 1.2rem; font-weight: 700; color: var(--sale); }
.price--original { font-size: 0.82rem; color: var(--text-muted); text-decoration: line-through; }

/* Temporizador */
.offer-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    color: var(--sale);
    background: var(--sale-soft);
    border: 1px solid rgba(244,63,94,0.25);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.offer-timer__icon { width: 14px; height: 14px; flex-shrink: 0; }
.timer-display { display: flex; align-items: center; gap: 2px; }
.timer-unit { text-align: center; }
.timer-unit b { font-size: 0.88rem; font-weight: 700; }
.timer-unit small { font-size: 0.58rem; display: block; opacity: 0.7; }
.timer-sep { font-weight: 700; opacity: 0.4; padding: 0 1px; }

/* Footer de la card */
.product-card__footer {
    padding: 12px 16px 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-top: 1px solid var(--border);
}

/* Control de cantidad */
.qty-control {
    display: flex;
    align-items: center;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color var(--trans);
}
.qty-control:focus-within { border-color: var(--accent); }

.qty-btn {
    width: 34px;
    height: 38px;
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--trans), color var(--trans), transform 0.1s;
}
.qty-btn:hover { background: var(--accent-soft); color: var(--violet-light); }
/* Efecto presión en el botón de cantidad */
.qty-btn:active { transform: scale(0.85); }

.qty-input {
    width: 36px;
    height: 38px;
    text-align: center;
    background: none;
    border: none;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-body);
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.empty-state__icon { width: 64px; height: 64px; opacity: 0.3; }

/* ── CART DRAWER ──────────────────────────────────────────── */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9,9,15,0.7);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 390px;
    max-width: 100vw;
    background: var(--bg-2);
    border-left: 1px solid var(--border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -12px 0 48px rgba(0,0,0,0.6);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.cart-drawer__header h3 { font-weight: 700; font-size: 1.05rem; }
.cart-drawer__header button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: border-color var(--trans), color var(--trans), transform var(--trans);
}
.cart-drawer__header button:hover {
    border-color: var(--sale);
    color: var(--sale);
    transform: rotate(90deg);
}

.cart-drawer__items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.cart-drawer__footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-3);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.cart-total strong { font-size: 1.3rem; color: var(--violet-light); }

/* Mini ítem del drawer */
.drawer-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--trans);
}
.drawer-item:hover { border-color: var(--border-light); }
.drawer-item img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 7px;
    background: var(--bg);
    flex-shrink: 0;
}
.drawer-item__info { flex: 1; min-width: 0; }
.drawer-item__name { font-size: 0.83rem; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-item__price { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.drawer-item__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: background var(--trans), color var(--trans), transform var(--trans);
    flex-shrink: 0;
    font-size: 0.9rem;
}
.drawer-item__remove:hover {
    background: var(--sale-soft);
    color: var(--sale);
    transform: scale(1.1);
}

/* ── CART PAGE ────────────────────────────────────────────── */
.page-section { padding: 48px 0 80px; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 16px;
    flex-wrap: wrap;
}
.page-title {
    font-family: var(--font-title);
    font-size: 3rem;
    color: var(--white);
    letter-spacing: 1px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.cart-items-table {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.cart-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 40px;
    padding: 13px 24px;
    background: var(--bg-3);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 40px;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    transition: background var(--trans);
}
.cart-item:last-of-type { border-bottom: none; }
.cart-item:hover { background: rgba(147,51,234,0.03); }

.cart-item__product { display: flex; align-items: center; gap: 16px; }
.cart-item__product img {
    width: 72px; height: 72px; object-fit: cover;
    border-radius: var(--radius-sm); background: var(--bg-3);
    border: 1px solid var(--border);
}
.cart-item__name { font-weight: 600; font-size: 0.88rem; }
.cart-item__price { font-size: 0.88rem; }
.item-subtotal { font-weight: 700; color: var(--violet-light); }

.btn-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--trans), color var(--trans), border-color var(--trans), transform var(--trans);
}
.btn-remove:hover {
    background: var(--sale-soft);
    color: var(--sale);
    border-color: rgba(244,63,94,0.3);
    transform: scale(1.1);
}

.cart-actions { padding: 14px 24px; border-top: 1px solid var(--border); }

.cart-summary__box, .checkout-summary__box {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cart-summary__box h3, .checkout-summary__box h3 { font-weight: 700; }

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-muted);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.summary-row--total {
    color: var(--text);
    font-size: 1.05rem;
    border-bottom: none;
    padding-bottom: 0;
}
.summary-row--total strong { color: var(--violet-light); font-size: 1.35rem; }

.cart-whatsapp-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: #25d366;
    background: rgba(37,211,102,0.07);
    border: 1px solid rgba(37,211,102,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}
.cart-whatsapp-note svg { width: 15px; height: 15px; flex-shrink: 0; }

.empty-cart {
    text-align: center;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.empty-cart__icon { font-size: 5rem; opacity: 0.2; }
.empty-cart h2 { font-family: var(--font-title); font-size: 2.5rem; }
.empty-cart p { color: var(--text-muted); }

/* ── CHECKOUT ─────────────────────────────────────────────── */
.checkout-steps {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    font-size: 0.82rem;
    font-weight: 600;
}
.step {
    padding: 9px 20px;
    color: var(--text-muted);
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.step.active {
    color: var(--white);
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
}
.step.done {
    color: var(--violet-light);
    border-color: rgba(147,51,234,0.5);
    background: var(--accent-soft);
}
.step-line { flex: 1; height: 1px; background: var(--border); min-width: 16px; }

.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }

.checkout-form-wrap {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}
.form-section { margin-bottom: 0; }
.form-section__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--white);
}
.form-section__title svg { width: 20px; height: 20px; color: var(--accent); }
.form-section__desc { color: var(--text-muted); font-size: 0.83rem; margin-bottom: 24px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.required { color: var(--accent); }

.form-control {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--white);
    padding: 12px 15px;
    font-size: 0.93rem;
    font-family: var(--font-body);
    transition: border-color var(--trans), box-shadow var(--trans);
    width: 100%;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-control::placeholder { color: var(--text-muted); opacity: 0.6; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.checkout-submit { margin-top: 8px; }
.checkout-legal {
    text-align: center;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Resumen checkout */
.checkout-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.checkout-item { display: flex; gap: 12px; align-items: center; }
.checkout-item__img { position: relative; flex-shrink: 0; }
.checkout-item__img img {
    width: 54px; height: 54px; object-fit: cover;
    border-radius: var(--radius-sm); background: var(--bg-3);
    border: 1px solid var(--border);
}
.checkout-item__qty {
    position: absolute; top: -6px; right: -6px;
    background: var(--accent); color: var(--white);
    font-size: 0.6rem; font-weight: 700;
    min-width: 18px; height: 18px; padding: 0 3px;
    border-radius: var(--radius-pill);
    display: flex; align-items: center; justify-content: center;
}
.checkout-item__info { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.checkout-item__name { font-size: 0.83rem; font-weight: 600; }
.checkout-item__price { font-size: 0.83rem; font-weight: 700; color: var(--violet-light); white-space: nowrap; }
.checkout-total {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 16px; border-top: 1px solid var(--border); font-size: 1rem;
}
.checkout-total strong { font-size: 1.4rem; color: var(--violet-light); }

/* ── SUCCESS PAGE ─────────────────────────────────────────── */
.success-wrap {
    max-width: 560px; margin: 0 auto; text-align: center;
    padding: 60px 0; display: flex; flex-direction: column;
    align-items: center; gap: 24px;
}
.success-icon { margin-bottom: 4px; }
.success-circle {
    width: 90px; height: 90px; border-radius: 50%;
    background: var(--accent-soft); border: 2px solid var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; color: var(--accent);
    animation: popIn 0.55s cubic-bezier(0.34,1.56,0.64,1) forwards;
    box-shadow: 0 0 32px var(--accent-glow);
}
.success-circle svg { width: 40px; height: 40px; }
@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.success-title { font-family: var(--font-title); font-size: 3.5rem; color: var(--white); letter-spacing: 1px; }
.success-subtitle { color: var(--text-muted); }

.success-card {
    width: 100%; background: var(--bg-2);
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.success-card__row {
    display: flex; justify-content: space-between;
    padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 0.88rem;
}
.success-card__row:last-child { border-bottom: none; }
.success-card__row span { color: var(--text-muted); }
.success-card__row strong { color: var(--violet-light); }

.whatsapp-instruction {
    display: flex; align-items: center; gap: 16px;
    background: rgba(37,211,102,0.06);
    border: 1px solid rgba(37,211,102,0.2);
    border-radius: var(--radius); padding: 20px 24px; text-align: left;
}
.whatsapp-instruction__icon { font-size: 2.5rem; color: #25d366; flex-shrink: 0; }
.whatsapp-instruction__icon svg { width: 44px; height: 44px; }
.whatsapp-instruction h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.whatsapp-instruction p  { font-size: 0.83rem; color: var(--text-muted); }

/* ── ALERTS ───────────────────────────────────────────────── */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 14px 18px; border-radius: var(--radius-sm);
    margin-bottom: 24px; font-size: 0.88rem;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert--error   { background: var(--sale-soft); border: 1px solid rgba(244,63,94,0.3); color: #fb7185; }
.alert--success { background: var(--accent-soft); border: 1px solid rgba(147,51,234,0.3); color: var(--violet-light); }
.alert ul { list-style: none; }
.alert ul li::before { content: '· '; }

/* ── TOAST ────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 22px;
    border-radius: var(--radius-pill);
    font-size: 0.88rem; font-weight: 600;
    z-index: 9999;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
    opacity: 0; pointer-events: none; white-space: nowrap;
    box-shadow: var(--shadow);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.toast--success { border-color: var(--accent); color: var(--violet-light); box-shadow: 0 4px 20px var(--accent-glow); }
.toast.toast--error   { border-color: var(--sale); color: #fb7185; }

/* ── WHATSAPP FLOTANTE ────────────────────────────────────── */
.whatsapp-float {
    position: fixed; bottom: 28px; right: 28px;
    width: 58px; height: 58px;
    background: linear-gradient(135deg, #25d366 0%, #1da851 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; color: var(--white);
    z-index: 150;
    box-shadow: 0 4px 20px rgba(37,211,102,0.45);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s;
    animation: waPulse 3s infinite;
}
.whatsapp-float svg { width: 28px; height: 28px; }
.whatsapp-float:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 30px rgba(37,211,102,0.6);
    color: var(--white);
}
.whatsapp-float:active { transform: scale(0.95); }
@keyframes waPulse {
    0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.45); }
    50%      { box-shadow: 0 4px 36px rgba(37,211,102,0.7); }
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 56px 0 0;
}
.footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer__brand { display: flex; flex-direction: column; gap: 12px; }
.footer__logo {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-title); font-size: 1.5rem;
    color: var(--white);
}
.footer__logo .logo-icon { width: 24px; height: 24px; color: var(--accent); }
.footer__brand p { color: var(--text-muted); font-size: 0.85rem; max-width: 280px; line-height: 1.7; }

.footer__links h4, .footer__contact h4 {
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--text-muted); margin-bottom: 14px;
}
.footer__links ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer__links a { color: var(--text-muted); font-size: 0.84rem; transition: color var(--trans); }
.footer__links a:hover { color: var(--violet-light); }

/* Link WhatsApp en footer */
.footer__wa-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-muted); font-size: 0.85rem;
    transition: color var(--trans);
}
.footer__wa-link svg { width: 18px; height: 18px; color: #25d366; }
.footer__wa-link:hover { color: #25d366; }

/* Barra de copyright con link DevPya */
.footer__bottom {
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    display: flex;
    justify-content: center;
}
.footer__bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
/* Link a DevPya — se destaca con color morado y ícono de link externo */
.footer__devpya {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--violet);
    font-weight: 600;
    font-size: 0.8rem;
    border-bottom: 1px dashed rgba(147,51,234,0.4);
    padding-bottom: 1px;
    transition: color var(--trans), border-color var(--trans);
}
.footer__devpya svg { width: 12px; height: 12px; }
.footer__devpya:hover {
    color: var(--violet-light);
    border-color: var(--violet-light);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* Navbar móvil */
    .navbar__links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 66px; left: 0; right: 0;
        background: var(--bg-2);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 4px;
        z-index: 99;
    }
    .navbar__links.open { display: flex; }
    .menu-toggle { display: flex; }

    .hero__title { font-size: 4rem; }
    .hero__content { padding: 60px 0; }

    /* Checkout form */
    .form-grid { grid-template-columns: 1fr; }
    .checkout-steps { font-size: 0.73rem; }
    .step { padding: 7px 12px; }

    /* Carrito tabla → cards en móvil */
    .cart-table-header { display: none; }
    .cart-item {
        grid-template-columns: 1fr;
        gap: 10px;
        position: relative;
    }
    .cart-item__product { grid-column: 1; }
    .cart-item__remove { position: absolute; top: 20px; right: 24px; }
    .cart-item__price::before  { content: 'Precio: '; font-size: 0.72rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; display: block; margin-bottom: 2px; }
    .cart-item__subtotal::before { content: 'Subtotal: '; font-size: 0.72rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; display: block; margin-bottom: 2px; }

    .footer__inner { grid-template-columns: 1fr; gap: 28px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}
