/* ==========================================================================
   NIISAKU CINEMATIC LUXURY (frontend3) — Style & Keyframe Engine
   Balanced Color Palette:
   - Deep Navy Blue: #142B46 (Header, Footer, Hero, Navigation & Key Sections)
   - Warm White:     #F8F6F1 (Main Surface & Product Collections)
   - Natural Beige:  #D8C5A2 (Subtle Backgrounds, Visual Accents & Borders)
   - Muted Gold:     #B99A62 (Subtle Accents, Highlights & Details)
   ========================================================================== */

:root {
    /* Primary Brand: Deep Navy Blue */
    --navy-main: #142B46;
    --navy-deep: #0D1E32;
    --navy-surface: #1B3657;
    --navy-card: rgba(20, 43, 70, 0.85);

    /* Main Background & Surfaces: Warm White */
    --warm-white: #F8F6F1;
    --pure-white: #FFFFFF;

    /* Secondary Neutral: Natural Beige */
    --natural-beige: #D8C5A2;
    --beige-light: #F4EFE6;
    --beige-subtle: #EAE1D2;
    --beige-dark: #C2AE88;

    /* Subtle Accent: Muted Gold */
    --muted-gold: #B99A62;
    --muted-gold-light: #D6BD8A;
    --muted-gold-dark: #91753C;

    /* Legacy compatibility variables mapped to new palette */
    --bg-dark: #142B46;
    --bg-surface: #0D1E32;
    --bg-card: rgba(20, 43, 70, 0.85);
    --gold: #B99A62;
    --gold-light: #D6BD8A;
    --gold-dark: #91753C;
    --ruby: #C4262E;
    --paper: #F8F6F1;
    --muted: #5F7184;
    --border-subtle: rgba(216, 197, 162, 0.35);
    --border-glow: rgba(185, 154, 98, 0.5);

    /* Text on Light Surfaces */
    --text-navy: #142B46;
    --text-charcoal: #233446;
    --text-charcoal-muted: #5F7184;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    background-color: var(--warm-white);
    color: var(--text-charcoal);
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--navy-deep);
}

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

/* Custom Adaptive Cursor (Desktop) */
@media (pointer: fine) {
    body {
        cursor: default;
    }

    .custom-cursor-dot {
        position: fixed;
        width: 8px;
        height: 8px;
        background-color: var(--muted-gold);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: transform 0.08s ease-out, opacity 0.2s ease;
        mix-blend-mode: difference;
    }

    .custom-cursor-ring {
        position: fixed;
        width: 38px;
        height: 38px;
        border: 1px solid var(--muted-gold);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, transform 0.15s ease-out;
        mix-blend-mode: difference;
    }

    body.hovering .custom-cursor-ring {
        width: 58px;
        height: 58px;
        border-color: var(--muted-gold-light);
        background: rgba(185, 154, 98, 0.15);
    }
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
.font-serif {
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: -0.02em;
}

.font-mono {
    font-family: 'Outfit', monospace, sans-serif !important;
    letter-spacing: 0.22em;
}

/* Muted Gold Gradient Text */
.gold-gradient-text {
    background: linear-gradient(135deg, #F5E8CE 0%, #B99A62 50%, #91753C 90%, #D6BD8A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gold-gradient-border {
    border-image: linear-gradient(135deg, #B99A62, #D6BD8A, #91753C) 1;
}

/* Deep Navy Glassmorphism */
.glass-panel {
    background: rgba(20, 43, 70, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(216, 197, 162, 0.3);
}

.glass-panel-hover {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel-hover:hover {
    border-color: rgba(185, 154, 98, 0.65);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -15px rgba(13, 30, 50, 0.4);
}

/* Light Luxury Product Card */
.light-product-card {
    background: var(--pure-white);
    border: 1px solid rgba(216, 197, 162, 0.6);
    border-radius: 1.25rem;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px -2px rgba(20, 43, 70, 0.05);
}

.light-product-card:hover {
    transform: translateY(-6px);
    border-color: var(--muted-gold);
    box-shadow: 0 20px 40px -10px rgba(20, 43, 70, 0.12);
}

/* Canvas Background for Ambient Sparkles & Stardust */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.95;
}

/* Atmospheric Glow Orb */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    pointer-events: none;
    opacity: 0.35;
    animation: orbPulse 12s ease-in-out infinite alternate;
}

@keyframes orbPulse {
    0% {
        transform: scale(0.9) translate(0, 0);
        opacity: 0.25;
    }

    50% {
        transform: scale(1.15) translate(4%, -3%);
        opacity: 0.45;
    }

    100% {
        transform: scale(0.95) translate(-3%, 4%);
        opacity: 0.3;
    }
}

/* Luxury Muted Gold Button */
.btn-gold-luxury {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.95rem 2.25rem;
    color: var(--navy-main);
    background: linear-gradient(135deg, #D6BD8A 0%, #B99A62 50%, #9F8048 100%);
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 18px rgba(185, 154, 98, 0.3);
    z-index: 1;
    border-radius: 9999px;
}

.btn-gold-luxury::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-gold-luxury:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(185, 154, 98, 0.48);
}

.btn-gold-luxury:hover::before {
    opacity: 0.22;
}

/* Deep Navy Luxury Button */
.btn-navy-luxury {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.95rem 2.25rem;
    color: var(--warm-white);
    background: var(--navy-main);
    border: 1px solid rgba(185, 154, 98, 0.4);
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 18px rgba(20, 43, 70, 0.25);
    z-index: 1;
    border-radius: 9999px;
}

.btn-navy-luxury:hover {
    background: var(--navy-deep);
    border-color: var(--muted-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(20, 43, 70, 0.35);
}

/* Outline Luxury Button */
.btn-outline-luxury {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.95rem 2.25rem;
    color: var(--warm-white);
    border: 1px solid rgba(216, 197, 162, 0.5);
    background: rgba(20, 43, 70, 0.4);
    backdrop-filter: blur(8px);
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
    border-radius: 9999px;
}

.btn-outline-luxury::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--muted-gold);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.btn-outline-luxury:hover {
    color: var(--navy-main);
    border-color: var(--muted-gold);
    transform: translateY(-2px);
}

.btn-outline-luxury:hover::before {
    transform: translateY(0%);
}

/* Light Card Button */
.btn-light-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--warm-white);
    color: var(--navy-main);
    border: 1px solid rgba(216, 197, 162, 0.8);
    border-radius: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    transition: all 0.3s ease;
}

.btn-light-card:hover {
    background: var(--navy-main);
    color: var(--warm-white);
    border-color: var(--navy-main);
}

/* Image 3D Tilt Card */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out, box-shadow 0.3s ease;
    will-change: transform;
}

