:root {
    /* Paleta de Colores - Premium Light Mode */
    --bg-color: #fafafa;       /* Fondo muy claro */
    --surface-color: #ffffff;  /* Tarjetas blancas */
    --text-primary: #555555;   /* Gris carbón cálido */
    --text-secondary: #6a6a6a; /* Gris secundario suavizado */
    --accent-color: #ffde59;   /* Amarillo de la marca */
    --accent-hover: #e6c850;
    --price-color: #b38b22;    /* Dorado oscuro para los precios */
    --border-color: #eaeaea;   /* Bordes muy sutiles */
    
    /* Tipografía */
    --font-main: 'Outfit', sans-serif;
    
    /* Espaciados */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Bordes y Sombras - Glassmorphism sutil */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Background Pattern con opacidad */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../assets/img/bg-pattern.png');
    background-size: 300px;
    background-repeat: repeat;
    opacity: 0.12; /* Mucho más suave y sutil */
    mix-blend-mode: multiply; /* Esto elimina mágicamente el fondo blanco de la imagen */
    filter: grayscale(100%); /* Convierte el dibujo a tonos grises */
    z-index: -1;
    pointer-events: none;
}

/* Header Flotante Premium */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: sticky;
    top: 10px;
    z-index: 100;
    background: rgba(235, 235, 240, 0.45); /* Gris clarito, mucho más transparente */
    backdrop-filter: blur(20px) saturate(150%); /* Mucho más blur (estilo iOS) */
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.8); /* Borde blanco nítido para resaltar el cristal */
    border-radius: 50px;
    margin: 10px 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08); /* Sombra difusa elegante */
}

.logo-container {
    margin-bottom: 0;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

.logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-subtitle {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    color: #2b2b2b; /* Carbón oscuro */
    text-transform: uppercase;
}

.menu-icon {
    color: #2b2b2b; /* Carbón oscuro */
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding-bottom: var(--spacing-sm);
}

/* Banner Promocional */
.promo-banner {
    margin: var(--spacing-sm);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background-color: var(--surface-color);
    aspect-ratio: 16/9;
}

.promo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 80%; /* El waffle acomodado perfectamente */
    display: block;
}

.promo-content-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.45); /* Más transparente */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 4px 8px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    max-width: 70%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.promo-badge {
    color: #F37A1F; /* Naranja de la marca */
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-product-name {
    color: #ffffff; /* Texto blanco para contrastar con el fondo oscuro */
    font-size: 0.8rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    text-align: right;
}

/* Sección de Instrucción */
.explore-header {
    text-align: center;
    padding: 8px 16px;
    margin: 10px var(--spacing-md) 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    border: 1px solid rgba(255, 255, 255, 1);
}

.explore-header h3 {
    font-size: 1.15rem;
    color: #F37A1F; /* Naranja premium para destacar */
    font-weight: 900;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.explore-header p {
    font-size: 0.85rem;
    color: #4a4a4a;
    font-weight: 600;
    margin-top: 0;
    line-height: 1.2;
}

/* Navegación por Categorías */
.categories-nav {
    display: flex;
    overflow-x: auto;
    padding: 10px var(--spacing-sm) 15px;
    gap: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: sticky;
    top: 85px; /* Ajustado al header flotante */
    background: linear-gradient(180deg, rgba(250,250,250,0.98) 0%, rgba(250,250,250,0.95) 80%, rgba(250,250,250,0) 100%);
    z-index: 90;
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

/* Chips Premium con efecto táctil (Cuadrados modernos) */
.category-chip {
    padding: 10px 20px;
    background-color: var(--surface-color);
    border: 1px solid rgba(244, 142, 64, 0.3); /* Borde sutil naranja */
    border-radius: 12px; /* Biseles modernos en lugar de forma de píldora redonda */
    color: #F48E40; /* Letra naranja para que no se pierda */
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700; /* Un poco más gruesa para asegurar legibilidad */
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
    flex-shrink: 0; /* EVITA QUE EL NAVEGADOR LOS APLASTE A CUADRADOS */
}

.category-chip:active {
    transform: scale(0.95);
}

.category-chip.active {
    background-color: #F48E40; /* Naranja intermedio (mitad entre logo exacto y tono suave) */
    color: #ffffff; /* Texto blanco */
    border-color: #F48E40;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35); /* Resplandor/Sombra oscura carbón */
    transform: translateY(-2px);
}

/* Sección de Productos */
.products-section {
    padding: 0 var(--spacing-md);
    animation: slideUpFade 0.5s ease-out;
}

.category-header {
    margin: var(--spacing-sm) 0 var(--spacing-sm);
    text-align: center;
}

.category-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.category-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-style: italic;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

/* Product Card - Rediseño Horizontal */
.product-card {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: row;
    border: 1px solid rgba(0,0,0,0.03);
    padding: var(--spacing-sm) var(--spacing-md);
    transition: all 0.3s ease;
    align-items: center; /* Centrar verticalmente */
    text-align: left;
    gap: var(--spacing-md);
}

.product-card:active {
    transform: scale(0.98);
}

/* Contenedor de Imagen (Cuadrado redondeado moderno) */
.product-image-container {
    width: 90px; /* Tamaño más grande para apreciar detalles */
    height: 90px;
    border-radius: 14px; /* Esquinas redondeadas en lugar de círculo para no cortar las esquinas de la foto */
    overflow: hidden;
    background-color: transparent; /* Fondo transparente para evitar franjas grises */
    margin-bottom: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Skeleton Loading Animación */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton-box {
    background: #f6f7f8;
    background-image: linear-gradient(90deg, #f6f7f8 0px, #edeef1 40px, #f6f7f8 80px);
    background-size: 400px 100%; 
    animation: shimmer 1.5s infinite linear forwards;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    border-radius: inherit;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Volvemos a cover para que llene el cuadro */
    object-position: center 80%; /* Sube físicamente la foto dentro del contenedor */
    display: block;
    transition: transform 0.5s ease, opacity 0.3s ease-in;
    position: relative;
    z-index: 2;
    opacity: 0; /* Oculto hasta que cargue para mostrar el skeleton */
}

.product-image.loaded {
    opacity: 1;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 100%;
    overflow: hidden;
}

.product-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xs);
    width: 100%;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    flex-grow: 1;
}

.product-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--price-color);
    background: rgba(255, 222, 89, 0.2);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    display: inline-block;
    flex-shrink: 0;
    margin-top: 0;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 0;
}

/* Footer Simple Ultra-Compacto */
.footer {
    background-color: #f5f5f5; /* Gris suave de fondo */
    text-align: center;
    padding: 12px 10px 8px; /* Reducido drásticamente */
    margin-top: 15px; /* Menos espacio entre menú y footer */
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--text-primary);
}

