/* ==========================================================================
   Gnuino — sistema visual
   Escena: alguien navega de noche buscando un regalo con toque personal;
   la litofanía de luna brilla como si tuviera luz propia sobre fondo oscuro.
   Estrategia de color: Committed — noche como base neutra, dorado-luna
   como acento dominante (nav, CTAs, glow, precios).
   ========================================================================== */

:root {
    --noche: #0c0c18;
    --noche-2: #15152a;
    --noche-3: #1f1f3a;
    --noche-borde: rgba(243, 183, 91, 0.16);

    --luna: #f3b75b;
    --luna-suave: #ffd98a;
    --luna-fuerte: #d99a3a;

    --porcelana: #f5f4f9;
    --porcelana-2: #ffffff;

    --texto-noche: #ece9f6;
    --texto-noche-mute: #b6b2cc;
    --texto-claro: #1c1b2b;
    --texto-claro-mute: #625f78;

    --exito: #3fa796;
    --peligro: #e1553f;
    --descuento: #ef4d79;

    --radio: 20px;
    --radio-sm: 12px;
    --sombra: 0 24px 48px -20px rgba(6, 6, 16, 0.55);
    --sombra-sm: 0 8px 20px -10px rgba(6, 6, 16, 0.4);

    --font-display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    --font-body: 'Manrope', 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--porcelana);
    color: var(--texto-claro);
    font-family: var(--font-body);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, .display {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    font-weight: 700;
    color: inherit;
}

p {
    max-width: 68ch;
}

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: var(--luna);
    color: var(--noche);
}

:focus-visible {
    outline: 2px solid var(--luna);
    outline-offset: 3px;
    border-radius: 4px;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--porcelana);
}

::-webkit-scrollbar-thumb {
    background: #d8d4e6;
    border-radius: 20px;
    border: 3px solid var(--porcelana);
}

.site-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------------------------------------------------------------------- */
/* Navbar                                                                  */
/* ---------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--noche-2);
    color: var(--texto-noche);
    border-bottom: 1px solid var(--noche-borde);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo {
    display: block;
    height: 34px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.nav-links a {
    display: block;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--texto-noche-mute);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--porcelana-2);
    background: rgba(243, 183, 91, 0.1);
}

.nav-links a.activo {
    color: var(--noche);
    background: var(--luna);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 260px;
    background: var(--noche-3);
    border: 1px solid var(--noche-borde);
    border-radius: var(--radio-sm);
    padding: 8px;
    box-shadow: var(--sombra);
    display: grid;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.92rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--noche-borde);
    color: var(--porcelana-2);
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}

.cart-link svg {
    width: 18px;
    height: 18px;
}

.cart-count {
    background: var(--luna);
    color: var(--noche);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--noche-borde);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    color: var(--porcelana-2);
    align-items: center;
    justify-content: center;
}

@media (max-width: 860px) {
    .nav-toggle {
        display: flex;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--noche-2);
        border-bottom: 1px solid var(--noche-borde);
        padding: 10px 20px 16px;
        display: none;
        gap: 2px;
    }
    .nav-links.abierto {
        display: flex;
    }
    .nav-dropdown-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 10px;
        margin-top: 2px;
    }
    .nav-dropdown.abierto .nav-dropdown-panel {
        display: grid;
    }
}

/* ---------------------------------------------------------------------- */
/* Breadcrumb                                                              */
/* ---------------------------------------------------------------------- */

.breadcrumb-bar {
    padding: 16px 0 4px;
}

.breadcrumb-bar ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    color: var(--texto-claro-mute);
}

.breadcrumb-bar a {
    color: var(--texto-claro-mute);
    font-weight: 600;
}

.breadcrumb-bar a:hover {
    color: var(--luna-fuerte);
}

.breadcrumb-bar li[aria-current] {
    color: var(--texto-claro);
    font-weight: 700;
}

.breadcrumb-bar li:not(:last-child)::after {
    content: '/';
    margin-left: 6px;
    color: #c9c5da;
}

/* ---------------------------------------------------------------------- */
/* Botones y badges                                                       */
/* ---------------------------------------------------------------------- */

.btn-gnuino {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    line-height: 1;
}

.btn-gnuino:active {
    transform: scale(0.97);
}

.btn-gnuino svg {
    width: 18px;
    height: 18px;
}

.btn-luna {
    background: var(--luna);
    color: var(--noche);
    box-shadow: var(--sombra-sm);
}

.btn-luna:hover {
    background: var(--luna-suave);
    transform: translateY(-1px);
}