/* Slider Track Infinite */
@keyframes infiniteMarquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-stream {
    display: flex;
    width: max-content;
    animation: infiniteMarquee 36s linear infinite;
}

.marquee-stream:hover {
    animation-play-state: paused;
}

/* Magnetic Interaction */
.magnetic-btn {
    display: inline-block;
    transition: transform 0.2s ease-out;
}

/* Ruby Pulse Light */
.ruby-pulse {
    position: relative;
}

.ruby-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--ruby);
    opacity: 0.7;
    animation: pingDot 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    z-index: -1;
}

@keyframes pingDot {

    75%,
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* ==========================================================================
   HERO FULLSCREEN FLICKITY CAROUSEL (Inspired by Meritus Infras)
   ========================================================================== */

.landing_carousel {
    height: 92vh;
    height: 92dvh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
    background-color: var(--navy-deep);
}

.hero-slider,
.hero-slider .flickity-viewport,
.hero-slider .flickity-slider {
    width: 100%;
    height: 100% !important;
}

.hero-slider .carousel-cell {
    width: 100%;
    height: 100% !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-slider .carousel-cell .overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 35% 45%, rgba(13, 30, 50, 0.42) 0%, rgb(0 0 0 / 0.05) 60%, rgb(0 0 0 / 0.25) 100%), linear-gradient(to top, rgb(59 130 246 / 0.5) 0%, rgba(13, 30, 50, 0.35) 40%, rgb(0 0 0 / 0.25) 100%);
    /* background: radial-gradient(circle at 35% 45%, rgba(13, 30, 50, 0.42) 0%, rgba(13, 30, 50, 0.78) 60%, #0D1E32 100%),
                linear-gradient(to top, #0D1E32 0%, rgba(13, 30, 50, 0.35) 40%, rgba(13, 30, 50, 0.75) 100%); */
    pointer-events: none;
    z-index: 1;
}

