/* ========================================================= */
/* === VARIABLES Y ESTILOS BASE/GLOBALES === */
/* ========================================================= */

/* Variables CSS */
:root {
    --bg-dark: #111111;
    --accent-gold: #db991f;
    --text-light: #ffffff;
    --price-green: #38c172; 
    --border-thin: 2px solid var(--accent-gold);
    --font-family: 'Inter', sans-serif;
}

* {
    /* Box-sizing para evitar problemas con padding y ancho */
    box-sizing: border-box; 
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Permite que el footer se quede abajo */
}

/* 1. Header */
.header {
    background-color: var(--bg-dark);
    padding: 20px 0;
    text-align: center;
}

.header-logo {
    width: 75px;
    height: 75px;
    display: inline-block;
}

/* 2. Separador */
.separator {
    height: 2px;
    background-color: var(--accent-gold);
    margin: 0;
}

/* ========================================================= */
/* === ESTILOS DE NAVEGACIÓN (NAVBAR) === */
/* ========================================================= */

.navbar {
    background-color: var(--bg-dark);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 10px;
    font-weight: bold;
    transition: color 0.3s;
}

.nav-item:hover {
    color: var(--accent-gold);
}

.nav-icon {
    fill: var(--accent-gold);
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    stroke: var(--accent-gold);
}

/* ========================================================= */
/* === ESTILOS DE CONTENIDO PRINCIPAL (MENU LIST) === */
/* ========================================================= */

main.menu-list {
    flex-grow: 1; 
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-bottom: 150px; /* Espacio para el carrito flotante */
}

.product-card {
    display: flex;
    background-color: #222222; 
    padding: 15px;
    border-radius: 12px;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.product-image-container {
    flex-shrink: 0; 
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-details {
    flex-grow: 1;
}

.product-name {
    color: var(--accent-gold);
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.product-description {
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-price {
    color: var(--price-green);
    font-size: 1.05em;
    font-weight: bold;
    margin-bottom: 10px;
}

.add-button {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
    text-align: center;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-block;
    font-size: 0.9em;
}

.add-button:hover {
    background-color: #e8a62a;
}

/* ========================================================= */
/* === FOOTER === */
/* ========================================================= */

.footer {
    margin-top: auto;
    color: var(--accent-gold);
    text-align: center;
    padding: 20px 0; 
    font-size: 0.9em;
    width: 100%;
}

/* ========================================================= */
/* === Floating Cart/Pedido Styles (CARRITO) === */
/* ========================================================= */
        
#pedido-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 90vh; 
    display: flex;
    flex-direction: column;
    /* Se elimina align-items: center; para permitir el 100% de ancho */
}

#summary-button {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
    padding: 12px 20px;
    /* Se cambia la esquina superior izquierda a 0 para que sea un rectángulo completo */
    border-radius: 15px 15px 0 0;
    cursor: pointer;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    /* --- CAMBIOS CLAVE PARA ANCHO 100% --- */
    width: 100%; 
    max-width: 100%; 
    /* -------------------------------------- */
    
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.2s;
}

#summary-button:hover {
    background-color: #e8a62a;
}

#pedido-details {
    background-color: var(--bg-dark);
    color: var(--text-light);
    border: 2px solid var(--accent-gold);
    /* Se elimina el borde inferior y se mantiene solo el superior */
    border-top: 2px solid var(--accent-gold);
    border-radius: 15px 15px 0 0;
    padding: 20px;
    
    /* --- CAMBIOS CLAVE PARA ANCHO 100% --- */
    width: 100%;
    max-width: 100%;
    /* -------------------------------------- */
    
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5);
    
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out, opacity 0.3s;
    visibility: hidden;
    opacity: 0;
    height: 0;
    overflow-y: hidden;
}

#pedido-details.expanded {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
    height: auto; 
    max-height: calc(90vh - 50px); 
    overflow-y: auto;
}

.item-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 20px 0;
}

.item-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding: 8px 0;
}

.item-controls {
    display: flex;
    gap: 5px;
}

.control-btn, .delete-btn {
    background-color: #333;
    color: var(--text-light);
    border: 1px solid #555;
    width: 25px;
    height: 25px;
    line-height: 1;
    border-radius: 4px;
    cursor: pointer;
}

.delete-btn {
    background-color: #a00; 
    color: var(--text-light);
    border: none;
    font-weight: bold;
}
        
#pedido-details input, 
#pedido-details select, 
#pedido-details textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #333;
    color: var(--text-light);
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}
        
#pedido-details textarea {
    resize: vertical;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--accent-gold);
    margin-top: 10px;
    padding-bottom: 10px;
}

.btn-enviar-whatsapp {
    background-color: #25D366; 
    color: var(--bg-dark);
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.btn-enviar-whatsapp:disabled {
    background-color: #666;
    cursor: not-allowed;
    color: #ccc;
}

.btn-clean {
    background-color: #555;
    color: var(--text-light);
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}
/* ========================================================= */
/* === ESTILOS PARA EVENTOS.HTML (Añadir al final de styles.css) === */
/* ========================================================= */

/* Reset de fondo de Eventos (Usaremos el fondo oscuro de :root) */
/* Quitaré el fondo #f5e8d3 del ejemplo. body ya tiene var(--bg-dark) */

/* Contenedor principal de eventos */
.events-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    flex-grow: 1; /* Permite que el contenedor se estire en el body flex */
}