.btn-noche {
    background: var(--noche);
    color: var(--porcelana-2);
}

.btn-noche:hover {
    background: var(--noche-3);
    transform: translateY(-1px);
}

.btn-contorno {
    background: transparent;
    border-color: var(--noche);
    color: var(--noche);
}

.btn-contorno:hover {
    background: var(--noche);
    color: var(--porcelana-2);
}

.btn-whatsapp {
    background: var(--exito);
    color: #ffffff;
    box-shadow: var(--sombra-sm);
}

.btn-whatsapp:hover {
    background: #35907f;
    transform: translateY(-1px);
}

.btn-bloque {
    width: 100%;
}

.btn-gnuino:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.badge-descuento {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--descuento);
    color: #fff;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 5px 11px;
    border-radius: 999px;
    z-index: 2;
}

.precio-actual {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--noche);
}

.precio-anterior {
    text-decoration: line-through;
    color: var(--texto-claro-mute);
    font-size: 0.9rem;
    margin-right: 6px;
}

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

.hero {
    background: radial-gradient(120% 140% at 15% 0%, var(--noche-3) 0%, var(--noche) 58%);
    color: var(--texto-noche);
    overflow: hidden;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
    padding: 72px 0 88px;
}

.hero-copy p {
    color: var(--texto-noche-mute);
    font-size: 1.08rem;
    margin: 18px 0 30px;
}

.hero-titulo {
    font-size: clamp(2.4rem, 4.4vw, 3.6rem);
    line-height: 1.05;
    color: var(--porcelana-2);
}

.hero-titulo em {
    font-style: normal;
    color: var(--luna);
}

.hero-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

.hero-particulas {
    position: absolute;
    inset: -80px;
    width: calc(100% + 160px);
    height: calc(100% + 160px);
    z-index: 0;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243, 183, 91, 0.45) 0%, rgba(243, 183, 91, 0) 70%);
    filter: blur(6px);
    animation: pulso 5s ease-in-out infinite;
    z-index: 1;
}

.hero-luna {
    position: relative;
    z-index: 2;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(243, 183, 91, 0.35), 0 30px 70px -20px rgba(0, 0, 0, 0.7);
    animation: flotar 6s ease-in-out infinite;
}

.hero-luna-capa {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-luna-reveal {
    opacity: 0;
}

.hero-luna-tag {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    background: rgba(12, 12, 24, 0.72);
    color: var(--porcelana-2);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    white-space: nowrap;
    backdrop-filter: blur(6px);
}

@keyframes flotar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

@keyframes pulso {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-luna, .hero-glow, .whatsapp-flotante::after, html {
        animation: none !important;
        scroll-behavior: auto;
    }
}

@media (max-width: 1240px) {
    .hero-grid {
        grid-template-columns: 1fr;
        padding: 44px 0 56px;
        text-align: center;
    }
    .hero-acciones {
        justify-content: center;
    }
    .hero-visual {
        order: -1;
        min-height: 260px;
    }
    .hero-luna {
        width: 220px;
        height: 220px;
    }
    .hero-glow {
        width: 300px;
        height: 300px;
    }
}

/* ---------------------------------------------------------------------- */
/* Secciones / encabezados                                                */
/* ---------------------------------------------------------------------- */

.seccion {
    padding: 64px 0;
}

.seccion-noche {
    background: var(--noche);
    color: var(--texto-noche);
}

.seccion-titulo {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.seccion-titulo h2 {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    margin: 0;
}

.seccion-titulo p {
    margin: 6px 0 0;
    color: var(--texto-claro-mute);
}

.seccion-noche .seccion-titulo p {
    color: var(--texto-noche-mute);
}

.lineas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.linea-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border-radius: var(--radio);
    background: var(--noche-3);
    border: 1px solid var(--noche-borde);
    color: var(--porcelana-2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.linea-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sombra);
    border-color: var(--luna);
}

.linea-card-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(243, 183, 91, 0.14);
    color: var(--luna);
    flex-shrink: 0;
}

.linea-card-icono svg {
    width: 24px;
    height: 24px;
}

.linea-card-texto {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.linea-card-nombre {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.08rem;
}

.linea-card-descripcion {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--texto-noche-mute);
}

.linea-card-flecha {
    width: 18px;
    height: 18px;
    color: var(--texto-noche-mute);
    flex-shrink: 0;
    transition: transform 0.15s ease, color 0.15s ease;
}

