/* ==========================================================================
   ALRI SNACKS - CSS PREMIUM V3.5 (HERO BLURRED + CÓMO COMPRAR)
   ========================================================================== */

:root {
    --primary-blue: #1A365D;
    --primary-orange: #F97316;
    --orange-hover: #ea580c;
    --whatsapp-green: #25D366;
    --whatsapp-hover: #128C7E;
    --bg-light: #F8FAFC;
    --text-dark: #334155;
    --white: #FFFFFF;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 1. Reset & Base */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', sans-serif; 
    scroll-behavior: smooth; 
}

body { 
    background-color: var(--bg-light); 
    color: var(--text-dark); 
    line-height: 1.6; 
    overflow-x: hidden;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

.section-padding { 
    padding: 100px 0; 
}

.section-title { 
    text-align: center; 
    color: var(--primary-blue); 
    margin-bottom: 50px; 
    font-size: 2.8rem; 
    font-weight: 800; 
    letter-spacing: -1px;
}

/* 2. Navbar */
.navbar { 
    background: var(--white); 
    box-shadow: var(--shadow-soft); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    padding: 15px 0; 
}

.nav-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo img { 
    height: 55px; 
    object-fit: contain; 
}

.menu a { 
    text-decoration: none; 
    color: var(--primary-blue); 
    font-weight: 600; 
    margin: 0 15px; 
    transition: 0.3s ease; 
    font-size: 0.95rem;
}

.menu a:hover { 
    color: var(--primary-orange); 
}

.cart-icon { 
    background: var(--primary-orange); 
    color: var(--white); 
    padding: 12px 22px; 
    border-radius: 50px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.cart-icon:hover { 
    background: var(--orange-hover); 
    transform: scale(1.05); 
}

/* 3. Hero Section (IMAGEN DIFUMINADA) */
.hero { 
    position: relative;
    color: var(--white);
    text-align: center;
    padding: 160px 20px;
    z-index: 1;
    overflow: hidden; 
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('../img/portada_alrisnacks.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    filter: blur(6px); 
    transform: scale(1.1); 
    z-index: -2; 
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(12, 26, 44, 0.7) 0%, rgba(12, 26, 44, 0.5) 100%);
    z-index: -1;
}

.hero h1 { 
    font-size: 3.8rem; 
    margin-bottom: 20px; 
    font-weight: 800; 
    line-height: 1.1; 
    text-shadow: 0 4px 15px rgba(0,0,0,0.5); 
}

.hero p { 
    font-size: 1.3rem; 
    margin-bottom: 40px; 
    opacity: 0.95; 
    max-width: 750px; 
    margin-left: auto; 
    margin-right: auto; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.btn-primary { 
    background: var(--primary-orange); 
    color: var(--white); 
    padding: 16px 40px; 
    border: none; 
    border-radius: 50px; 
    font-size: 1.1rem; 
    font-weight: 700; 
    cursor: pointer; 
    text-decoration: none; 
    transition: 0.3s ease; 
    display: inline-block; 
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.4); 
}

.btn-primary:hover { 
    background: var(--orange-hover); 
    transform: translateY(-3px); 
    box-shadow: 0 15px 25px rgba(249, 115, 22, 0.5); 
}

/* 4. Grids */
.grid-3 { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
}

/* 5. Tarjetas Generales (Servicios y Pasos) */
.card { 
    background: var(--white); 
    padding: 40px; 
    border-radius: 20px; 
    box-shadow: var(--shadow-soft); 
    transition: 0.4s ease; 
    border: 1px solid rgba(0,0,0,0.02); 
    text-align: center;
}

.card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--shadow-premium); 
}

.service-icon { 
    width: 75px; 
    height: 75px; 
    margin-bottom: 25px; 
    object-fit: contain; 
}

.card h3 { 
    color: var(--primary-blue); 
    margin-bottom: 15px; 
    font-size: 1.4rem; 
    font-weight: 700; 
}

.card p {
    color: #64748b;
}

/* --- NUEVO: Sección Cómo Comprar --- */
.how-to-buy {
    background-color: transparent; 
}

.step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-number {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-orange);
    line-height: 1;
    margin-bottom: 15px;
    opacity: 0.9;
    text-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}

/* 6. Catálogo de Productos */
.filters { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    margin-bottom: 60px; 
    flex-wrap: wrap; 
}

.filter-btn { 
    padding: 12px 25px; 
    border: 2px solid var(--primary-blue); 
    background: transparent; 
    color: var(--primary-blue); 
    border-radius: 50px; 
    cursor: pointer; 
    font-weight: 700; 
    transition: 0.3s; 
}

.filter-btn.active, .filter-btn:hover { 
    background: var(--primary-blue); 
    color: var(--white); 
    box-shadow: 0 5px 15px rgba(26, 54, 93, 0.2);
}

.product-card { 
    background: var(--white); 
    border-radius: 20px; 
    overflow: hidden; 
    box-shadow: var(--shadow-soft); 
    text-align: center; 
    padding-bottom: 30px; 
    display: flex; 
    flex-direction: column; 
    transition: 0.4s;
    border: 1px solid rgba(0,0,0,0.02);
}

.img-container { 
    width: 100%; 
    height: 260px; 
    background-color: var(--white); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 30px; 
    border-bottom: 1px solid #f1f5f9; 
}

.img-container img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
    transition: transform 0.5s ease; 
}

.product-card:hover .img-container img { 
    transform: scale(1.1); 
}

.product-card h4 { 
    color: var(--primary-blue); 
    margin: 25px 15px 10px; 
    font-size: 1.25rem; 
    font-weight: 800; 
}

