/* VARIABLES & RESET */
:root {
    --primary-color: #1F1F1F;
    --bg-light: #F2F2F2;
    --bg-white: #FFFFFF;
    --text-color: #1F1F1F;
    --text-light: #E0E0E0;
    --font-primary: "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Nunito", "Arial Rounded MT Bold", "Inter", sans-serif;
    --border-radius: 16px;
    --transition-speed: 350ms;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: var(--bg-white);
}

body.menu-open {
    overflow: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* HERO SECTION */
.hero {
    position: relative;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    background: #000;
}

.video-background {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.video-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: max(100vw, 56.25dvh);
    height: max(177.78vw, 100dvh);
}

.video-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.10), rgba(0,0,0,0.35));
}

/* FLOATING ACTIONS */
.floating-actions {
    position: fixed;
    z-index: 50;
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(10% + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.fab-btn {
    background: transparent;
    border: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-shadow: 0px 2px 5px rgba(0,0,0,0.7);
    filter: drop-shadow(0px 2px 5px rgba(0,0,0,0.7));
    transition: transform 0.2s ease;
    padding: 0;
    min-width: 48px;
    min-height: 48px;
}

.fab-btn:hover, .fab-btn:active {
    transform: scale(1.1);
}

.fab-btn svg {
    margin-bottom: 4px;
}

.fab-btn span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .floating-actions {
        gap: 16px;
        right: 12px;
    }
    .fab-btn svg {
        width: 24px;
        height: 24px;
    }
    .fab-btn span {
        font-size: 10px;
    }
}

/* MENU OVERLAY */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    width: 100vw;
    height: 100dvh;
    background: var(--bg-light);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.menu-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.menu-brand h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: var(--primary-color);
}

.menu-brand p {
    font-size: 14px;
    color: #555;
    margin: 0;
}

.close-menu-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.close-menu-btn:hover {
    transform: scale(1.1);
}

.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 40px;
}

.menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 16px;
    background: var(--primary-color);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.menu-link:hover {
    background: #000;
    transform: translateY(-2px);
}

/* TEXT SECTIONS */
.text-section {
    padding: 80px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-bg-light { background-color: var(--bg-light); }
.text-bg-white { background-color: var(--bg-white); }

.premium-text {
    font-family: var(--font-heading);
    font-size: 36px;
    line-height: 1.4;
    text-align: center;
    color: var(--primary-color);
    max-width: 920px;
    margin: 0 auto;
    font-weight: 500;
}

@media (max-width: 768px) {
    .text-section { padding: 60px 0; }
    .premium-text { font-size: 22px; }
}

/* PRODUCTS SECTION */
.products-section {
    background-color: var(--bg-white);
    padding: 40px 0 80px;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

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

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

.product-card {
    display: block;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

@media (hover: hover) and (pointer: fine) {
    .product-card:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    }
}

/* MARQUEE SECTION */
.marquee-section {
    background-color: var(--bg-white);
    padding: 20px 0;
    overflow: hidden;
}

.marquee {
    overflow: hidden;
    width: 100%;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 22s linear infinite;
}

.marquee-track img {
    height: 120px;
    width: auto;
    object-fit: contain;
    padding-right: 0;
}

@media (max-width: 768px) {
    .marquee-track img { height: 80px; }
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* FOOTER */
.main-footer {
    position: relative;
    background-image: url("https://galeriabiolven.b-cdn.net/pie%20de%20pagina.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    color: #fff;
    padding: 80px 0;
}

.footer-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.78), rgba(0,0,0,0.45));
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
    padding-right: 80px; /* Space for floating buttons on mobile */
}

.footer-brand {
    margin-bottom: 40px;
}

.footer-brand h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    margin: 0 0 12px 0;
}

.footer-brand p {
    font-size: 16px;
    color: var(--text-light);
    margin: 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 500px;
}

.footer-card-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 12px;
    color: #fff;
    font-weight: 500;
    transition: background 0.2s ease;
}

.footer-card-link:hover {
    background: rgba(255,255,255,0.15);
}

@media (min-width: 768px) {
    .footer-content {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding-right: 24px;
    }
    .footer-brand {
        max-width: 40%;
    }
    .footer-links {
        max-width: 50%;
        width: 100%;
    }
}

/* ANIMATIONS (INTERSECTION OBSERVER) */
.reveal-up, .reveal-left, .reveal-right, .reveal-bottom {
    opacity: 0;
    transition: opacity 800ms ease, transform 800ms ease;
    will-change: opacity, transform;
}

.reveal-up { transform: translateY(40px) scale(0.96); }
.reveal-left { transform: translateX(-40px) scale(0.94); }
.reveal-right { transform: translateX(40px) scale(0.94); }
.reveal-bottom { transform: translateY(40px) scale(0.94); }

.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Escalonar animaciones de tarjetas en grid */
.products-grid .is-visible:nth-child(1) { transition-delay: 0ms; }
.products-grid .is-visible:nth-child(2) { transition-delay: 100ms; }
.products-grid .is-visible:nth-child(3) { transition-delay: 200ms; }
.products-grid .is-visible:nth-child(4) { transition-delay: 100ms; }
.products-grid .is-visible:nth-child(5) { transition-delay: 200ms; }
.products-grid .is-visible:nth-child(6) { transition-delay: 300ms; }

@media (max-width: 768px) {
    /* En móvil simplificamos el delay porque es 1 por fila */
    .products-grid .is-visible { transition-delay: 0ms !important; }
}