/* Encabezado interno de la sección de Eventos */
.events-container h2 {
    color: var(--accent-gold); /* Usamos el dorado de tu proyecto */
    font-size: 2em;
    margin: 20px 0;
}

/* Tarjeta de Evento */
.event-card {
    background-color: #222222; /* Un gris oscuro para contraste */
    color: var(--text-light);
    border-radius: 10px;
    margin-bottom: 30px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
 
.image-container {
    flex-shrink: 0;
    cursor: pointer;
    border: 3px solid var(--accent-gold);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    width: 100px; 
    height: 150px; 
}

.event-image {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
 
.event-image:hover {
    transform: scale(1.02);
}

.event-details {
    flex-grow: 1;
}
 
.event-details h2 {
    color: var(--accent-gold);
    margin-top: 0;
    font-size: 1.6em;
    border-bottom: 2px solid #333; /* Separador sutil */
    padding-bottom: 5px;
}

.event-details p {
    margin-bottom: 10px;
    text-align: justify;
    font-size: 0.95em;
    color: #ccc;
}
 
.event-info strong {
    color: var(--accent-gold);
}

.price-box {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 1.1em;
    font-weight: bold;
}

.pre-venta { color: #38c172; } /* Precio de Venta en verde */
.puerta { color: #ff5555; } /* Precio de Puerta en rojo suave */

/* --- ESTILOS PARA LOS BOTONES DE ACCIÓN --- */
.event-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    box-sizing: border-box;
}

.btn-calendar, .btn-whatsapp {
    flex: 1; 
    width: auto; 
    padding: 10px;
    text-align: center;
    text-decoration: none;
    border-radius: 6px; /* Coherente con otros botones (add-button) */
    font-weight: bold;
    transition: background-color 0.3s;
    box-sizing: border-box;
    color: var(--bg-dark); /* Color de texto oscuro para botones claros/dorados */
    border: none;
    cursor: pointer;
    font-size: 0.95em; 
}
 
/* Estilo del botón de WhatsApp (Verde brillante) */
.btn-whatsapp {
    background-color: var(--accent-gold); /* Usamos el dorado como botón principal de acción */
    color: var(--bg-dark);
}

.btn-whatsapp:hover {
    background-color: #e8a62a; /* Tono más claro del dorado */
}

/* Estilo del botón de Calendario (Verde oscuro para el secundario) */
.btn-calendar {
    background-color: #333; /* Un color neutro que contrasta con el dorado */
    color: var(--text-light);
}

.btn-calendar:hover {
    background-color: #444; 
}

/* --- ESTILOS PARA LOS MODALES DE IMAGEN Y COMPRA --- */

/* Modal de Imagen */
.modal {
    display: none; 
    position: fixed;
    z-index: 10000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover, .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Modal de Compra (Formulario) */
.modal-compra {
    display: none; 
    position: fixed; 
    z-index: 20000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); 
    padding-top: 20px;
}

.modal-content-compra {
    background-color: var(--bg-dark);
    color: var(--text-light);
    margin: 10% auto; 
    padding: 20px;
    border: 1px solid var(--accent-gold);
    width: 90%; 
    max-width: 450px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    position: relative;
}

.close-compra {
    color: var(--text-light);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-compra:hover, .close-compra:focus {
    color: var(--accent-gold);
    text-decoration: none;
    cursor: pointer;
}
 
.modal-subtitulo {
    color: #ccc;
    font-size: 0.9em;
    margin-bottom: 20px;
    border-bottom: 1px dashed #333;
    padding-bottom: 10px;
}

/* Estilos de campos y botones */
#formulario-compra label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    font-size: 0.9em;
    color: var(--accent-gold); /* Etiquetas en dorado */
}
 
#formulario-compra input[type="text"],
#formulario-compra input[type="tel"],
#formulario-compra input[type="number"],
#formulario-compra select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    background-color: #333;
    color: var(--text-light);
    border: 1px solid #555;
    border-radius: 4px;
    box-sizing: border-box; 
    font-size: 1em;
}

.btn-enviar-whatsapp-compra {
    background-color: #25D366; /* Verde de WhatsApp */
    color: var(--bg-dark);
    border: none;
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-enviar-whatsapp-compra:hover {
    background-color: #128c7e;
}

/* Media Queries para Eventos (Añadir a las media queries existentes) */

@media (max-width: 600px) {
    .event-card {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
    .image-container {
        margin-bottom: 15px;
    }
    .event-details {
        width: 100%;
        padding: 0 10px; 
        box-sizing: border-box;
    }
    .price-box {
        flex-direction: column;
        gap: 5px;
    }
    .event-actions {
        flex-direction: column;
        gap: 10px;
    }
    .modal-content-compra {
        margin: 5% auto;
    }
}