/* =============================================
   Persia Clean — Premium Design System
   ============================================= */

/* --- CSS Variables --- */
:root {
    --color-primary: #eebd2b;
    --color-primary-dark: #c99d1e;
    --color-primary-glow: rgba(238, 189, 43, 0.25);
    --color-bg-light: #f8f7f6;
    --color-bg-dark: #221d10;
    --color-bg-dark-deep: #1a1508;
    --color-accent: #d4a855;
    --color-accent-cool: #3d6b7a;
    --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Base --- */
.group:hover .group-hover\:visible { visibility: visible !important; }
.group:hover .group-hover\:opacity-100 { opacity: 1 !important; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Manrope', sans-serif;
    min-height: max(884px, 100dvh);
    overflow-x: hidden;
    position: relative;
    max-width: 100%;
}

.font-serif {
    font-family: 'Playfair Display', Georgia, serif;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- Snap Scroll --- */
.snap-x {
    scroll-snap-type: x mandatory;
}

.snap-center {
    scroll-snap-align: center;
}

/* =============================================
   Scroll Animations
   ============================================= */
[data-animate] {
    opacity: 0;
    transition: opacity 1.2s var(--transition-smooth),
                transform 1.2s var(--transition-smooth);
}

[data-animate="fade-up"] {
    transform: translateY(60px);
}

[data-animate="fade-down"] {
    transform: translateY(-60px);
}

[data-animate="fade-left"] {
    transform: translateX(80px);
}

[data-animate="fade-right"] {
    transform: translateX(-80px);
}

[data-animate="scale-in"] {
    transform: scale(0.95);
}

/* Text Reveal with Mask */
[data-animate="mask-up"] {
    transform: translateY(80px);
}

[data-animate="fade-up"].visible,
[data-animate="fade-down"].visible,
[data-animate="fade-left"].visible,
[data-animate="fade-right"].visible,
[data-animate="scale-in"].visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

[data-animate="mask-up"].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
[data-stagger] > [data-animate]:nth-child(1) { transition-delay: 0.1s; }
[data-stagger] > [data-animate]:nth-child(2) { transition-delay: 0.25s; }
[data-stagger] > [data-animate]:nth-child(3) { transition-delay: 0.4s; }
[data-stagger] > [data-animate]:nth-child(4) { transition-delay: 0.55s; }

/* =============================================
   Textures & Background Effects
   ============================================= */

/* Noise/grain texture overlay */
.texture-grain::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* Radial golden glow */
.glow-gold::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* Geometric pattern */
.texture-geo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23eebd2b' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Diagonal lines pattern */
.texture-lines::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.02;
    background-image: repeating-linear-gradient(
        -45deg,
        var(--color-primary),
        var(--color-primary) 1px,
        transparent 1px,
        transparent 12px
    );
}

/* =============================================
   Keyframe Animations
   ============================================= */

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px var(--color-primary-glow); }
    50% { box-shadow: 0 0 40px var(--color-primary-glow), 0 0 60px rgba(238, 189, 43, 0.1); }
}

@keyframes star-fill {
    0% { font-variation-settings: 'FILL' 0; opacity: 0.3; }
    100% { font-variation-settings: 'FILL' 1; opacity: 1; }
}

