/* /css/public_styles.css (Versión Completa y Definitiva) */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
}
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}
h1 { text-align: center; color: #333; }

/* --- Header del Menú Público --- */
.header-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}
.header-menu img { max-height: 80px; }
.header-menu h1 { margin: 0; }

/* --- Filtros de Categoría --- */
.filtros-categorias {
    text-align: center;
    margin-bottom: 30px;
}
.filtro-btn {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}
.filtro-btn:hover { background-color: #e9ecef; }

/* --- Grid de Productos --- */
.contenedor-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px; 
}
.tarjeta-producto {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tarjeta-producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.producto-imagen-wrapper { width: 100%; height: 150px; overflow: hidden; }
.producto-imagen { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.tarjeta-producto:hover .producto-imagen { transform: scale(1.1); }
.producto-info { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; }
.producto-info h2 { margin: 0 0 10px 0; font-size: 1.1em; color: #333; }
.producto-info .precio { font-size: 1.3em; font-weight: bold; margin-top: auto; }

/* --- Carrito Flotante --- */
.carrito-flotante { position: fixed; background-color: #2c3e50; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 4px 8px rgba(0,0,0,0.2); z-index: 1001; transition: transform 0.2s; }
.carrito-flotante:hover { transform: scale(1.1); }
.carrito-contador { position: absolute; top: -5px; right: -5px; background-color: #e74c3c; color: white; font-size: 12px; font-weight: bold; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* --- Modal de Vista Rápida --- */
.modal-overlay { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); justify-content: center; align-items: center; animation: fade-in 0.3s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-content { background: #fff; max-width: 800px; width: 90%; display: flex; overflow: hidden; animation: slide-up 0.3s ease-out; }
@keyframes slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-imagen { width: 50%; object-fit: cover; }
.modal-info { width: 50%; padding: 30px; position: relative; }
.modal-close { position: absolute; top: 10px; right: 20px; font-size: 35px; cursor: pointer; color: #aaa; transition: color 0.2s; }
.modal-close:hover { color: #333; }
.modal-info h2 { margin: 0 0 15px 0; }
.modal-info p { margin-bottom: 20px; line-height: 1.6; }
.modal-info h3 { font-size: 1.8em; margin-bottom: 25px; }
.add-to-cart-btn { color: #fff; border: none; width: 100%; padding: 15px; font-size: 1.1em; font-weight: bold; cursor: pointer; transition: filter 0.2s; }

/* --- Pie de Página --- */
.footer { background-color: #343a40; color: #f8f9fa; text-align: center; padding: 20px; margin-top: 40px; }
.footer a { color: #f39c12; text-decoration: none; font-weight: bold; }
.footer a:hover { text-decoration: underline; }

/* --- Estilos para el Formulario de Checkout --- */
.checkout-container { max-width: 700px; margin: 40px auto; background-color: #fff; padding: 30px 40px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.checkout-form label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; }
.checkout-form input[type="text"],
.checkout-form input[type="tel"],
.checkout-form select,
.checkout-form textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 1em; margin-bottom: 20px; box-sizing: border-box; }
.checkout-form textarea { min-height: 100px; }
.checkout-form .btn { display: block; width: 100%; padding: 15px; border: none; border-radius: 5px; cursor: pointer; font-size: 1.1em; font-weight: bold; text-align: center; text-decoration: none; margin-top: 10px; }
.checkout-form .btn-success { background-color: var(--color-principal, #007bff); color: white; }
.checkout-form .btn-secondary { background-color: #6c757d; color: white; }

/* Responsive para el modal y otros en móviles */
@media (max-width: 768px) {
    .modal-content { flex-direction: column; width: 95%; max-height: 90vh; overflow-y: auto; }
    .modal-imagen, .modal-info { width: 100%; }
    .modal-imagen { height: 250px; }
}
/* --- Banner de Estado de la Tienda --- */
.estado-tienda-banner {
    padding: 10px;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    position: sticky; /* Fija el banner en la parte superior al hacer scroll */
    top: 0;
    z-index: 1001;
}
.estado-tienda-banner.abierto {
    background-color: #28a745; /* Verde */
}
.estado-tienda-banner.cerrado {
    background-color: #dc3545; /* Rojo */
}

/* --- Header del Menú Público --- */
.header-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding-top: 20px; /* Añadido para dar espacio después del banner */
    margin-bottom: 30px;
}