.footer-title {
    font-size: 1.3rem; /* Más grande según solicitud */
    font-weight: 800;
    color: #F37A1F; /* Naranja del logo */
    text-shadow: 1px 1px 3px rgba(243, 122, 31, 0.4); /* Leve sombra para resaltarlo */
    margin-bottom: 4px; /* Un poquito más de espacio porque es más grande */
}

.footer-text {
    font-size: 0.95rem; /* Más grande según solicitud */
    color: var(--text-secondary);
    margin-bottom: 6px; 
}

.footer-social {
    margin: 8px 0 12px;
    display: flex;
    justify-content: center;
}

.social-link {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--surface-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.social-link:active {
    transform: scale(0.9);
}

/* Efecto tipo WhatsApp (Pulso) con color corporativo */
#ig-link {
    background-color: var(--surface-color);
    color: #F37A1F; /* Naranja igual al texto María Mulata Café */
    animation: pulse-ig 2s infinite;
    border: none;
}

#ig-link:hover {
    color: #E1306C; /* Gradiente o color de instagram al hacer hover */
}

@keyframes pulse-ig {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(243, 122, 31, 0.35); /* Sombra inicial naranja */
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 12px rgba(243, 122, 31, 0); /* Difuminación naranja */
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(243, 122, 31, 0);
    }
}

.footer-legal {
    font-size: 0.65rem; /* Texto legal muy pequeño */
    color: var(--text-light);
    line-height: 1.3;
    padding-top: 6px;
    margin-top: 6px;
    border-top: none; /* Línea eliminada */
}

.footer-legal p {
    margin: 0 0 2px 0;
}

.metrics-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 3px;
}

.metrics-logo {
    height: 10px; /* Logo pequeñito */
    object-fit: contain;
    opacity: 0.7; /* Para que no sea tan contrastante */
}

/* --- Animaciones Keyframes --- */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Modal de Imagen --- */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    touch-action: none; /* Bloquea el scroll táctil para permitir el swipe */
}

.image-modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none; /* Previene que el navegador intente "descargar" o arrastrar la foto */
}

.image-modal.show .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
    line-height: 1;
}

.close-modal:hover {
    color: var(--accent-color);
}

/* Animations */
@keyframes slideUpFade {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Media Queries para Tablet/Desktop */
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .promo-banner {
        max-width: 700px;
        margin: var(--spacing-md) auto;
    }
    
    .categories-nav {
        justify-content: center;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-content {
        max-width: 1200px;
        margin: 0 auto;
    }
}
