/* ============================================================
   estilos.css
   TEMA: Heladería / Frappés - COLORES PASTEL 🌸🍧
   ============================================================ */

:root {
    /* ---------- PALETA PASTEL ---------- */
    --rosa-pastel: #f8b8c8;
    --rosa-claro: #fde2e8;
    --menta-pastel: #a8e6cf;
    --menta-claro: #e1f7ef;
    --celeste-pastel: #a9dff5;
    --celeste-claro: #e5f6fc;
    --lila-pastel: #cdb4db;
    --lila-claro: #f0e7f7;
    --amarillo-pastel: #ffe5a5;
    --durazno-pastel: #ffcba4;
    --crema: #fffaf0;
    --color-texto: #554c57;
    --color-texto-suave: #827786;
    --color-fondo: #fff9fb;
    --color-tarjeta: #ffffff;
    --color-borde: #f1dce4;
    --color-exito: #77c9a5;
    --color-peligro: #e99a9a;
    --color-aviso: #f3c878;
    --radio: 20px;
    --sombra: 0 8px 25px rgba(180, 145, 165, 0.15);
}

/* ============================================================
   RESETEO GENERAL
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Verdana, Arial, sans-serif;
    background: radial-gradient(circle at 10% 10%, #fde2e8 0, transparent 25%), radial-gradient(circle at 90% 15%, #e5f6fc 0, transparent 25%), radial-gradient(circle at 50% 100%, #f0e7f7 0, transparent 30%), linear-gradient(180deg, #fffaf5, #fff9fb);
    color: var(--color-texto);
    min-height: 100vh;
    padding-bottom: 40px;
}

/* ============================================================
   BARRA SUPERIOR
   ============================================================ */