.linea-card:hover .linea-card-flecha {
    transform: translateX(4px);
    color: var(--luna);
}

/* ---------------------------------------------------------------------- */
/* Como comprar (pasos, home)                                             */
/* ---------------------------------------------------------------------- */

.pasos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.paso-card {
    position: relative;
    padding-top: 8px;
}

.paso-card-numero {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--luna);
    color: var(--noche);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.paso-card-titulo {
    font-size: 1.05rem;
    margin: 0 0 6px;
}

.paso-card-descripcion {
    color: var(--texto-claro-mute);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Filtro por linea de produccion (pagina de catalogo)                    */
/* ---------------------------------------------------------------------- */

.filtros-linea {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filtro-linea-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--porcelana-2);
    border: 1.5px solid #e6e2f0;
    color: var(--texto-claro-mute);
    font-weight: 700;
    font-size: 0.92rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.filtro-linea-btn:hover {
    border-color: var(--luna);
    color: var(--texto-claro);
    transform: translateY(-1px);
}

.filtro-linea-btn.activo {
    background: var(--noche);
    border-color: var(--noche);
    color: var(--porcelana-2);
    box-shadow: var(--sombra-sm);
}

.filtro-linea-btn.activo:hover {
    transform: none;
}

/* ---------------------------------------------------------------------- */
/* Tarjeta compacta de producto (carrusel / grillas)                      */
/* ---------------------------------------------------------------------- */

.producto-card {
    position: relative;
    background: var(--porcelana-2);
    border-radius: var(--radio);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--sombra-sm);
    border: 1px solid rgba(20, 20, 40, 0.05);
    height: 100%;
}

.producto-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--noche-3), var(--noche));
}

.producto-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.producto-card:hover .producto-card-media img {
    transform: scale(1.05);
}

.media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(243, 183, 91, 0.35), transparent 55%),
        linear-gradient(135deg, var(--noche-3), var(--noche));
    color: var(--texto-noche-mute);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    padding: 10px;
}

.producto-card-cuerpo {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.producto-card-categoria {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--luna-fuerte);
}

.producto-card-nombre {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.08rem;
    line-height: 1.25;
    margin: 0;
    color: var(--texto-claro);
}

.producto-card-precio {
    margin-top: auto;
}

.producto-card-acciones {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.producto-card-acciones .btn-gnuino {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------------- */
/* Carrusel                                                                */
/* ---------------------------------------------------------------------- */

.carrusel-envoltura {
    position: relative;
}

.cargar-mas-envoltura {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.carrusel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 280px);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 14px;
    scrollbar-width: thin;
}

.carrusel > * {
    scroll-snap-align: start;
}

.carrusel-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--porcelana-2);
    border: 1px solid #e6e2f0;
    box-shadow: var(--sombra-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    color: var(--texto-claro);
}

.carrusel-btn:hover {
    background: var(--luna);
    color: var(--noche);
    border-color: var(--luna);
}

.carrusel-btn svg {
    width: 18px;
    height: 18px;
}

.carrusel-prev {
    left: -14px;
}

.carrusel-next {
    right: -14px;
}

.seccion-noche .carrusel-btn {
    background: var(--noche-3);
    border-color: var(--noche-borde);
    color: var(--porcelana-2);
}

@media (max-width: 640px) {
    .carrusel-btn {
        display: none;
    }
}

/* ---------------------------------------------------------------------- */
/* Grilla de catálogo / categoría                                         */
/* ---------------------------------------------------------------------- */

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

/* ---------------------------------------------------------------------- */
/* Lista de catalogo (pagina /productos/)                                 */
/* ---------------------------------------------------------------------- */

.productos-lista {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.producto-fila {
    display: grid;
    grid-template-columns: 96px 1fr auto auto;
    align-items: center;
    gap: 20px;
    background: var(--porcelana-2);
    border-radius: var(--radio-sm);
    border: 1px solid rgba(20, 20, 40, 0.05);
    padding: 14px 18px;
    box-shadow: var(--sombra-sm);
}

.producto-fila-media {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--noche-3), var(--noche));
    flex-shrink: 0;
}

.producto-fila-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.producto-fila-media .badge-descuento {
    top: 6px;
    left: 6px;
    font-size: 0.66rem;
    padding: 3px 8px;
}

.producto-fila-media .media-placeholder {
    font-size: 0.6rem;
    padding: 6px;
}

.producto-fila-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.producto-fila-nombre {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0;
}

.producto-fila-nombre a {
    color: var(--texto-claro);
}