@keyframes border-grow {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes fade-in-up {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Component Effects
   ============================================= */

/* Shimmer CTA button */
.btn-shimmer {
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: left 0.6s var(--transition-smooth);
}

.btn-shimmer:hover::after {
    left: 100%;
}

.btn-shimmer:hover {
    box-shadow: 0 8px 30px var(--color-primary-glow),
                0 2px 8px rgba(238, 189, 43, 0.15);
}

/* Card hover bottom border */
.card-premium {
    position: relative;
    transition: all 0.5s var(--transition-smooth);
}

.card-premium::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    transition: width 0.5s var(--transition-smooth);
    border-radius: 2px;
}

.card-premium:hover::after {
    width: 80%;
}

.card-premium:hover {
    transform: translateY(-4px);
    border-color: rgba(238, 189, 43, 0.2);
}

/* Icon circle hover */
.icon-circle {
    transition: all 0.4s var(--transition-bounce);
}

.icon-circle:hover {
    animation: pulse-soft 0.6s ease-in-out;
}

/* Star rating animation */
.star-animate {
    font-variation-settings: 'FILL' 0;
    opacity: 0.3;
}

.star-animate.visible {
    animation: star-fill 0.4s var(--transition-smooth) forwards;
}

.star-animate:nth-child(2).visible { animation-delay: 0.08s; }
.star-animate:nth-child(3).visible { animation-delay: 0.16s; }
.star-animate:nth-child(4).visible { animation-delay: 0.24s; }
.star-animate:nth-child(5).visible { animation-delay: 0.32s; }

/* Floating WhatsApp with glow */
.whatsapp-float {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* =============================================
   Trust Bar — Diagonal Gradient
   ============================================= */
.trust-bar-gradient {
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        #d4a220 40%,
        var(--color-primary) 60%,
        #f0cc4e 100%
    );
}

/* =============================================
   Hero — Multi-stop gradient overlay
   ============================================= */
.hero-gradient {
    background: linear-gradient(
        to right,
        var(--color-bg-dark) 0%,
        rgba(34, 29, 16, 0.95) 20%,
        rgba(34, 29, 16, 0.7) 50%,
        rgba(34, 29, 16, 0.2) 75%,
        transparent 100%
    );
}

/* Hero headline kerning */
.hero-headline {
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.3);
}

/* =============================================
   Mobile Menu
   ============================================= */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(34, 29, 16, 0.97);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.4s var(--transition-smooth),
                transform 0.4s var(--transition-smooth);
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.mobile-menu a {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    transition: color 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s var(--transition-smooth);
}

.mobile-menu.open a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open a:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.10s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.20s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.open a:nth-child(6) { transition-delay: 0.30s; }
.mobile-menu.open a:nth-child(7) { transition-delay: 0.35s; }

.mobile-menu a:hover {
    color: var(--color-primary);
}

/* =============================================
   Testimonial Carousel Controls
   ============================================= */
.carousel-container {
    position: relative;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-bg-dark);
    border: 1px solid rgba(238, 189, 43, 0.2);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.carousel-btn:hover {
    background: var(--color-primary);
    color: var(--color-bg-dark);
    opacity: 1;
    box-shadow: 0 4px 20px var(--color-primary-glow);
}

.carousel-btn.prev { left: -8px; }
.carousel-btn.next { right: -8px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(238, 189, 43, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 4px;
}

/* =============================================
   Scroll Progress Bar
   ============================================= */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), #f0cc4e);
    z-index: 100;
    width: 0%;
    transition: width 0.1s linear;
}

/* =============================================
   Section Divider
   ============================================= */
.section-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
    border-radius: 2px;
}

/* =============================================
   Products Page — Luxury Editorial
   ============================================= */

/* Editorial numbering */
.product-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(180deg, var(--color-primary) 0%, rgba(238, 189, 43, 0.08) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: absolute;
    top: -1.5rem;
    left: -0.5rem;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

/* Product image reveal on hover */
.product-img-editorial {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.product-img-editorial img {
    transition: transform 1s var(--transition-smooth), filter 0.8s ease;
}

.product-img-editorial:hover img {
    transform: scale(1.06);
    filter: brightness(1.08);
}

.product-img-editorial::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(34, 29, 16, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.6s ease;
}

.product-img-editorial:hover::after {
    opacity: 0.4;
}

/* Motorization icon cards */
.motor-icon-card {
    position: relative;
    transition: all 0.5s var(--transition-smooth);
    overflow: hidden;
}

.motor-icon-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, var(--color-primary-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.motor-icon-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(238, 189, 43, 0.15), 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(238, 189, 43, 0.4);
}

.motor-icon-card:hover::before {
    opacity: 1;
}

.motor-icon-card:hover .motor-icon {
    animation: float 2s ease-in-out infinite;
}

/* Glassmorphism CTA */
.cta-glass {
    background: rgba(238, 189, 43, 0.04);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(238, 189, 43, 0.15);
    position: relative;
    overflow: hidden;
}

.cta-glass::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    transition: width 1.2s var(--transition-smooth);
}

.cta-glass:hover::before {
    width: 100%;
}

/* Fabric tags */
.fabric-tag {
    position: relative;
    transition: all 0.4s var(--transition-smooth);
    cursor: default;
}

.fabric-tag:hover {
    background: rgba(238, 189, 43, 0.12) !important;
    border-color: rgba(238, 189, 43, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(238, 189, 43, 0.1);
}

/* Product hero decorative line */
.hero-deco-line {
    width: 1px;
    height: 80px;
    background: linear-gradient(180deg, var(--color-primary) 0%, transparent 100%);
    margin: 2rem auto 0;
    opacity: 0;
    animation: border-grow-v 1s var(--transition-smooth) 0.8s forwards;
}

@keyframes border-grow-v {
    0% { height: 0; opacity: 0; }
    100% { height: 80px; opacity: 0.5; }
}

/* Product section subtle separator */
.product-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--color-primary) 50%, transparent 100%);
    opacity: 0.15;
    max-width: 300px;
    margin: 0 auto;
}