.barra-superior {
    background: linear-gradient( 135deg, #f8b8c8, #cdb4db, #a9dff5 );
    color: #fff;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(180, 145, 165, 0.20);
    border-bottom: 3px solid rgba(255,255,255,0.6);
}

    .barra-superior h1 {
        margin: 0;
        font-size: 1.4rem;
        display: flex;
        align-items: center;
        gap: 10px;
        text-shadow: 0 2px 5px rgba(100,80,100,0.12);
    }

/* ============================================================
   NAVEGACIÓN
   ============================================================ */

.navegacion {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .navegacion a {
        color: #5f5260;
        text-decoration: none;
        background: rgba(255,255,255,0.60);
        padding: 9px 15px;
        border-radius: 999px;
        font-size: 0.9rem;
        font-weight: 600;
        border: 1px solid rgba(255,255,255,0.7);
        transition: all 0.25s ease;
        white-space: nowrap;
    }

        .navegacion a:hover,
        .navegacion a.activo {
            background: #ffffff;
            color: #d47796;
            transform: translateY(-2px);
            box-shadow: 0 5px 12px rgba(150,120,140,0.15);
        }

/* ============================================================
   CONTENEDOR GENERAL
   ============================================================ */

.contenedor {
    max-width: 1200px;
    margin: 28px auto;
    padding: 0 20px;
}

/* ============================================================
   PANELES
   ============================================================ */

.panel {
    background: rgba(255,255,255,0.92);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 22px;
    margin-bottom: 24px;
    border: 1px solid var(--color-borde);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .panel:hover {
        box-shadow: 0 12px 30px rgba(180,145,165,0.18);
    }

    .panel h2 {
        margin-top: 0;
        color: #735d72;
        border-bottom: 3px solid var(--rosa-claro);
        padding-bottom: 10px;
    }

/* ============================================================
   FORMULARIOS
   ============================================================ */

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

label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #735d72;
    display: block;
    margin-bottom: 5px;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    border: 2px solid var(--color-borde);
    border-radius: 13px;
    font-size: 0.95rem;
    background: #fffdfd;
    color: var(--color-texto);
    transition: border 0.2s, box-shadow 0.2s;
}

    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: var(--rosa-pastel);
        box-shadow: 0 0 0 4px rgba(248,184,200,0.18);
    }

.campo {
    display: flex;
    flex-direction: column;
}

/* ============================================================
   BOTONES
   ============================================================ */

.boton {
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .boton:hover {
        transform: translateY(-3px);
        box-shadow: 0 7px 15px rgba(150,120,140,0.18);
    }

    .boton:active {
        transform: translateY(0);
    }

/* ---------- Botones pastel ---------- */

.boton-primario {
    background: var(--rosa-pastel);
    color: #704b59;
}

.boton-secundario {
    background: var(--celeste-pastel);
    color: #416879;
}

.boton-exito {
    background: var(--menta-pastel);
    color: #477363;
}

.boton-peligro {
    background: #f2aaaa;
    color: #784b4b;
}

.boton-aviso {
    background: var(--amarillo-pastel);
    color: #80672d;
}

.boton-neutro {
    background: #eee8ed;
    color: var(--color-texto);
}

.boton-pequeno {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* ============================================================
   TABLAS
   ============================================================ */

.tabla-contenedor {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead th {
    background: linear-gradient( 135deg, #cdb4db, #a9dff5 );
    color: #51495a;
    padding: 11px 12px;
    text-align: left;
    position: sticky;
    top: 0;
}

tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-borde);
}

tbody tr {
    transition: background 0.2s;
}

    tbody tr:hover {
        background: #fff3f7;
    }

/* ============================================================
   BADGES
   ============================================================ */

.badge {
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #5d5360;
    white-space: nowrap;
}

.badge-proceso {
    background: var(--amarillo-pastel);
}

.badge-finalizada {
    background: var(--menta-pastel);
}

.badge-helado {
    background: var(--celeste-pastel);
}

.badge-batido {
    background: var(--rosa-pastel);
}

/* ============================================================
   CATÁLOGO DE PRODUCTOS
   ============================================================ */

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

.tarjeta-producto {
    background: #ffffff;
    border-radius: var(--radio);
    overflow: hidden;
    box-shadow: var(--sombra);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-borde);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .tarjeta-producto:hover {
        transform: translateY(-7px);
        box-shadow: 0 15px 30px rgba(180,145,165,0.20);
    }

    .tarjeta-producto img {
        width: 100%;
        height: 170px;
        object-fit: cover;
        background: var(--rosa-claro);
    }

    .tarjeta-producto .contenido {
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex-grow: 1;
    }

    .tarjeta-producto h3 {
        margin: 0;
        font-size: 1.05rem;
        color: #665569;
    }

    .tarjeta-producto .descripcion {
        font-size: 0.82rem;
        color: var(--color-texto-suave);
        flex-grow: 1;
    }

    .tarjeta-producto .precio {
        font-size: 1.1rem;
        font-weight: 800;
        color: #dc7897;
    }

/* ============================================================
   CARRITO
   ============================================================ */

.panel-carrito {
    position: sticky;
    top: 20px;
    background: linear-gradient( 180deg, #ffffff, #fff8fb );
}

.item-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--color-borde);
    gap: 8px;
    flex-wrap: wrap;
}

.total-carrito {
    font-size: 1.3rem;
    font-weight: 800;
    color: #72566e;
    text-align: right;
    margin-top: 10px;
}

/* ============================================================
   MENSAJES
   ============================================================ */

.mensaje {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
    display: none;
}

    .mensaje.mostrar {
        display: block;
    }

    .mensaje.exito {
        background: var(--menta-claro);
        color: #4f8a72;
        border: 1px solid var(--menta-pastel);
    }

    .mensaje.error {
        background: #fdecec;
        color: #a86262;
        border: 1px solid #f0aaaa;
    }

/* ============================================================
   LAYOUT VENTAS
   ============================================================ */

.layout-venta {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

/* ============================================================
   VISTA PREVIA DE IMAGEN
   ============================================================ */

.vista-previa-imagen {
    width: 100%;
    max-width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid var(--color-borde);
    margin-top: 8px;
    display: none;
}

    .vista-previa-imagen.mostrar {
        display: block;
    }

.pestanas-imagen {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.pestana-imagen {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--lila-claro);
    color: #705f75;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

    .pestana-imagen.activa {
        background: var(--rosa-pastel);
        color: #704b59;
    }

/* ============================================================
   PROMOCIONES
   ============================================================ */

.banner-happy-hour {
    background: linear-gradient( 135deg, #ffcba4, #f8b8c8 );
    color: #70515c;
    padding: 14px 18px;
    border-radius: var(--radio);
    margin-bottom: 16px;
    font-weight: 700;
    display: none;
    align-items: center;
    gap: 10px;
    box-shadow: var(--sombra);
}

    .banner-happy-hour.mostrar {
        display: flex;
    }

.panel-fidelidad {
    background: linear-gradient( 135deg, #ffe5a5, #ffcba4 );
    border-radius: 14px;
    padding: 12px 16px;
    margin-top: 10px;
    display: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #745e3d;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

    .panel-fidelidad.mostrar {
        display: flex;
    }

.aviso-combo {
    background: var(--menta-claro);
    border: 1px dashed var(--menta-pastel);
    color: #4c7d69;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    font-weight: 600;
}

/* ============================================================
   PRECIOS
   ============================================================ */

.precio-tachado {
    text-decoration: line-through;
    color: #aaa;
    font-size: 0.85rem;
    font-weight: 400;
    margin-right: 6px;
}

.precio-happy-hour {
    color: #df7897;
}

.badge-gratis {
    background: var(--amarillo-pastel);
    color: #80672d;
}

.badge-happyhour {
    background: var(--rosa-pastel);
    color: #704b59;
}

.badge-combo {
    background: var(--menta-pastel);
    color: #477363;
}

/* ============================================================
   DESGLOSE TOTAL
   ============================================================ */

.desglose-total {
    font-size: 0.85rem;
    color: var(--color-texto-suave);
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

    .desglose-total.descuento {
        color: #5da483;
        font-weight: 700;
    }

/* ============================================================
   PROMO SEXTO PRODUCTO
   ============================================================ */

.panel-promo-sexto {
    background: linear-gradient( 135deg, #dff5c8, #c7edb0 );
    border-radius: 14px;
    padding: 12px 16px;
    margin-top: 10px;
    display: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #557448;
}

    .panel-promo-sexto.mostrar {
        display: block;
    }

.botones-promo-sexto {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.badge-promo-sexto {
    background: var(--menta-pastel);
    color: #477363;
}

/* ============================================================
   MODAL
   ============================================================ */

.overlay-modal {
    position: fixed;
    inset: 0;
    background: rgba(95,82,96,0.45);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

    .overlay-modal.mostrar {
        opacity: 1;
        visibility: visible;
    }

.caja-modal {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(90,70,90,0.30);
    transform: scale(0.88) translateY(18px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(.34,1.56,.64,1), opacity 0.22s ease;
}

.overlay-modal.mostrar .caja-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-encabezado {
    padding: 28px 24px 22px;
    text-align: center;
    color: #625662;
    position: relative;
    flex-shrink: 0;
}

    /* Encabezados pastel */

    .modal-encabezado.grad-peligro {
        background: linear-gradient( 135deg, #f2aaaa, #f8b8c8 );
    }

    .modal-encabezado.grad-exito {
        background: linear-gradient( 135deg, #a8e6cf, #a9dff5 );
    }

    .modal-encabezado.grad-aviso {
        background: linear-gradient( 135deg, #ffe5a5, #ffcba4 );
    }

    .modal-encabezado.grad-info {
        background: linear-gradient( 135deg, #a9dff5, #cdb4db );
    }

    .modal-encabezado.grad-editar {
        background: linear-gradient( 135deg, #ffcba4, #f8b8c8 );
    }

.modal-icono {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255,255,255,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 12px;
    box-shadow: 0 6px 16px rgba(100,80,100,0.12);
}

.modal-titulo {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.modal-cuerpo {
    padding: 22px 24px;
    color: var(--color-texto);
    font-size: 0.92rem;
    line-height: 1.55;
    overflow-y: auto;
}

    .modal-cuerpo p {
        margin: 0;
    }

.modal-pie {
    padding: 16px 24px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ============================================================
   PANTALLA COMPLETA
   ============================================================ */

.boton-pantalla-completa {
    display: none;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.45);
    color: #665569;
    border: 1px solid rgba(255,255,255,0.6);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .boton-pantalla-completa:hover {
        background: #ffffff;
        transform: translateY(-2px);
    }

@media (min-width: 600px) {

    .boton-pantalla-completa {
        display: inline-flex;
    }
}

body.modo-pantalla-completa .barra-superior {
    display: none;
}

body.modo-pantalla-completa .contenedor {
    padding-top: 16px;
}

.boton-salir-pantalla-completa {
    display: none;
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 500;
    background: linear-gradient( 135deg, #f8b8c8, #cdb4db );
    color: #604e5e;
    border: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--sombra);
}

body.modo-pantalla-completa
.boton-salir-pantalla-completa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   FILAS ANULADAS
   ============================================================ */

.fila-anulada td {
    color: #c87575 !important;
    text-decoration: line-through;
    background: #fff3f3 !important;
}

.badge-anulada {
    background: #f2aaaa;
    color: #754b4b;
}

/* ============================================================
   EFECTOS SUAVES
   ============================================================ */

button,
a,
.tarjeta-producto,
.panel {
    -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {

    .layout-venta {
        grid-template-columns: 1fr;
    }

    .panel-carrito {
        position: static;
    }
}

@media (max-width: 768px) {

    .barra-superior {
        flex-direction: column;
        align-items: flex-start;
    }

    .grilla-productos {
        grid-template-columns: repeat( auto-fill, minmax(160px, 1fr) );
    }

    .contenedor {
        padding: 0 12px;
    }

    thead th,
    tbody td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .panel {
        padding: 16px;
    }
}

@media (min-width: 900px) and (orientation: portrait) {

    .grilla-productos {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* ============================================================
   🌊 DECORACIÓN DE HELADERÍA - OLAS ANIMADAS
   ============================================================ */

.barra-superior {
    position: relative;
    overflow: hidden;
    padding-bottom: 45px;
}

    /* Olas */
    .barra-superior::after {
        content: "";
        position: absolute;
        left: -10%;
        bottom: -2px;
        width: 120%;
        height: 45px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C150,100 300,0 450,50 C600,100 750,0 900,50 C1050,100 1150,20 1200,50 L1200,100 L0,100 Z' fill='%23fff9fb'/%3E%3C/svg%3E") no-repeat;
        background-size: 100% 100%;
        animation: moverOla 7s ease-in-out infinite alternate;
        pointer-events: none;
    }

@keyframes moverOla {

    0% {
        transform: translateX(-25px);
    }

    100% {
        transform: translateX(25px);
    }
}

/* ============================================================
   🍬 BURBUJAS DECORATIVAS
   ============================================================ */

.barra-superior::before {
    content: "●   ○   ●   ○   ●";
    position: absolute;
    right: 20px;
    top: 10px;
    color: rgba(255,255,255,0.35);
    font-size: 18px;
    letter-spacing: 10px;
    animation: burbujas 4s ease-in-out infinite alternate;
}

@keyframes burbujas {

    0% {
        transform: translateY(5px);
        opacity: 0.5;
    }

    100% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* ============================================================
   🍧 TARJETAS DE PRODUCTOS
   ============================================================ */

.tarjeta-producto {
    position: relative;
    overflow: hidden;
    background: linear-gradient( 180deg, #ffffff, #fff8fb );
}

    /* Decoración superior */

    .tarjeta-producto::before {
        content: "🍧";
        position: absolute;
        top: 8px;
        right: 10px;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.85);
        border-radius: 50%;
        font-size: 18px;
        z-index: 2;
        box-shadow: 0 3px 10px rgba(120,90,110,0.12);
    }

    /* Imagen del producto */

    .tarjeta-producto img {
        transition: transform 0.4s ease;
    }

    .tarjeta-producto:hover img {
        transform: scale(1.06);
    }

    /* ============================================================
   ✨ EFECTO DE BRILLO
   ============================================================ */

    .tarjeta-producto::after {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 60%;
        height: 100%;
        background: linear-gradient( 90deg, transparent, rgba(255,255,255,0.35), transparent );
        transform: skewX(-20deg);
        transition: left 0.6s ease;
        pointer-events: none;
    }

    .tarjeta-producto:hover::after {
        left: 140%;
    }

/* ============================================================
   🌸 ENCABEZADOS
   ============================================================ */

.panel h2 {
    position: relative;
    padding-left: 12px;
}

    .panel h2::before {
        content: "🍦";
        margin-right: 8px;
        font-size: 22px;
    }

/* ============================================================
   🩷 BOTONES MÁS BONITOS
   ============================================================ */

.boton {
    position: relative;
    overflow: hidden;
}

    .boton::after {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 70%;
        height: 100%;
        background: linear-gradient( 90deg, transparent, rgba(255,255,255,0.35), transparent );
        transform: skewX(-20deg);
        transition: left 0.5s ease;
    }

    .boton:hover::after {
        left: 130%;
    }

/* ============================================================
   🍓 TÍTULOS DE PRODUCTOS
   ============================================================ */

.tarjeta-producto h3 {
    color: #755d72;
    transition: color 0.2s ease;
}

.tarjeta-producto:hover h3 {
    color: #d47796;
}

/* ============================================================
   🌈 PEQUEÑAS DECORACIONES DE FONDO
   ============================================================ */

.contenedor {
    position: relative;
}

    /* Círculos decorativos */

    .contenedor::before {
        content: "";
        position: fixed;
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background: rgba(248,184,200,0.20);
        top: 25%;
        left: -40px;
        z-index: -1;
        animation: flotar 5s ease-in-out infinite alternate;
    }

    .contenedor::after {
        content: "";
        position: fixed;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: rgba(169,223,245,0.20);
        bottom: 15%;
        right: -30px;
        z-index: -1;
        animation: flotar 6s ease-in-out infinite alternate-reverse;
    }

@keyframes flotar {

    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-20px);
    }
}

/* ============================================================
   🍨 CARRITO
   ============================================================ */

.panel-carrito {
    border-top: 5px solid #f8b8c8;
    background: linear-gradient( 180deg, #ffffff, #fff7fa );
}

    .panel-carrito h2::before {
        content: "🛒";
    }

/* ============================================================
   🌟 EFECTO DE ENTRADA
   ============================================================ */

.panel {
    animation: aparecer 0.5s ease;
}

@keyframes aparecer {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   📱 AJUSTE CELULAR
   ============================================================ */

@media (max-width: 600px) {

    .barra-superior {
        padding-bottom: 35px;
    }

        .barra-superior::before {
            display: none;
        }

        .barra-superior::after {
            height: 35px;
        }

    .tarjeta-producto::before {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }
}