.producto-fila-nombre a:hover {
    color: var(--luna-fuerte);
}

.producto-fila-precio {
    text-align: right;
    white-space: nowrap;
}

.producto-fila-acciones {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.producto-fila-acciones .btn-gnuino {
    padding: 9px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .producto-fila {
        grid-template-columns: 76px 1fr;
        grid-template-areas:
            "media info"
            "media precio"
            "acciones acciones";
        row-gap: 10px;
    }
    .producto-fila-media {
        grid-area: media;
        width: 76px;
        height: 76px;
    }
    .producto-fila-info {
        grid-area: info;
    }
    .producto-fila-precio {
        grid-area: precio;
        text-align: left;
    }
    .producto-fila-acciones {
        grid-area: acciones;
    }
}

.paginacion {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 8px 0 48px;
}

.paginacion-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--porcelana-2);
    border: 1.5px solid #e6e2f0;
    color: var(--texto-claro-mute);
    font-weight: 700;
    font-size: 0.9rem;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.paginacion-btn:hover {
    border-color: var(--luna);
    color: var(--texto-claro);
}

.paginacion-btn.activo {
    background: var(--noche);
    border-color: var(--noche);
    color: var(--porcelana-2);
}

.pagina-cabecera {
    padding: 40px 0 8px;
}

.pagina-cabecera h1 {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    margin: 0 0 8px;
}

.pagina-cabecera p {
    color: var(--texto-claro-mute);
}

.texto-largo {
    font-size: 1.05rem;
    color: var(--texto-claro-mute);
}

.texto-largo p {
    margin: 0 0 20px;
}

.texto-largo p:last-child {
    margin-bottom: 0;
}

.estado-vacio {
    padding: 60px 20px;
    text-align: center;
    color: var(--texto-claro-mute);
    background: var(--porcelana-2);
    border-radius: var(--radio);
    border: 1px dashed #ddd8ea;
}

/* ---------------------------------------------------------------------- */
/* Ficha de producto                                                      */
/* ---------------------------------------------------------------------- */

.ficha-producto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 24px 0 56px;
    align-items: start;
}

.ficha-media {
    position: relative;
    border-radius: var(--radio);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    box-shadow: var(--sombra);
}

.ficha-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ficha-info h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin: 0 0 14px;
}

.ficha-categoria {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--luna-fuerte);
    margin-bottom: 10px;
}

.ficha-precio {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 8px 0 18px;
}

.ficha-precio .precio-actual {
    font-size: 1.9rem;
}

.ficha-descripcion {
    color: var(--texto-claro-mute);
    margin-bottom: 22px;
}

.ficha-stock {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.ficha-stock.disponible {
    color: var(--exito);
}

.ficha-stock.agotado {
    color: var(--peligro);
}

.selector-cantidad {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e2ddef;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 20px;
}

.selector-cantidad button {
    background: var(--porcelana);
    border: none;
    width: 40px;
    height: 42px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--texto-claro);
}

.selector-cantidad button:hover {
    background: #ece7f7;
}

.selector-cantidad input {
    width: 52px;
    text-align: center;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.selector-cantidad input::-webkit-outer-spin-button,
.selector-cantidad input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ficha-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ficha-acciones .btn-gnuino {
    flex: 1;
    min-width: 200px;
}

.ficha-aviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--radio-sm);
    background: rgba(243, 183, 91, 0.1);
    border: 1px solid rgba(243, 183, 91, 0.28);
}

.ficha-aviso svg {
    width: 20px;
    height: 20px;
    color: var(--luna-fuerte);
    flex-shrink: 0;
    margin-top: 1px;
}

.ficha-aviso p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--texto-claro-mute);
}

.ficha-aviso a {
    color: var(--luna-fuerte);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

@media (max-width: 820px) {
    .ficha-producto {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ---------------------------------------------------------------------- */
/* Carrito / checkout / confirmación (páginas Operate)                    */
/* ---------------------------------------------------------------------- */

.panel {
    background: var(--porcelana-2);
    border-radius: var(--radio);
    box-shadow: var(--sombra-sm);
    padding: 28px;
    border: 1px solid #eee9f6;
}

.tabla-carrito {
    width: 100%;
    border-collapse: collapse;
}

.tabla-carrito th {
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--texto-claro-mute);
    padding: 0 12px 12px;
    border-bottom: 2px solid var(--porcelana);
}

.tabla-carrito td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--porcelana);
    vertical-align: middle;
}

