/* ============================================================================
   LUPONCIO - HOME PAGE STYLES (SNAP SCROLL)
   ============================================================================ */

/* Reset & Base for Home */
html.lpn-home,
.lpn-home body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Root Vertical Scroll Container */
.lpn-snap-root {
    height: 100dvh;
    /* Dynamic viewport height for mobile bars */
    width: 100%;
    overflow-y: scroll;
    /* Force explicit scroll */
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
    /* Prevent pull-to-refresh interference */
}

/* Product Section */
.lpn-product {
    position: relative;
    height: 100dvh;
    min-height: 100dvh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    /* Force stop at each section */
    overflow: hidden;
}

/* Legibility Gradient */
.lpn-product::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    pointer-events: none;
    z-index: 5;
}

/* Horizontal Rail */
.lpn-rail {
    display: flex;
    height: 100dvh;
    min-height: 100dvh;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
}

.lpn-rail::-webkit-scrollbar {
    display: none;
}

/* Slides - Common */
.lpn-slide {
    height: 100%;
    min-height: 100dvh;
    scroll-snap-align: center !important;
    /* Center alignment is safer for horizontal */
    scroll-snap-stop: always !important;
    /* Force stop at each item (no skipping) */
    box-sizing: border-box;
    background: #fff;
    flex-shrink: 0;
}

/* Images */
.lpn-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tablet Layout (2 Items per view) */
@media (min-width: 769px) and (max-width: 1024px) {
    .lpn-slide {
        width: 50vw;
        padding-right: 16px;
    }
}

/* Desktop Layout (3 Items per view) */
@media (min-width: 1025px) {
    .lpn-slide {
        width: 33.3333vw;
        padding-right: 16px;
    }
}

/* UI Elements bottom - Preserved */
/* Header styles moved to includes/header.php */

.lpn-ui-bottom-left {
    position: absolute;
    bottom: 32px;
    left: 32px;
    z-index: 10;
    pointer-events: none;
}

.lpn-ui-bottom-left span {
    color: #fff !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lpn-ui-bottom-center {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 24px;
}

.lpn-btn {
    text-decoration: none;
    color: #fff !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lpn-btn:hover {
    border-color: #fff !important;
}

/* Navigation Arrows */
.lpn-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 20;
    opacity: 0.8;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lpn-nav-arrow svg {
    display: block;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    stroke: #fff !important;
    fill: none !important;
    stroke-width: 1.5;
    z-index: 2;
}

.lpn-nav-arrow:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.lpn-prev {
    left: 24px;
}

.lpn-next {
    right: 24px;
}

.lpn-up {
    top: 85px;
    /* Clears top header/logo */
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
}

.lpn-down {
    top: auto;
    bottom: 85px;
    /* Clears bottom CTA */
    left: 50%;
    transform: translateX(-50%);
}

@media (prefers-reduced-motion: no-preference) {
    .lpn-prev:hover {
        transform: translateY(-50%) translateX(-2px) scale(1.05);
    }

    .lpn-next:hover {
        transform: translateY(-50%) translateX(2px) scale(1.05);
    }

    .lpn-up:hover {
        transform: translateX(-50%) translateY(-5px) scale(1.05);
    }

    .lpn-down:hover {
        transform: translateX(-50%) translateY(5px) scale(1.05);
    }
}

/* Accessibility Focus */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 4px;
}

/* Mobile Menu Overlay & Toggle (Base) */
/* Cleaned up redundant toggle definition */

