/* Estilos Base y Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Bookman Old Style', sans-serif;
    background-color: #f8f8f8;
    color: #f438ce;
    line-height: 1.0;
}

header {
    background-color: #be4eb5; /* Azul grisáceo, profesional */
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

header h1 {
    font-family: 'Baguet Script', serif; /* La fuente elegante para el título */
    font-size: 2.8rem; /* Tamaño grande para empezar (Desktop) */
    margin-bottom: 0.5rem;
    font-weight: 600; 
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Estilos de Filtros --- */
.filtros {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.filtros select {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

/* --- Galería de Productos (Diseño de Cuadrícula Adaptable) --- */
.galeria-productos {
    display: grid;
    /* Cuadrícula adaptable: Mínimo 280px por columna */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 30px 0;
}

/* Estilo de la Tarjeta Individual */
.producto-tarjeta {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.producto-tarjeta:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.producto-tarjeta img {
    width: 100%;
    height: 350px; 
    object-fit: cover; 
}

.info-tarjeta {
    padding: 15px;
    text-align: center;
}

.info-tarjeta h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.info-tarjeta p {
    font-weight: bold;
    color: #c0392b; 
    font-size: 1.1rem;
}

/* --- Modal (Vista Detallada) --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); 
}

.modal-contenido {
    background-color: #fff;
    margin: 5% auto; 
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.cerrar-modal {
    color: #aaa;
    float: right;
    font-size: 30px;
    font-weight: bold;
    line-height: 1;
}

.cerrar-modal:hover,
.cerrar-modal:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* Diseño de la vista de detalle */
.detalle-producto {
    display: flex;
    gap: 30px;
    padding-bottom: 20px;
}

.detalle-producto .imagenes {
    flex: 1;
    text-align: center;
}

.detalle-producto .info {
    flex: 1;
}

.detalle-producto .info h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.detalle-producto .info .precio {
    font-size: 1.8rem;
    color: #c0392b;
    margin: 15px 0;
    font-weight: bold;
}

.detalle-producto .info p {
    margin-bottom: 10px;
}

/* Botón de WhatsApp */
.btn-whatsapp {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #25D366; 
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

/* --- Estilos del Carrusel de Imágenes en el Modal --- */

.carrusel-contenedor {
    position: relative;
    overflow: hidden; 
    border-radius: 5px;
    margin-bottom: 10px;
}

.carrusel-imagenes {
    display: flex; 
    transition: transform 0.5s ease; 
}

.carrusel-imagenes img {
    width: 100%;
    flex-shrink: 0; 
    height: 400px; 
    object-fit: cover;
}

/* Controles de Navegación */
.carrusel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10; 
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.carrusel-control:hover {
    opacity: 1;
}

.prev {
    left: 10px;
    border-radius: 0 5px 5px 0;
}

.next {
    right: 10px;
    border-radius: 5px 0 0 5px;
}

/* --- Estilos del Pie de Página (Footer) --- */

footer {
    /* Mismo color elegante del header */
    background-color: #be4eb5; 
    color: white;
    padding: 30px 0;
    margin-top: 40px; /* Separación de la galería */
}

.footer-contenido {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; /* Permite que las secciones se apilen en móviles */
    gap: 30px;
}

.footer-seccion {
    flex: 1; /* Cada sección ocupará el mismo espacio */
    min-width: 250px; /* Asegura que no se hagan muy pequeños en pantallas medianas */
}

.footer-seccion h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    /* Aplicamos la fuente elegante del título para coherencia */
    font-family: 'Playfair Display', serif; 
    font-weight: 600;
}

.footer-seccion p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-seccion a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-seccion a:hover {
    color: #e2e2e2; /* Un gris muy claro al pasar el mouse */
    text-decoration: underline;
}

/* Estilo para los iconos de contacto (código de emojis o Unicode) */
.icono-contacto {
    margin-right: 8px;
}

/* Estilo para iconos sociales (usaremos el código de Instagram directamente) */
.icono-social {
    display: block;
    font-size: 1rem;
    margin-top: 10px;
}


/* --- Media Query para el Footer (Responsive) --- */
@media (max-width: 768px) {
    .footer-contenido {
        flex-direction: column; /* Apila las secciones del footer en móviles */
        text-align: center;
    }
    
    .footer-seccion {
        min-width: 100%;
        margin-bottom: 20px;
    }
}

/* Media Query para la adaptabilidad (Responsive Design) */
@media (max-width: 768px) {
    .detalle-producto {
        flex-direction: column; 
    }

    .modal-contenido {
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .filtros {
        flex-direction: column;
    }

    .filtros select {
        width: 100%;
    }
}

/* --- Media Query: Ajustes para Celulares --- */
@media (max-width: 768px) {
    /* Reducimos el padding del header para ahorrar espacio */
    header {
        padding: 1.5rem 0.5rem; 
    }

    /* HACEMOS EL TÍTULO RESPONSIVE */
    header h1 {
        /* Reducimos la letra del título de 2.8rem a 1.8rem para que no se salga de la pantalla */
        font-size: 1.2rem;
    }

    /* También podemos reducir el subtítulo */
    header p {
        font-size: 0.8rem;
    }
}