.mini-cantidad {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #e2ddef;
    border-radius: 999px;
    overflow: hidden;
    width: fit-content;
}

.mini-cantidad button {
    background: var(--porcelana);
    border: none;
    width: 30px;
    height: 32px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--texto-claro);
    flex-shrink: 0;
}

.mini-cantidad button:hover {
    background: #ece7f7;
}

.mini-cantidad input {
    width: 40px;
    border: none;
    padding: 6px 0;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
}

.mini-cantidad input::-webkit-outer-spin-button,
.mini-cantidad input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-gnuino label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 6px;
    margin-top: 16px;
}

.form-gnuino input,
.form-gnuino textarea {
    width: 100%;
    border: 1.5px solid #e2ddef;
    border-radius: var(--radio-sm);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--porcelana);
}

.form-gnuino input:focus,
.form-gnuino textarea:focus {
    outline: none;
    border-color: var(--luna);
    background: var(--porcelana-2);
}

.alerta {
    padding: 14px 18px;
    border-radius: var(--radio-sm);
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 0.92rem;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
    padding: 24px 0 56px;
    align-items: start;
}

@media (max-width: 780px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

.alerta-success { background: rgba(63, 167, 150, 0.14); color: #256b5e; }
.alerta-warning { background: rgba(243, 183, 91, 0.18); color: #8a5a16; }
.alerta-error, .alerta-danger { background: rgba(225, 85, 63, 0.14); color: #a33b28; }
.alerta-info { background: rgba(31, 31, 58, 0.08); color: var(--texto-claro); }

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

.site-footer {
    background: var(--noche);
    color: var(--texto-noche-mute);
    padding: 0;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 56px 0 36px;
}

.footer-brand p {
    color: var(--texto-noche-mute);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 14px 0 0;
    max-width: 34ch;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 11px;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 3px;
    color: var(--porcelana-2);
}

.footer-col a {
    color: var(--texto-noche-mute);
    font-size: 0.9rem;
}

.footer-col a:hover,
.footer-brand a:hover {
    color: var(--luna);
}

.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--noche-borde);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--texto-noche);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.footer-social a svg {
    width: 17px;
    height: 17px;
}

.footer-social a:hover {
    background: var(--luna);
    color: var(--noche);
    border-color: var(--luna);
}

.footer-bottom {
    border-top: 1px solid var(--noche-borde);
    padding: 20px 0;
    font-size: 0.82rem;
    color: var(--texto-noche-mute);
}

@media (max-width: 860px) {
    .footer-grid {
        grid-template-columns: 1fr;
        padding: 8px 0 0;
        gap: 0;
        text-align: center;
    }
    .footer-brand,
    .footer-col {
        align-items: center;
        padding: 28px 0;
        border-bottom: 1px solid var(--noche-borde);
    }
    .footer-grid > :last-child {
        border-bottom: none;
    }
    .footer-brand .brand {
        justify-content: center;
    }
    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-bottom {
        text-align: center;
    }
}

/* ---------------------------------------------------------------------- */
/* Botón flotante de WhatsApp                                             */
/* ---------------------------------------------------------------------- */

.whatsapp-flotante {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--exito);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 32px -10px rgba(63, 167, 150, 0.6), 0 4px 14px rgba(0, 0, 0, 0.28);
    z-index: 60;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.whatsapp-flotante svg {
    width: 28px;
    height: 28px;
}

.whatsapp-flotante:hover {
    background: #35907f;
    transform: translateY(-2px) scale(1.04);
}

.whatsapp-flotante::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--exito);
    opacity: 0;
    pointer-events: none;
    animation: whatsapp-pulso 2.8s ease-out infinite;
}

@keyframes whatsapp-pulso {
    0% { opacity: 0.55; transform: scale(0.92); }
    70% { opacity: 0; transform: scale(1.35); }
    100% { opacity: 0; transform: scale(1.35); }
}

