/* styles.css */


/* --- 1. IMPORTACIÓN DE FUENTES DE GOOGLE --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&family=Poppins:wght@600;700&display=swap');

/* --- 2. BASE Y TIPOGRAFÍA --- */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #343a40;
    width: 100%;
    overflow-x: hidden; /* Evita el scroll horizontal */
}

header {
    background-color: #000102;
    color: white;
    padding: 15px 25px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1, h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

button {
    padding: 10px 10px;
}

th {
    padding: 10px;
    background-color: #000000;
    color: white;
}

td {
    padding: 10px;
}

/* --- 3. CONTENEDORES Y SECCIONES --- */

.logo {
   width: 100px;
   margin-left: 100px;
}

.logoadmin {
    width: 50px;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
}

.menu-section {
    flex-grow: 1;
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.menu-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* --- 4. BOTONES Y FORMULARIOS --- */
button {
    font-family: 'Montserrat', sans-serif;
    background-color: #bd0000;
    color: white;
    border: none;
    padding: 10px 18px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    font-weight: 600;
}

button:hover { background-color: #000000; transform: translateY(-1px); }
.checkout-button { width: 100%; margin-top: 20px; background-color: #019738; }
.checkout-button:hover { background-color: #1eaf53; }
.mobile-cart-button { background-color: #bd0000; font-weight: 700; display: none; }
#cart-count { color: #ffffff; }

/* Input/Select Estilos */
input[type="text"], input[type="number"], input[type="url"], input[type="email"], input[type="tel"], select, input[type="file"] {
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
input:focus, select:focus { border-color: #20c997; outline: none; }

/* --- 5. VISTAS DE PRODUCTO --- */
.product-image { object-fit: cover; border-radius: 6px; }
.item-card { border: none; border-radius: 10px; background-color: #ffffff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05); }

/* VISTA EN COLUMNAS */
#menu-list.col-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 2fr)); gap: 15px; }
.item-card.col-view { padding: 10px; text-align: center; display: flex; flex-direction: column; }
.item-card.col-view .product-image { height: 180px; margin: 0 0 15px 0; }

/* VISTA EN LISTA */
#menu-list.list-view { display: block; }
.item-card.list-view { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; margin-bottom: 12px; }
.list-view .product-image { width: 70px; height: 70px; margin-right: 15px; }

/* --- 6. SECCIÓN DEL CARRITO (Desktop) --- */
.cart-section {
    width: 300px;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    position: relative;
    border-left: 1px solid #dee2e6;
}
.cart-item { padding: 8px 0; border-bottom: 1px dashed #ced4da; display: flex; justify-content: space-between; align-items: center;}
.cart-item button { padding: 4px 10px; font-size: 0.8em; background-color: #6c0101; }

.close-cart-button {
    background: none; color: #343a40; border: none; font-size: 1.5em; padding: 5px; cursor: pointer;
    position: absolute; top: 10px; right: 10px; z-index: 2010; display: none; 
}


/* --- 7. ESTILOS DEL MODAL (VISTA RÁPIDA) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 80%;
    max-width: 600px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
.close-button:hover, .close-button:focus {
    color: #343a40;
}

#modal-details {
    text-align: center;
}

#modal-details img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

#modal-details h3 {
    font-family: 'Poppins', sans-serif;
    color: #343a40;
    font-size: 1.8em;
    margin-bottom: 5px;
}

#modal-details .modal-price {
    font-size: 2em;
    color: #20c997;
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}


/* ==================================
   RESPONSIVE (Móvil: < 768px)
   ================================== */
@media (max-width: 768px) {
    .container { flex-direction: column; padding: 0 10px; }
    .mobile-cart-button { display: inline-block; }

    /* 2 productos por fila en móvil */

    #menu-list.col-view {
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px;
    }
    .item-card.col-view {
        padding: 10px;
    }
    .item-card.col-view .product-image {
        height: 100px;
        margin-bottom: 10px;
    }

    /* Carrito como Barra Lateral */
    .cart-section {
        position: fixed; top: 0; right: 0; width: 90%; height: 100%;
        z-index: 2000; border-radius: 0; box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        transform: translateX(100%); 
        background-color: rgba(255, 255, 255, 0.9); 
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    .cart-section.open { transform: translateX(0); }
    .cart-section.open .close-cart-button { display: block; }
    
    /* Ajuste Responsive del Modal */
    .modal-content {
        width: 90%;
        margin: 5% auto;
    }
    
   .logo {
   width: 100px;
   margin-left: 10px;
}
}

