/* ============================================
   NeuNuts Landing Page — Styles
   Premium dark theme with golden accents
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* =========== CSS VARIABLES =========== */
:root {
    --bg-primary: #0a0908;
    --bg-secondary: #141210;
    --bg-card: #1a1816;
    --bg-card-hover: #221f1b;
    --bg-glass: rgba(26, 24, 22, 0.75);

    --gold-primary: #d4a843;
    --gold-light: #e8c86a;
    --gold-dark: #b08a30;
    --gold-glow: rgba(212, 168, 67, 0.15);
    --gold-gradient: linear-gradient(135deg, #d4a843 0%, #e8c86a 50%, #b08a30 100%);

    --text-primary: #f5f0e8;
    --text-secondary: #b8a99a;
    --text-muted: #7a6e62;

    --accent-warm: #c96b3c;
    --accent-green: #6b8f5e;

    --border-subtle: rgba(212, 168, 67, 0.08);
    --border-gold: rgba(212, 168, 67, 0.2);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(212, 168, 67, 0.08);
    --shadow-product: 0 8px 32px rgba(0, 0, 0, 0.5);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =========== RESET & BASE =========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* =========== PRELOADER =========== */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-nut {
    width: 60px;
    height: 60px;
    font-size: 3rem;
    animation: nutSpin 1.2s ease-in-out infinite;
}

@keyframes nutSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

.preloader-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--gold-primary);
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

/* =========== FLOATING PARTICLES =========== */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-primary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s infinite;
}

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.3; }
    90% { opacity: 0.1; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* =========== HEADER / HERO =========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
    filter: blur(2px) saturate(0.8);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 9, 8, 0.3) 0%,
        rgba(10, 9, 8, 0.6) 50%,
        rgba(10, 9, 8, 0.95) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    animation: heroFadeIn 1.2s ease-out;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-logo {
    width: min(280px, 70vw);
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(212, 168, 67, 0.2));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(212, 168, 67, 0.2)); }
    50% { filter: drop-shadow(0 0 30px rgba(212, 168, 67, 0.35)); }
}

.hero-tagline {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-tagline .gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.hero-location {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-gold);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--gold-light);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    background: var(--gold-gradient);
    color: var(--bg-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3);
    letter-spacing: 0.02em;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(212, 168, 67, 0.45);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid var(--border-gold);
    border-radius: 100px;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    color: var(--gold-light);
    border-color: var(--gold-primary);
    background: var(--gold-glow);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--gold-primary);
    border-bottom: 2px solid var(--gold-primary);
    transform: rotate(45deg);
    opacity: 0.5;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* =========== SECTION TITLES =========== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 4rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold-primary);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    position: relative;
}

.section-label::before,
.section-label::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: var(--gold-primary);
    opacity: 0.4;
}

.section-label::before { right: calc(100% + 12px); }
.section-label::after { left: calc(100% + 12px); }

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    font-weight: 300;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* =========== PRODUCTS GRID =========== */
.products-section {
    position: relative;
    z-index: 1;
    padding: 2rem 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========== PRODUCT CARD =========== */
.product-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px);
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-gold);
    box-shadow: var(--shadow-product), var(--shadow-glow);
}

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

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

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-secondary);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 40%,
        rgba(10, 9, 8, 0.85) 100%
    );
    pointer-events: none;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    padding: 0.4rem 0.9rem;
    background: var(--gold-gradient);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 100px;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 10px rgba(212, 168, 67, 0.3);
}

.product-weight {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-gold);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.product-description {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 300;
}

/* =========== INGREDIENTS BAR =========== */
.ingredients-bar {
    display: flex;
    width: 100%;
    height: 8px;
    border-radius: 100px;
    overflow: hidden;
    margin: 0.25rem 0;
    background: var(--bg-secondary);
}

