/* ═════════════════════════════════════════════════════════════════
   CHETHI BATIK — NEXT LEVEL 3D & ANIMATED LUXURY EXPERIENCE 2026
   WebGL Three.js Cloth Canvas, 3D Gyroscope Tilt, Holographic Sheen
═════════════════════════════════════════════════════════════════ */

:root {
    --gold-foil: linear-gradient(135deg, #d32f2f 0%, #ffffff 25%, #b71c1c 50%, #ffebec 75%, #8e0000 100%);
    --gold-glow-soft: rgba(211, 47, 47, 0.25);
    --gold-glow-strong: rgba(211, 47, 47, 0.6);
    --deep-indigo: #070b14;
    --royal-navy: #0d1527;
    --glass-bg: rgba(18, 22, 34, 0.7);
    --glass-border: rgba(211, 47, 47, 0.3);
}

/* ─── Smooth Momentum Scroll Body Support ─── */
html.lenis {
    height: auto;
}
.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis.lenis-stopped {
    overflow: hidden;
}

/* ═════════════════════════════════════════════════════════════════
   1. HERO 3D INTERACTIVE SILK WAVE
═════════════════════════════════════════════════════════════════ */
.hero-3d-wrapper {
    position: relative;
    width: 100%;
    min-height: 94vh;
    background: radial-gradient(ellipse at 70% 30%, #151d30 0%, #080b12 70%, #030407 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Three.js Silk Canvas */
#heroSilkCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: grab;
    touch-action: none;
}
#heroSilkCanvas:active {
    cursor: grabbing;
}

/* Hero Ambient Lighting & Vignette */
.hero-3d-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(3, 4, 7, 0.85) 90%),
                linear-gradient(to bottom, rgba(5,7,12,0.4) 0%, transparent 20%, transparent 80%, #030407 100%);
    z-index: 2;
    pointer-events: none;
}

/* 3D Gold Particle Canvas Layer */
#heroEmberCanvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.85;
}

/* Hero Content Grid (Left Text, Right 3D Silk Touchpoint) */
.hero-3d-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 7rem 2.5rem 4rem;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
    pointer-events: none; /* Let clicks pass to canvas except for interactive children */
}

.hero-3d-text {
    pointer-events: auto;
}

.hero-3d-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: rgba(211, 47, 47, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: 50px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 1.5rem;
    animation: redPulse 3s infinite alternate;
}

.hero-3d-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 12px var(--gold);
    animation: blinkGlow 1.5s infinite;
}

.hero-3d-badge span {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-light);
}

.hero-3d-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    font-weight: 400;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.hero-3d-title em {
    font-style: italic;
    background: linear-gradient(135deg, #ffffff 10%, #d32f2f 60%, #8e0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

.hero-3d-desc {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.8;
    color: rgba(240, 240, 240, 0.85);
    max-width: 580px;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-3d-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-3d-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.1rem 2.4rem;
    background: linear-gradient(135deg, #d32f2f 0%, #8e0000 100%);
    color: #0b0d14;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.35);
    transition: all 0.35s cubic-bezier(0.2, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}
.btn-3d-gold::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: rotate(25deg);
    transition: left 0.7s ease;
}
.btn-3d-gold:hover::after {
    left: 140%;
}
.btn-3d-gold:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 35px rgba(211, 47, 47, 0.5);
    color: #000;
}

.btn-3d-glass {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.1rem 2.2rem;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.35s ease;
    cursor: pointer;
}
.btn-3d-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--gold);
    color: var(--gold-light);
    transform: translateY(-4px);
}

/* 3D Interactive Floating Cue (Right Side) */
.hero-3d-interactive-card {
    pointer-events: auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.8rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    transform: perspective(1000px) rotateY(-8deg) rotateX(4deg);
    transition: transform 0.5s var(--ease), border-color 0.4s;
    max-width: 440px;
    margin-left: auto;
}
.hero-3d-interactive-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-6px);
    border-color: var(--gold);
}

.card-3d-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.card-3d-badge {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-3d-badge i {
    animation: spinSlow 8s linear infinite;
}

.card-3d-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-3d-selector-title {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Silk Switcher Tabs */
.silk-switcher-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 1.4rem;
}
.silk-pill-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.65rem 0.4rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.silk-pill-btn:hover {
    background: rgba(211, 47, 47, 0.15);
    border-color: var(--gold);
    color: var(--gold-light);
}
.silk-pill-btn.active {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.25), rgba(170, 119, 28, 0.4));
    border-color: var(--gold);
    color: #fff;
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.3);
}

.card-3d-touch-prompt {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px dashed rgba(211, 47, 47, 0.4);
}
.touch-icon-pulse {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(211, 47, 47, 0.15);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    animation: handWave 2s infinite ease-in-out;
}
.card-3d-touch-prompt p {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.4;
}

/* ═════════════════════════════════════════════════════════════════
   2. 3D PRODUCT CARDS — HOLOGRAPHIC TILT & GOLD GLARE
═════════════════════════════════════════════════════════════════ */
.product-card-link-wrap {
    perspective: 1200px;
    transform-style: preserve-3d;
}

.product-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

/* Holographic Gold Foil Glare Layer */
.product-card-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.28) 0%, rgba(211, 47, 47, 0.12) 35%, transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
    mix-blend-mode: overlay;
}
.product-card:hover .product-card-glare {
    opacity: 1;
}

/* 3D Depth Layer Elevation */
.product-card:hover {
    border-color: rgba(211, 47, 47, 0.6) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 25px rgba(211, 47, 47, 0.2) !important;
}

.product-card .product-label {
    transform: translateZ(28px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.product-card .product-wish {
    transform: translateZ(32px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.product-card .product-info {
    transform: translateZ(20px);
}

.product-card .btn-quick-view {
    transform: translateX(-50%) translateZ(36px);
}

/* ═════════════════════════════════════════════════════════════════
   5. KEYFRAME ANIMATIONS
═════════════════════════════════════════════════════════════════ */
@keyframes redPulse {
    0% { box-shadow: 0 0 10px rgba(211, 47, 47, 0.1); }
    100% { box-shadow: 0 0 25px rgba(211, 47, 47, 0.4); }
}

@keyframes blinkGlow {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes handWave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* ═════════════════════════════════════════════════════════════════
   6. RESPONSIVE DESIGN (MOBILE & TABLET)
═════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero-3d-container {
        grid-template-columns: 1fr;
        padding-top: 6rem;
        text-align: center;
    }
    .hero-3d-desc {
        margin: 0 auto 2.5rem;
    }
    .hero-3d-actions {
        justify-content: center;
    }
    .hero-3d-interactive-card {
        margin: 0 auto;
        transform: none;
    }
}

@media (max-width: 640px) {
    .hero-3d-title {
        font-size: 2.4rem;
    }
    .btn-3d-gold, .btn-3d-glass {
        width: 100%;
        justify-content: center;
    }
}
