/* ==========================================================================
   ESTILOS LANDING PAGE (DISEÑO CINEMATOGRÁFICO Y MINIMALISTA)
   ========================================================================== */

:root {
    --color-bg: #FAFAFA;
    --color-text: #1a1a1a;
    --color-muted: #666;
    --color-primary: #E31837; /* Rojo de Neumática Rotonda */
    --color-primary-dark: #C41230;
    --color-dark: #121212;
    --color-surface: #ffffff;
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-secondary);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Tipografía */
h1, h2, h3, h4, .l-hero__brand {
    font-family: var(--font-primary);
    line-height: 1.1;
    margin-top: 0;
}

.text-center { text-align: center; }
.text-white { color: #fff; }
.bg-dark { background-color: var(--color-dark); color: #fff; }
.bg-light { background-color: #f0f0f0; }

.l-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.l-section {
    padding: var(--spacing-xl) 0;
}

.l-section__title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: var(--spacing-lg);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Navegación Glassmorphism */
.l-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: var(--transition-fast);
    padding: var(--spacing-sm) 0;
}

.l-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
}

.l-nav__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.l-nav__logo img {
    height: 70px;
    width: auto;
    transition: var(--transition-fast);
}
.l-nav.is-scrolled .l-nav__logo img {
    filter: brightness(0); /* Forzar negro en fondo claro */
}
/* Por defecto, si el hero es oscuro, logo en blanco (asumimos hero claro o con gradiente oscuro en nav) */

.l-nav__links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.l-share {
    position: relative;
}

.l-share__button {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d7dde5;
    border-radius: 50%;
    background: #fff;
    color: #003b6f;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.l-share__button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.l-share__button:hover,
.l-share__button:focus-visible,
.l-share__button[aria-expanded="true"] {
    border-color: #003b6f;
    background: #f4f8fc;
    box-shadow: 0 0 0 3px rgba(0, 59, 111, 0.12);
    outline: 0;
}

.l-share__menu {
    position: absolute;
    z-index: 110;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    width: min(290px, calc(100vw - 32px));
    padding: 7px;
    border: 1px solid #d7dde5;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(17, 24, 39, 0.2);
}

.l-share__menu.is-open {
    display: grid;
    gap: 2px;
}

.l-share__option {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    padding: 9px 11px;
    border: 0;
    border-radius: 3px;
    background: #fff;
    color: var(--color-text);
    font: inherit;
    font-size: 0.84rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.l-share__option:hover,
.l-share__option:focus-visible {
    background: #eef5fb;
    color: #003b6f;
    outline: 0;
}

.l-share__status {
    position: absolute;
    top: 48px;
    right: 0;
    width: max-content;
    max-width: 240px;
    color: #18763b;
    font-size: 0.78rem;
    font-weight: 700;
}

.l-nav__link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
}

.l-nav__link:hover {
    color: var(--color-primary);
}

.l-nav__link--primary {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    color: var(--color-primary);
}
.l-nav__link--primary:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* Hero Section Cinematográfico */
.l-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--color-bg);
}

.l-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 0;
}

.l-hero__content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(var(--spacing-xl) + 40px) var(--spacing-md) var(--spacing-xl);

    display: grid;

    /* Columna izquierda para texto y derecha para imagen */
    grid-template-columns: minmax(0, 1fr) minmax(500px, 48%);

    gap: 4rem;
    align-items: center;
}

.l-hero__text {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}


.l-hero__brand {
    display: inline-block;
    background: var(--color-dark);
    color: #fff;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-sm);
    border-radius: 2px;
}

.l-hero__title {
    font-size: clamp(2rem, 4vw, 3.8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;

    margin-bottom: var(--spacing-sm);

    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

.l-hero__meta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--color-muted);
}

.l-hero__desc {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    color: #444;
}

.l-hero__actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.l-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition-fast);
    cursor: pointer;
}

.l-btn--whatsapp {
    background-color: #25D366;
    color: #fff;
    border: none;
}
.l-btn--whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.l-btn--outline {
    background-color: transparent;
    color: var(--color-dark);
    border: 2px solid var(--color-dark);
}
.l-btn--outline:hover {
    background-color: var(--color-dark);
    color: #fff;
}

.l-hero__price {
    display: flex;
    flex-direction: column;
}
.l-hero__price-val {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}
.l-hero__stock {
    font-size: 0.85rem;
    color: #18763b;
    font-weight: 600;
}

.l-hero__media {
    position: relative;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.l-hero__image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect ratio */
}

.l-hero__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
    transition: transform var(--transition-slow);
}

.l-hero__image:hover {
    transform: scale(1.05);
}

/* Indicador de scroll */
.l-hero__scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-muted);
    opacity: 0.8;
}

.l-hero__mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--color-muted);
    border-radius: 12px;
    position: relative;
}
.l-hero__mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--color-muted);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 12px); opacity: 0; }
}

/* Narrativa */
.l-narrative__grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.l-rich-text {
    font-size: 1.1rem;
    color: #444;
}

.l-rich-text h2, .l-rich-text h3 {
    color: var(--color-dark);
    margin-top: 2rem;
}

.l-rich-text ul {
    padding-left: 1.5rem;
}