.hero-slider .carousel-cell .inner {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-slider .carousel-cell .inner .hero-slide-content {
    opacity: 0.25;
    transform: translateY(16px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slider .carousel-cell.is-selected .inner .hero-slide-content {
    opacity: 1;
    transform: translateY(0);
}

/* Flickity Navigation Arrows */
.flickity-prev-next-button {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(20, 43, 70, 0.75) !important;
    border: 1px solid rgba(185, 154, 98, 0.45) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    z-index: 25;
}

.flickity-prev-next-button:hover {
    background: #B99A62 !important;
    border-color: #B99A62 !important;
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(185, 154, 98, 0.4);
}

.flickity-prev-next-button .flickity-button-icon {
    fill: #B99A62;
    transition: fill 0.3s ease;
}

.flickity-prev-next-button:hover .flickity-button-icon {
    fill: #142B46;
}

.flickity-prev-next-button.previous {
    left: 1.5rem;
}

.flickity-prev-next-button.next {
    right: 1.5rem;
}

@media (max-width: 640px) {
    .flickity-prev-next-button {
        width: 38px;
        height: 38px;
    }

    .flickity-prev-next-button.previous {
        left: 0.35rem;
    }

    .flickity-prev-next-button.next {
        right: 0.35rem;
    }
}

/* Flickity Page Dots */
.flickity-page-dots {
    bottom: 2rem;
    z-index: 25;
}

.flickity-page-dots .dot {
    width: 22px;
    height: 4px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.28);
    margin: 0 4px;
    transition: all 0.4s ease;
    opacity: 1;
}

.flickity-page-dots .dot.is-selected {
    width: 48px;
    background: #B99A62;
}

/* Hero Bottom Overlays */
.hero-bottom-info {
    position: absolute;
    bottom: 2rem;
    left: 2.5rem;
    z-index: 25;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    right: 2.5rem;
    z-index: 25;
}

@media (max-width: 1024px) {

    .hero-bottom-info,
    .hero-scroll-hint {
        display: none !important;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVE NAVIGATION DRAWER & TOUCH OPTIMIZATIONS
   ========================================================================== */

/* Mobile Nav Drawer Backdrop */
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13, 30, 50, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.mobile-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Nav Drawer Panel */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 86%;
    max-width: 380px;
    height: 100%;
    height: 100dvh;
    background: #142B46;
    background: linear-gradient(180deg, #142B46 0%, #0D1E32 100%);
    border-left: 1px solid rgba(185, 154, 98, 0.3);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-drawer.is-open {
    transform: translateX(0);
}

/* Lock body scrolling when mobile nav is open */
body.mobile-nav-open {
    overflow: hidden !important;
    touch-action: none;
}

/* Touch & Mobile Screen Enhancements */
@media (max-width: 1024px) {

    .custom-cursor-dot,
    .custom-cursor-ring {
        display: none !important;
    }

    .tilt-card {
        transform: none !important;
    }
}

@media (max-width: 768px) {

    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    #site-header {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 0.75rem !important;
    }

    .floating-whatsapp-btn {
        bottom: 1.25rem !important;
        right: 1.25rem !important;
        padding: 0.7rem !important;
    }

    .marquee-stream {
        animation-duration: 26s;
    }

    .glow-orb {
        opacity: 0.2;
        filter: blur(60px);
    }

    .btn-gold-luxury,
    .btn-navy-luxury,
    .btn-outline-luxury {
        min-height: 44px;
        padding: 0.75rem 1.4rem;
    }
}

@media (max-width: 480px) {
    .hero-flooring-bg {
        width: 130%;
        height: 130%;
    }

    .btn-gold-luxury,
    .btn-navy-luxury,
    .btn-outline-luxury {
        width: 100%;
        justify-content: center;
        letter-spacing: 0.15em;
    }

    .glass-panel {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* ==========================================================================
   PRODUCT DETAIL HERO SLIDER
   ========================================================================== */
.product-hero-slider {
    position: relative;
    width: 100%;
    height: 68vh;
    min-height: 480px;
    max-height: 720px;
    overflow: hidden;
    background-color: var(--navy-deep);
}

.product-hero-slider .flickity-viewport,
.product-hero-slider .flickity-slider {
    width: 100%;
    height: 100% !important;
}

.product-hero-slider .carousel-cell {
    width: 100%;
    height: 100% !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    position: relative;
}

.product-hero-slider .carousel-cell .overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 40% 40%, rgba(13, 30, 50, 0.25) 0%, rgba(13, 30, 50, 0.65) 60%, rgba(13, 30, 50, 0.92) 100%),
                linear-gradient(to top, #142B46 0%, rgba(20, 43, 70, 0.45) 30%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 768px) {
    .product-hero-slider {
        height: 56vh;
        min-height: 400px;
    }
}