.lpn-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff !important;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.lpn-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lpn-mobile-menu a {
    color: #fff !important;
    font-size: 32px;
    font-weight: 700;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* Open State */
.lpn-mobile-menu.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lpn-mobile-menu.is-open a {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for links */
.lpn-mobile-menu.is-open a:nth-child(1) {
    transition-delay: 0.1s;
}

.lpn-mobile-menu.is-open a:nth-child(2) {
    transition-delay: 0.2s;
}

.lpn-mobile-menu.is-open a:nth-child(3) {
    transition-delay: 0.3s;
}

.lpn-mobile-menu.is-open a:nth-child(4) {
    transition-delay: 0.4s;
}

.lpn-mobile-menu.is-open a:nth-child(5) {
    transition-delay: 0.5s;
}

/* Hamburger Interaction */
.lpn-mobile-toggle.is-open .lpn-bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.lpn-mobile-toggle.is-open .lpn-bar:nth-child(2) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .lpn-scroll-indicator {
        bottom: 40px;
        opacity: 0.6;
    }
}

/* ============================================================================
   RESPONSIVE DESIGN SYSTEM (DESKTOP & MOBILE UI)
   ============================================================================ */

/* Mobile UI Design (Buttons at Top, Elegant Thin Styles) */
@media (max-width: 1024px) {
    .lpn-logo {
        top: 16px;
        left: 16px;
        font-size: 20px;
    }

    .lpn-ui-top-right {
        top: 16px;
        right: 16px;
        gap: 16px;
    }

    .lpn-ui-bottom-left {
        width: 100%;
        left: 0;
        top: 75px;
        bottom: auto;
        text-align: center;
        z-index: 20;
    }

    .lpn-ui-bottom-left span {
        font-size: 24px;
        font-weight: 300;
        letter-spacing: 0.15em;
    }

    .lpn-ui-bottom-center {
        width: 100%;
        left: 0;
        top: 130px;
        bottom: auto;
        transform: none;
        display: flex;
        justify-content: center;
        gap: 12px;
        z-index: 20;
    }

    .lpn-btn {
        font-size: 11px;
        padding: 10px 22px;
        border-radius: 40px;
        border: 1px solid rgba(255, 255, 255, 0.4);
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        text-shadow: none;
        letter-spacing: 0.1em;
    }

    .lpn-btn:first-child {
        background: rgba(255, 255, 255, 0.9);
        color: #000 !important;
        border-color: #fff;
    }

    .lpn-product::after {
        top: 0;
        bottom: auto;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
        height: 35%;
    }

    .lpn-desktop-menu {
        display: none !important;
    }

    .lpn-mobile-actions {
        display: flex;
        top: 16px;
        right: 16px;
    }

    .lpn-mobile-toggle {
        display: flex;
        width: 38px;
        height: 38px;
    }

    .lpn-mobile-toggle .lpn-bar {
        width: 18px;
    }
}

/* ============================================================================
   RESPONSIVE LAYOUT & UI SYSTEM
   ============================================================================ */

/* Tablet Layout (2 Items per view) */
@media (min-width: 769px) and (max-width: 1024px) {
    .lpn-slide {
        width: 50vw;
        padding-right: 16px;
    }
}

/* Desktop Layout (3 Items per view) */
@media (min-width: 1025px) {
    .lpn-slide {
        width: 33.3333vw;
        padding-right: 16px;
    }
}

/* Base Desktop UI (Applies to Tablet & Desktop > 768px) */
@media (min-width: 769px) {
    .lpn-product::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 300px;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
        z-index: 5;
        pointer-events: none;
    }

    .lpn-ui-bottom-left {
        width: 100%;
        left: 0;
        top: 80px;
        bottom: auto;
        text-align: center;
        z-index: 20;
    }

    .lpn-ui-bottom-left span {
        font-size: 32px;
        font-weight: 300;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .lpn-ui-bottom-center {
        width: 100%;
        left: 0;
        top: 145px;
        bottom: auto;
        transform: none;
        display: flex;
        justify-content: center;
        gap: 20px;
        z-index: 20;
    }

    .lpn-btn {
        font-size: 12px;
        padding: 12px 28px;
        border-radius: 40px;
        border: 1px solid rgba(255, 255, 255, 0.5);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        text-shadow: none;
        letter-spacing: 0.15em;
        transition: all 0.4s ease;
    }

    .lpn-btn:first-child {
        background: rgba(255, 255, 255, 0.95);
        color: #000 !important;
        border-color: #fff;
    }

    .lpn-btn:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.2);
        border-color: #fff;
    }

    .lpn-btn:first-child:hover {
        background: #fff;
        transform: translateY(-2px);
    }
}

/* Mobile Layout & UI (< 768px) */
@media (max-width: 768px) {

    /* Critical: Set slide width to full viewport for mobile loop */
    .lpn-slide {
        width: 100vw;
        padding: 0;
    }

    .lpn-logo {
        top: 16px;
        left: 16px;
        font-size: 20px;
    }

    .lpn-ui-top-right a,
    .lpn-ui-bottom-left span,
    .lpn-btn {
        font-size: 16px;
        line-height: 18px;
    }

    .lpn-nav-arrow {
        width: 40px;
        height: 40px;
        padding: 10px;
    }

    .lpn-prev {
        left: 16px;
    }

    .lpn-next {
        right: 16px;
    }

    .lpn-ui-top-right {
        top: 16px;
        right: 16px;
        gap: 16px;
    }

    .lpn-ui-bottom-left {
        width: 100% !important;
        left: 0 !important;
        top: 85px !important;
        bottom: auto !important;
        text-align: center;
        padding-bottom: 0;
        z-index: 20;
    }

    .lpn-ui-bottom-left span {
        font-size: 28px;
        font-weight: 300;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        display: block;
        padding: 0 20px;
    }

    .lpn-ui-bottom-center {
        width: 100% !important;
        left: 0 !important;
        top: 145px !important;
        bottom: auto !important;
        transform: none !important;
        padding-bottom: 0;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        z-index: 20;
    }

    .lpn-btn {
        font-size: 13px;
        padding: 12px 24px;
        border-radius: 40px;
        border: 1px solid rgba(255, 255, 255, 0.4);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: all 0.3s ease;
        text-shadow: none;
        letter-spacing: 0.1em;
        border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    }

    .lpn-btn:first-child {
        background: #fff;
        color: #000 !important;
        border-color: #fff;
    }

    .lpn-btn:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.2);
    }

    .lpn-product::after {
        top: 0;
        bottom: auto;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 30%, rgba(0, 0, 0, 0) 100%);
        height: 40%;
    }

    /* Hide Desktop Menu */
    .lpn-desktop-menu {
        display: none !important;
    }

    /* Show Toggle & Actions */
    .lpn-mobile-actions {
        display: flex;
    }

    .lpn-mobile-toggle {
        display: flex;
    }
}