@media (max-width: 480px) {
    .whatsapp-flotante {
        width: 52px;
        height: 52px;
        right: max(16px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
    }
    .whatsapp-flotante svg {
        width: 25px;
        height: 25px;
    }
}

/* ---------------------------------------------------------------------- */
/* Acceso seguro (login admin + 2FA, django-two-factor-auth)              */
/* Las plantillas two_factor/* traen clases estilo Bootstrap (btn, alert, */
/* table, bg-white) que no cargamos; se restylean aca en vez de en cada   */
/* plantilla individual para que todas las pantallas del asistente        */
/* (login, QR, tokens de respaldo, perfil de seguridad) queden a tono.    */
/* ---------------------------------------------------------------------- */

.auth-body {
    background: var(--noche);
    color: var(--texto-noche);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    font-family: var(--font-body);
}

.auth-shell {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.auth-brand .brand-logo {
    height: 30px;
}

.auth-card {
    width: 100%;
    background: var(--noche-2);
    border: 1px solid var(--noche-borde);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 32px;
}

.auth-card h1 {
    font-size: 1.4rem;
    color: var(--luna);
    margin: 0 0 12px;
}

.auth-card p {
    color: var(--texto-noche-mute);
    max-width: none;
}

.auth-card a:not(.btn) {
    color: var(--luna);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-card hr {
    border: none;
    border-top: 1px solid var(--noche-borde);
    margin: 24px 0;
}

.auth-card ul {
    padding-left: 20px;
    color: var(--texto-noche-mute);
}

.auth-footnote {
    color: var(--texto-noche-mute);
    font-size: 0.82rem;
    text-align: center;
}

/* Formularios del asistente (wizard) — Django renderiza <table class="mb-3"> */
.auth-card table.mb-3 {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}

.auth-card table.mb-3 tr {
    display: block;
    margin-bottom: 18px;
}

.auth-card table.mb-3 th,
.auth-card table.mb-3 td {
    display: block;
    text-align: left;
    padding: 0;
    border: none;
}

.auth-card table.mb-3 th {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--texto-noche);
    padding-bottom: 6px;
}

.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="number"],
.auth-card input[type="tel"],
.auth-card select {
    width: 100%;
    border: 1.5px solid rgba(243, 183, 91, 0.25);
    border-radius: var(--radio-sm);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--noche);
    color: var(--texto-noche);
}

.auth-card input[type="text"]:focus,
.auth-card input[type="password"]:focus,
.auth-card input[type="number"]:focus,
.auth-card input[type="tel"]:focus,
.auth-card select:focus {
    outline: none;
    border-color: var(--luna);
    box-shadow: 0 0 0 3px rgba(243, 183, 91, 0.16);
}

.auth-card .helptext {
    display: block;
    color: var(--texto-noche-mute);
    font-size: 0.8rem;
    margin-top: 4px;
}

.auth-card .errorlist {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    color: var(--descuento);
    font-size: 0.85rem;
}

/* Botones estilo Bootstrap que traen las plantillas de two_factor */
.auth-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    line-height: 1;
}

.auth-card .btn:active {
    transform: scale(0.97);
}

.auth-card .btn-primary,
.auth-card .btn-success {
    background: var(--luna);
    color: var(--noche);
    box-shadow: var(--sombra-sm);
}

.auth-card .btn-primary:hover,
.auth-card .btn-success:hover {
    background: var(--luna-suave);
    transform: translateY(-1px);
}

.auth-card .btn-secondary,
.auth-card .btn-info,
.auth-card .btn-warning {
    background: transparent;
    border-color: rgba(243, 183, 91, 0.35);
    color: var(--texto-noche);
}

.auth-card .btn-secondary:hover,
.auth-card .btn-info:hover,
.auth-card .btn-warning:hover {
    background: rgba(243, 183, 91, 0.12);
}

.auth-card .btn-danger {
    background: var(--peligro);
    color: #ffffff;
}

.auth-card .btn-link {
    background: none;
    border: none;
    color: var(--texto-noche-mute);
    text-decoration: underline;
    padding: 13px 8px;
}

.auth-card .btn-link:hover {
    color: var(--texto-noche);
}

.auth-card .btn-block {
    width: 100%;
}

.auth-card .btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.auth-card .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-card .float-right {
    float: right;
}

/* Alertas (bienvenida/errores del asistente) */
.auth-card .alert {
    padding: 14px 18px;
    border-radius: var(--radio-sm);
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 0.92rem;
}

.auth-card .alert-warning {
    background: rgba(243, 183, 91, 0.18);
    color: var(--luna-suave);
}

.auth-card .alert-success {
    background: rgba(63, 167, 150, 0.16);
    color: #8fe0cf;
}

.auth-card .alert-danger {
    background: rgba(225, 85, 63, 0.16);
    color: #f3a08f;
}

/* Código QR de enrolamiento: fondo blanco fijo para que siga siendo legible */
.auth-card .bg-white {
    background: #ffffff;
    padding: 12px;
    border-radius: var(--radio-sm);
    display: block;
    margin: 0 auto;
    max-width: 220px;
}