/* Refined link arrow animation */
.link-refined {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.4s var(--transition-smooth);
}

.link-refined::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-primary);
    transition: width 0.4s var(--transition-smooth);
}

.link-refined:hover::after {
    width: 100%;
}

.link-refined:hover .link-arrow {
    transform: translateX(4px);
}

.link-arrow {
    transition: transform 0.4s var(--transition-smooth);
}

/* =============================================
   Gallery — Lightbox Modal
   ============================================= */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10, 8, 4, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--transition-smooth);
}

.gallery-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-lightbox img,
.gallery-lightbox video {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.5s var(--transition-smooth);
}

.gallery-lightbox.active img,
.gallery-lightbox.active video {
    transform: scale(1);
}

.gallery-lightbox .lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(238, 189, 43, 0.1);
    border: 1px solid rgba(238, 189, 43, 0.3);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 210;
}

.gallery-lightbox .lightbox-close:hover {
    background: var(--color-primary);
    color: var(--color-bg-dark);
    transform: rotate(90deg);
}

.gallery-lightbox .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(238, 189, 43, 0.1);
    border: 1px solid rgba(238, 189, 43, 0.2);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 210;
}

.gallery-lightbox .lightbox-nav:hover {
    background: var(--color-primary);
    color: var(--color-bg-dark);
}

.gallery-lightbox .lightbox-prev { left: 1.5rem; }
.gallery-lightbox .lightbox-next { right: 1.5rem; }

.gallery-lightbox .lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    max-width: 600px;
}

.gallery-lightbox .lightbox-caption h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.gallery-lightbox .lightbox-caption p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.gallery-lightbox .lightbox-counter {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Manrope', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* =============================================
   Gallery — Video Card
   ============================================= */
.video-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    cursor: pointer;
    background: #000;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--transition-smooth);
}

.video-card:hover video {
    transform: scale(1.05);
}

.video-card .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 29, 16, 0.3);
    transition: all 0.4s ease;
    z-index: 2;
}

.video-card:hover .play-overlay {
    background: rgba(34, 29, 16, 0.15);
}

.video-card .play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s var(--transition-bounce);
    box-shadow: 0 8px 30px rgba(238, 189, 43, 0.3);
}

.video-card:hover .play-btn {
    transform: scale(1.15);
    box-shadow: 0 12px 40px rgba(238, 189, 43, 0.5);
}

.video-card .video-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1.25rem 1.25rem;
    background: linear-gradient(to top, rgba(34, 29, 16, 0.9) 0%, transparent 100%);
    z-index: 3;
}

/* =============================================
   Gallery — Filter Animations
   ============================================= */
.gallery-item {
    transition: opacity 0.5s var(--transition-smooth),
                transform 0.5s var(--transition-smooth);
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.9);
    position: absolute;
    pointer-events: none;
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
    position: relative;
    pointer-events: auto;
}

.fabric-tag {
    cursor: pointer;
}

.fabric-tag.active {
    background: var(--color-primary) !important;
    color: var(--color-bg-dark) !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 20px rgba(238, 189, 43, 0.3) !important;
}

/* Section header accent */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
}

.section-label::before {
    content: '';
    width: 32px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
}