.product-card p { 
    color: #64748b; 
    font-size: 1rem; 
    margin-bottom: 25px; 
    flex-grow: 1; 
}

.add-btn { 
    background: var(--white); 
    border: 2px solid var(--primary-orange); 
    color: var(--primary-orange); 
    padding: 12px 30px; 
    border-radius: 50px; 
    cursor: pointer; 
    font-weight: 800; 
    transition: 0.3s; 
    width: 85%; 
    margin: auto auto 0 auto; 
}

.add-btn:hover { 
    background: var(--primary-orange); 
    color: var(--white); 
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.3);
}

/* 7. Sección Hablemos por WhatsApp */
.whatsapp-form-section { 
    background-color: #fdfdfd; 
    border-top: 1px solid #eee;
}

.form-layout { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
}

.form-main-title { 
    font-size: 3.2rem; 
    color: var(--primary-blue); 
    font-weight: 800; 
    margin-bottom: 60px; 
}

.form-card { 
    width: 100%; 
    max-width: 800px; 
    padding: 70px 50px; 
    box-shadow: var(--shadow-premium); 
    border-radius: 30px; 
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.02);
}

.form-subtitle { 
    font-size: 1.1rem; 
    color: var(--primary-blue); 
    font-weight: 800; 
    margin-bottom: 35px; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
}

textarea { 
    width: 100%; 
    padding: 25px; 
    border: 2px solid #edf2f7; 
    border-radius: 15px; 
    background-color: #f8fafc; 
    font-size: 1.1rem; 
    resize: vertical; 
    color: var(--text-dark); 
    margin-bottom: 35px;
    transition: 0.3s;
}

textarea:focus { 
    outline: none; 
    border-color: var(--whatsapp-green); 
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.1); 
}

.btn-green-whatsapp { 
    background: var(--whatsapp-green); 
    width: 100%; 
    border-radius: 15px; 
    padding: 20px; 
    font-size: 1.2rem; 
    font-weight: 700;
}

.btn-green-whatsapp:hover { 
    background: var(--whatsapp-hover); 
    transform: scale(1.02); 
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

/* 8. Carrito Lateral */
.cart-sidebar { 
    position: fixed; 
    top: 0; 
    right: -450px; 
    width: 420px; 
    height: 100vh; 
    background: var(--white); 
    box-shadow: -15px 0 35px rgba(0,0,0,0.15); 
    z-index: 1000; 
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    flex-direction: column; 
}

.cart-sidebar.open { 
    right: 0; 
}

.cart-header { 
    padding: 30px; 
    background: var(--primary-blue); 
    color: var(--white); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.cart-header h3 { font-weight: 800; }

.cart-items { 
    flex: 1; 
    padding: 30px; 
    overflow-y: auto; 
}

.cart-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #f1f5f9; 
    padding: 20px 0; 
}

.cart-item-title { 
    color: var(--primary-blue); 
    font-weight: 700; 
    font-size: 1.05rem; 
}

.remove-btn { 
    color: #ef4444; 
    border: none; 
    background: #fee2e2; 
    width: 35px; 
    height: 35px; 
    border-radius: 50%; 
    cursor: pointer; 
    font-weight: 900;
}

.cart-footer { 
    padding: 30px; 
    border-top: 1px solid #eee; 
    background: #f8fafc; 
}

.overlay { 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(15, 23, 42, 0.7); 
    backdrop-filter: blur(4px); 
    z-index: 999; 
    opacity: 0; 
    visibility: hidden; 
    transition: 0.4s; 
}

.overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

/* 9. Botón Flotante */
.whatsapp-float { 
    position: fixed; 
    bottom: 35px; 
    right: 35px; 
    background-color: var(--whatsapp-green); 
    color: #FFF; 
    border-radius: 50px; 
    width: 65px; 
    height: 65px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4); 
    z-index: 100; 
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.whatsapp-float:hover { 
    transform: scale(1.15) rotate(10deg); 
    background-color: var(--whatsapp-hover); 
}

/* 10. Footer Corporativo */
.main-footer { 
    background-color: #0c1a2c; 
    color: var(--white); 
    padding: 90px 0 30px; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr; 
    gap: 60px; 
    padding-bottom: 60px; 
    border-bottom: 1px solid rgba(255,255,255,0.08); 
}

.footer-logo { 
    height: 70px; 
    object-fit: contain; 
    margin-bottom: 20px; 
}

.footer-company-name { 
    font-weight: 900; 
    font-size: 1.4rem; 
    letter-spacing: 1px;
}

.footer-tagline { 
    opacity: 0.6; 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    margin-top: 5px;
}

.footer-title { 
    color: var(--primary-orange); 
    margin-bottom: 30px; 
    font-size: 1.15rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    font-weight: 800;
}

.contact-item { 
    margin-bottom: 18px; 
    opacity: 0.9; 
    font-weight: 500; 
    font-size: 1.05rem;
}

.footer-bottom { 
    text-align: center; 
    padding-top: 30px; 
    font-size: 0.85rem; 
    opacity: 0.5; 
    letter-spacing: 0.5px;
}

/* 11. Responsive */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 3rem; }
}
@media (max-width: 768px) {
    .navbar { position: relative; padding: 20px 0; }
    .nav-content { flex-direction: column; gap: 20px; }
    .logo img { height: 45px; }
    .menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
    .menu a { margin: 0 5px; font-size: 0.85rem; }
    .grid-3 { grid-template-columns: 1fr; }
    .section-title { font-size: 2.2rem; }
    .hero { padding: 100px 20px; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .cart-sidebar { width: 100%; right: -100%; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .form-card { padding: 40px 20px; }
    .form-main-title { font-size: 2.2rem; }
}