.l-rich-text li {
    margin-bottom: 0.5rem;
}

.l-card {
    background: #fff;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.05);
}

.l-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

/* Specs */
.l-specs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background-color: #ddd;
    border: 1px solid #ddd;
}

.l-specs__item {
    background-color: #fff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-fast);
}

.l-specs__item:hover {
    background-color: #fdfdfd;
}

.l-specs__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
    margin-bottom: 0.25rem;
}

.l-specs__value {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-dark);
}

/* Galería */
.l-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.l-gallery__item {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    cursor: zoom-in;
}

.l-gallery__item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform var(--transition-slow);
}

.l-gallery__item:hover img {
    transform: scale(1.1);
}

/* Docs */
.l-docs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-sm);
}

.l-docs__card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: var(--transition-fast);
}

.l-docs__card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.2);
}

.l-docs__icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.l-docs__badge {
    display: block;
    font-size: 0.7rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.l-docs__title {
    font-weight: 600;
}

/* Related */
.l-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.l-related__card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: var(--transition-fast);
    border: 1px solid rgba(0,0,0,0.03);
}

.l-related__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.l-related__media {
    height: 240px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f0f0f0;
}

.l-related__media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

.l-related__card:hover .l-related__media img {
    transform: scale(1.08);
}

.l-related__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.l-related__brand {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.l-related__title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.l-related__code {
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* Footer */
.l-footer {
    background-color: var(--color-dark);
    color: rgba(255,255,255,0.7);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.l-footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.l-footer__brand p {
    margin-top: 1rem;
}

.l-footer__links {
    display: flex;
    gap: 1.5rem;
}

.l-footer__links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.l-footer__links a:hover {
    color: var(--color-primary);
}

.l-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.85rem;
}

/* Lightbox */
.l-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.l-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.l-lightbox__img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform var(--transition-fast);
}

.l-lightbox.is-open .l-lightbox__img {
    transform: scale(1);
}

.l-lightbox__close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* Animaciones y utilidades (Intersection Observer) */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-zoom {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive */
@media (max-width: 992px) {
    .l-hero__content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 100px;
    }
    
    .l-hero__text {
        margin: 0 auto;
    }
    
    .l-hero__meta {
        justify-content: center;
    }
    
    .l-hero__actions {
        justify-content: center;
    }
    
    .l-narrative__grid {
        grid-template-columns: 1fr;
    }
    
    .l-footer__content {
        flex-direction: column;
        text-align: center;
    }
    
    .l-footer__links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .l-section {
        padding: var(--spacing-lg) 0;
    }
    
    .l-hero__title {
        font-size: 2.5rem;
    }
    
    .l-nav__links {
        display: none; /* Simplificamos en móvil, se podría añadir un menu hamburguesa, pero mantenemos limpio para landing */
    }
    
    .l-specs__grid {
        grid-template-columns: 1fr;
    }
}

/* Accesibilidad y Preferencias de usuario */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal-up, .reveal-left, .reveal-right, .reveal-zoom {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.l-btn:focus-visible, .l-nav__link:focus-visible, a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

/* ========================================================================== 
   OPTIMIZACIÓN DE PERFORMANCE, SCROLL Y ESTABILIDAD VISUAL
   ========================================================================== */

html {
    scrollbar-color: var(--color-primary) #1a1a1a;
    scrollbar-width: thin;
}

html::-webkit-scrollbar {
    width: 12px;
}

html::-webkit-scrollbar-track {
    background: #1a1a1a;
}

html::-webkit-scrollbar-thumb {
    min-height: 48px;
    background: var(--color-primary);
    border: 3px solid #1a1a1a;
    border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover {
    background: #ff2144;
    box-shadow: 0 0 10px rgba(227, 24, 55, 0.65);
}

img,
video,
iframe {
    max-width: 100%;
}

img {
    height: auto;
}

.l-hero__image-wrapper,
.l-gallery__item {
    aspect-ratio: 1 / 1;
    padding-bottom: 0;
}

.l-related__media {
    aspect-ratio: 4 / 3;
    height: auto;
}

.l-hero__image,
.l-gallery__item img {
    contain: layout paint;
}

.l-section:not(.l-narrative),
.l-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

.l-nav {
    will-change: padding, background-color, box-shadow;
}

.l-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.94);
}

.reveal-up,
.reveal-left,
.reveal-right,
.reveal-zoom {
    will-change: opacity, transform;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.is-revealed {
    will-change: auto;
}

.js-disabled .reveal-up,
.js-disabled .reveal-left,
.js-disabled .reveal-right,
.js-disabled .reveal-zoom {
    opacity: 1;
    transform: none;
}

@media (max-width: 992px) {
    .l-hero__image-wrapper {
        max-width: 680px;
        margin-inline: auto;
    }
}

@media (max-width: 768px) {
    html::-webkit-scrollbar {
        width: 8px;
    }

    .l-hero {
        min-height: 100svh;
    }

    .l-hero__content {
        gap: 2rem;
    }

    .l-hero__scroll-indicator {
        display: none;
    }
}

@media (prefers-reduced-data: reduce) {
    .l-hero__image,
    .l-gallery__item img,
    .l-related__media img {
        filter: none;
    }
}

body.is-lightbox-open { overflow: hidden; }