.ingredients-bar .bar-segment {
    height: 100%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ingredients-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    margin-top: 0.25rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-item .grams {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Ingredient colors */
.color-castanas { background: #d4a843; }
.color-almendras { background: #c96b3c; }
.color-nueces { background: #8b6f47; }
.color-girasol { background: #b8a040; }
.color-mani { background: #d4b896; }
.color-pasas { background: #6b4c6e; }
.color-azucar { background: #e8ddd0; }
.color-chocolate { background: #4a2c1a; }
.color-zapallo { background: #6b8f5e; }
.color-chia { background: #2d2d2d; border: 1px solid rgba(255,255,255,0.1); }

/* =========== PRODUCT ORDER BUTTON =========== */
.product-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    background: transparent;
    color: var(--gold-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    margin-top: 0.25rem;
    letter-spacing: 0.03em;
}

.product-order:hover {
    background: var(--gold-gradient);
    color: var(--bg-primary);
    border-color: var(--gold-primary);
    transform: scale(1.02);
}

.product-order svg {
    width: 18px;
    height: 18px;
}

/* =========== ABOUT SECTION =========== */
.about-section {
    position: relative;
    z-index: 1;
    padding: 4rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.feature-card {
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    border-color: var(--border-gold);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.6;
}

/* =========== FLOATING WHATSAPP =========== */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition-spring);
    text-decoration: none;
    animation: whatsappPulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1); }
}

/* =========== FOOTER =========== */
.footer {
    position: relative;
    z-index: 1;
    padding: 3rem 1.5rem 2rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-social a:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    transform: translateY(-2px);
}

.footer-social a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* =========== PRODUCT MODAL / DETAIL VIEW =========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-xl);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-spring);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 36px;
    height: 36px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--gold-primary);
    color: var(--bg-primary);
}

.modal-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 300;
}

.modal-ingredients-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.modal-ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-ingredient {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.modal-ingredient-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.modal-ingredient-amount {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gold-primary);
}

.modal-percentage {
    width: 100%;
    height: 4px;
    background: var(--bg-primary);
    border-radius: 100px;
    overflow: hidden;
    margin-top: -0.25rem;
}

.modal-percentage-bar {
    height: 100%;
    border-radius: 100px;
    transition: width 0.6s ease;
}

.modal-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 1rem;
    background: var(--gold-gradient);
    color: var(--bg-primary);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    letter-spacing: 0.02em;
}

.modal-order:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(212, 168, 67, 0.4);
}

/* =========== SCROLLBAR =========== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 100px;
}

/* =========== UTILITY ANIMATIONS =========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========== RESPONSIVE =========== */
@media (max-width: 640px) {
    .hero {
        min-height: 100svh;
        padding: 1.5rem 1rem;
    }

    .hero-logo {
        width: min(220px, 60vw);
    }

    .products-section {
        padding: 1.5rem 1rem 3rem;
    }

    .product-info {
        padding: 1.25rem;
    }

    .product-name {
        font-size: 1.2rem;
    }

    .whatsapp-float {
        bottom: 1rem;
        right: 1rem;
        width: 56px;
        height: 56px;
    }

    .section-header {
        padding-top: 3rem;
        margin-bottom: 2rem;
    }

    .modal-content {
        max-height: 95vh;
        border-radius: var(--radius-lg);
    }

    .modal-image {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

@media (min-width: 960px) {
    .products-grid {
        gap: 2.5rem;
    }
}

/* =========== IMAGE CHANGE INSTRUCTIONS (hidden) =========== */
/* 
   PARA CAMBIAR IMÁGENES DE PRODUCTOS:
   =====================================
   Las imágenes están en la carpeta: img/productos/
   
   Nombres de archivos:
   - mix-premium.jpg
   - mix-energico.jpg  
   - mix-caramelizado.jpg
   - castanas-caramelizadas.jpg
   - girasol-crocante.jpg
   - chocolate-semiamargo.jpg
   
   Simplemente reemplazá el archivo .jpg manteniendo el mismo nombre.
   
   Para el logo: img/logo.png
   Para el fondo del hero: img/hero-bg.png
*/
