:root {
    --bg-main: #f4f6fb;
    --panel-bg: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --color-chocolate: #4a2c2a;
    /* GRADIENTES Y ESTILOS */
    --gradiente-primary: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f43f5e 100%);
    --gradiente-btn-add: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --gradiente-btn-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 18px;
    --btn-radius: 50px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    padding-bottom: 40px;
}

/* BARRA SUPERIOR */
.barra-superior {
    background: var(--gradiente-primary);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.25);
    color: white;
    margin-bottom: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px;
    border-radius: 12px;
}

.barra-superior h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

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

.nav-btn {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--btn-radius);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.3s ease;
}

    .nav-btn:hover {
        color: white;
        background: rgba(255, 255, 255, 0.2);
    }

    .nav-btn.activo {
        background: white;
        color: #db2777;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

/* CONTENEDOR Y PANELES */
.contenedor {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.panel {
    background: var(--panel-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 25px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

    .panel-header h2 {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--text-primary);
    }

.panel-icon {
    font-size: 1.3rem;
}

/* FORMULARIO */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .campo label {
        font-size: 0.85rem;
        font-weight: 700;
    }

        .campo label.requerido {
            color: #e11d48;
        }

    .campo input {
        padding: 12px 16px;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        font-size: 0.95rem;
        outline: none;
        background: #f8fafc;
    }

        .campo input:focus {
            border-color: #ec4899;
            background: white;
            box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
        }

/* DESCUENTOS Y CHECKBOXES */
.seccion-promos-manuales {
    background: #faf5ff;
    border: 1px solid #f3e8ff;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

    .switch-container input[type="checkbox"] {
        width: 22px;
        height: 22px;
        cursor: pointer;
        accent-color: #a855f7;
    }

.switch-label {
    font-size: 0.9rem;
    color: #581c87;
    cursor: pointer;
}

.nota-informativa {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 14px;
}

/* LAYOUT DE VENTAS Y CARRITO */
.layout-venta {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 25px;
}

@media(max-width: 900px) {
    .layout-venta {
        grid-template-columns: 1fr;
    }
}

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

.tarjeta-producto {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

    .tarjeta-producto:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
    }

    .tarjeta-producto img {
        width: 100%;
        height: 130px;
        object-fit: cover;
        border-radius: 12px;
        margin-bottom: 10px;
    }

    .tarjeta-producto h3 {
        font-size: 1rem;
        font-weight: 700;
    }

.precio {
    font-size: 1.15rem;
    font-weight: 800;
    color: #db2777;
    margin: 8px 0;
}

.btn-gradiente {
    background: var(--gradiente-btn-add);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--btn-radius);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}

    .btn-gradiente:hover {
        filter: brightness(1.05);
    }

.panel-carrito {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, #ffffff 0%, #fdf2f8 100%);
}

.lista-carrito-contenedor {
    min-height: 150px;
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.resumen-pago {
    background: white;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #fbcfe8;
    margin-bottom: 15px;
}

.fila-resumen {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

    .fila-resumen.subtotal {
        color: var(--text-secondary);
    }

    .fila-resumen.total {
        font-size: 1.25rem;
        font-weight: 800;
        color: #be185d;
        border-top: 1px dashed #f472b6;
        padding-top: 8px;
        margin-top: 8px;
    }

.etiqueta-ahorro {
    background: #ffe4e6;
    color: #e11d48;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    margin: 8px 0;
}

.btn-confirmar {
    background: var(--gradiente-btn-success);
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.4);
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
}
