/* The MN Studio — Premium Jewelry Design System */

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

:root {
    /* Colors - Luxury Palette */
    --gold: #C9A961;
    --gold-dark: #B8954A;
    --gold-light: #D4BA7A;
    --black: #0A0A0A;
    --white: #FFFFFF;
    --cream: #FAF8F3;
    --gray: #6B6B6B;
    --gray-light: #E5E5E5;
    --gray-dark: #4A4A4A;
    --error: #C00000;

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Montserrat', -apple-system, sans-serif;

    /* Font Sizes */
    --text-xs: 0.65rem;
    --text-sm: 0.75rem;
    --text-base: 0.875rem;
    --text-md: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;

    /* Border Radius */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-fixed: 1000;
    --z-modal-backdrop: 9000;
    --z-modal: 9999;
    --z-tooltip: 10000;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 0.15s;
    --duration-base: 0.3s;
    --duration-slow: 0.6s;

    /* Opacity */
    --opacity-hover: 0.7;
    --opacity-disabled: 0.5;
    --opacity-overlay: 0.95;

    /* Banner (notification bar) */
    --banner-bg: var(--black);
    --banner-text: var(--white);
    --banner-accent: var(--gold);
    --banner-height: 40px;
    --banner-font-size: 0.8rem;
    --banner-padding: 0.5rem 1rem;

    /* Editorial banner heights */
    --editorial-banner-height: 40vh;
    --editorial-banner-height-narrow: 30vh;
    --editorial-banner-max: 500px;
    --editorial-banner-max-narrow: 350px;
}

html {
    scroll-behavior: smooth;
    /* Use 'clip' to prevent horizontal scroll without breaking position:sticky */
    overflow-x: clip;
}

body {
    font-family: var(--font-sans);
    background: var(--cream);
    color: var(--black);
    line-height: 1.6;
    /* Use 'clip' to prevent horizontal scroll without breaking position:sticky */
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

/* ==================== NAVIGATION ==================== */
/* All navigation styles are in header.css — single source of truth */

/* ==================== HERO VIDEO ==================== */

.hero-video {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.hero-fallback-img {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 2rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.375rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--gold);
    color: var(--black);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.4s var(--ease);
    border: 2px solid var(--gold);
}

.hero-btn:hover {
    background: transparent;
    color: var(--white);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.3);
    overflow: hidden;
}

.scroll-indicator span {
    display: block;
    width: 1px;
    height: 30px;
    background: var(--white);
    animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
    0% { transform: translateY(-30px); }
    100% { transform: translateY(60px); }
}

/* ==================== ABOUT SECTION ==================== */

.about-section {
    padding: var(--space-3xl) var(--space-2xl);
    background: var(--white);
}

.about-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.about-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.about-image:hover img {
    transform: scale(1.05);
}

.link-arrow {
    display: inline-block;
    margin-top: 1rem;
    color: var(--black);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.3s var(--ease);
}

.link-arrow:hover {
    color: var(--gold);
}

/* ==================== LINES SECTION ==================== */

.lines-section {
    padding: var(--space-3xl) var(--space-2xl);
    background: var(--cream);
}

.lines-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Адаптивная сетка в зависимости от количества элементов */
.lines-grid:has(> :nth-child(3):last-child) {
    /* 3 элемента — 3 колонки */
    grid-template-columns: repeat(3, 1fr);
}

.lines-grid:has(> :nth-child(4):last-child) {
    /* 4 элемента — 2x2 сетка */
    grid-template-columns: repeat(2, 1fr);
    max-width: 1000px;
}

.lines-grid:has(> :nth-child(5)) {
    /* 5+ элементов — авто-заполнение */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 1400px;
}

.line-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.line-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

/* Line card video background */
.line-card-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

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

.line-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    transition: background 0.3s var(--ease);
}

.line-card:hover .line-card-image {
    transform: scale(1.08);
}

.line-card:hover .line-card-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
}

.line-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    color: var(--white);
    z-index: 1;
}

.line-card-content h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.line-card-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    max-width: 400px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.line-card-arrow {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    transition: all 0.3s var(--ease);
    z-index: 1;
}

.line-card:hover .line-card-arrow {
    background: var(--gold);
    border-color: var(--gold);
    transform: translateX(4px);
}

/* ==================== HOMEPAGE PRODUCTS GRID ==================== */

/* Products grid block container */
.products-grid-block {
    padding: var(--space-2xl) var(--space-2xl);
    background: var(--cream);
}

.products-grid-block--empty {
    padding: var(--space-md) var(--space-2xl);
}

/* Products grid layout: 3 columns desktop, 2 tablet, 1 mobile */
.products-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Product card for homepage */
.product-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s var(--ease);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
}

/* Image container with hover effect */
.product-card-image-container {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 1rem;
}

.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

/* Main image - always visible by default */
.product-card-image--main {
    position: relative;
    z-index: 1;
    opacity: 1;
}

/* Secondary image - positioned absolutely for crossfade */
.product-card-image--secondary {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

/* Hover: Crossfade effect with smooth transition */
.product-card:hover .product-card-image--secondary {
    opacity: 1;
}

/* Fallback: zoom effect if no secondary image */
.product-card:not([data-has-secondary]):hover .product-card-image--main {
    transform: scale(1.05);
}

/* Preloading state - hide secondary until loaded */
.product-card-image--secondary:not(.preloaded) {
    visibility: hidden;
}

.product-card-image--secondary.preloaded {
    visibility: visible;
}

/* Card info section */
.product-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Line name (small, gold, uppercase) */
.product-card-line {
    font-size: 0.7rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Capsule name */
.product-card-name {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: var(--black);
}

/* Status badge (Pre-launch / Active) - NO PRICE per PRD */
.product-card-status {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

.product-card-status--prelaunch {
    color: var(--gold);
}

.product-card-status--active {
    color: var(--gray);
}

/* Empty state message */
.empty-state-message {
    font-size: 0.875rem;
    color: var(--gray);
    text-align: center;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
    .products-grid-block {
        padding: var(--space-lg) var(--space-sm);
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 500px;
    }

    .product-card-image-container {
        margin-bottom: 0.75rem;
    }

    .product-card-name {
        font-size: 1rem;
    }
}

/* ==================== COLLECTION SECTION ==================== */

.collection-section {
    padding: var(--space-3xl) var(--space-2xl);
    background: var(--cream);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray);
    letter-spacing: 0.03em;
}

.collection-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 420px));
    gap: 1.5rem;
    justify-content: center;
}

a.collection-item {
    text-decoration: none;
    color: inherit;
}

.collection-item {
    background: var(--white);
    overflow: hidden;
    transition: transform 0.3s var(--ease);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.collection-item:hover {
    transform: translateY(-8px);
}

.collection-item:hover .collection-image img {
    transform: scale(1.1);
}

.collection-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #F5F5F5;
}

/* Status badge positioning on collection cards */
.collection-image .badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.collection-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.collection-info h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.collection-info .collection-category {
    font-size: 0.75rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    order: -1;
}

.collection-info p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    /* Ограничение до 2 строк */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.collection-info .price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.75rem;
}

/* Collection item button overrides (gold variant) */
.collection-item .btn {
    width: 100%;
    margin-top: auto;
}

/* ==================== GALLERY SECTION ==================== */

.gallery-section {
    padding: var(--space-3xl) 0;
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s var(--ease);
}

.gallery-item:hover img {
    transform: scale(1.15);
}

.gallery-item:hover::after {
    background: rgba(0,0,0,0.2);
}

/* ==================== CTA SECTION ==================== */

.cta-section {
    padding: var(--space-3xl) var(--space-2xl);
    text-align: center;
    background: var(--black);
    color: var(--white);
}

.cta-section h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 1.25rem 3.5rem;
    background: var(--gold);
    color: var(--black);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.4s var(--ease);
}

.cta-button:hover {
    background: var(--white);
    transform: translateY(-3px);
}

/* ==================== FOOTER — styles moved to footer.css ==================== */

/* ==================== LIGHTBOX ==================== */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    z-index: 10000;
    transition: opacity 0.3s var(--ease);
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--white);
    font-size: 3rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s var(--ease);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
}

/* ==================== INNER PAGES ==================== */

/* Base section for inner pages */
.section {
    padding: var(--space-3xl) var(--space-2xl);
    padding-top: calc(100px + var(--space-2xl));
    background: var(--cream);
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    margin-bottom: var(--space-md);
    color: var(--black);
}

.section-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin-bottom: var(--space-sm);
}

.section-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray);
}

/* Capsules/Collaborations section */
.capsules-section {
    padding: var(--space-3xl) var(--space-2xl);
    padding-top: calc(100px + var(--space-2xl));
    background: var(--cream);
}

/* Divider */
.divider {
    width: 60px;
    height: 1px;
    background: var(--gray-light);
    margin: var(--space-md) auto;
}

/* Grid for cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg) 0;
}

/* Card styles */
.card {
    background: var(--white);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.card-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    background: #f5f5f5;
}

.card-content {
    padding: var(--space-md);
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.card-subtitle {
    font-size: 0.75rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
}

.card-status {
    margin-top: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--black);
}

.card-status.sold-out {
    color: var(--gray);
}

/* ==================== PRE-LAUNCH PRICING ==================== */

/* Pre-launch badge on product cards */
.badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.75rem;
    text-transform: uppercase;
}

/* Bronze palette for all badges */
.badge.prelaunch {
    background: #B8956A;
    color: var(--white);
}

.badge.active {
    background: #C9A961;
    color: var(--white);
}

.badge.soldout {
    background: #8B7355;
    color: var(--white);
}

.badge.archived {
    background: #7A6B50;
    color: var(--white);
}

/* Pre-launch price label */
.prelaunch-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

/* Original price (struck through) */
.original-price {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* Price container for pre-launch items */
.price-prelaunch {
    display: flex;
    flex-direction: column;
}

.price-prelaunch .current-price {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--black);
}

.price-prelaunch .original-price {
    font-size: 1rem;
    margin-left: 0;
    margin-top: 0.25rem;
}

/* Inline price with original (for cards) */
.price-inline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.price-inline .current-price {
    font-size: inherit;
    font-weight: 600;
}

.price-inline .original-price {
    margin-left: 0;
}

/* Process steps */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: var(--space-lg);
    text-align: left;
}

.process-step {
    padding: var(--space-md);
    background: var(--white);
    border-left: 3px solid var(--gold);
}

.step-number {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.process-step h4 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.process-step p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
}

/* Buttons - moved to buttons.css */

.cta-container {
    margin-top: var(--space-lg);
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== FORM ELEMENTS ==================== */

/* Reset native appearance for inputs and selects */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: var(--font-sans);
    font-size: 16px; /* Prevents zoom on iOS */
    line-height: 1.5;
    color: var(--black);
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: 0;
    padding: 12px 16px;
    width: 100%;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

/* Placeholder styles */
input::placeholder,
textarea::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

/* Select with custom arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6B6B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

/* Disabled state */
input:disabled,
select:disabled,
textarea:disabled {
    background: var(--cream);
    color: var(--gray);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Checkbox - keep minimal custom styling */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--gray-light);
    border-radius: 2px;
    background: var(--white);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

input[type="checkbox"]:checked {
    background: var(--gold);
    border-color: var(--gold);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

/* Textarea specific */
textarea {
    min-height: 120px;
    resize: vertical;
}

/* Form labels */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 0.5rem;
}

/* Form small helper text */
.form-group small,
form small {
    display: block;
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

/* ==================== CUSTOM SELECT COMPONENT ==================== */

/* Wrapper for custom select */
.custom-select {
    position: relative;
    width: 100%;
}

/* Hidden native select (for accessibility and form submission) */
.custom-select select {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

/* Visible custom select trigger */
.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--gray-light);
    cursor: pointer;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--black);
    min-height: 48px;
}

.custom-select-trigger:hover {
    border-color: var(--gray);
}

.custom-select.open .custom-select-trigger,
.custom-select-trigger:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
    outline: none;
}

.custom-select-trigger .selected-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-trigger .selected-text.placeholder {
    color: var(--gray);
}

/* Arrow icon */
.custom-select-trigger .select-arrow {
    width: 12px;
    height: 12px;
    margin-left: 12px;
    flex-shrink: 0;
    transition: transform 0.2s var(--ease);
}

.custom-select-trigger .select-arrow svg {
    width: 100%;
    height: 100%;
    fill: var(--gray);
}

.custom-select.open .custom-select-trigger .select-arrow {
    transform: rotate(180deg);
}

/* Dropdown options container */
.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-top: none;
    max-height: 0;
    overflow: hidden;
    z-index: 100;
    opacity: 0;
    transition: max-height 0.3s var(--ease), opacity 0.2s var(--ease);
}

.custom-select.open .custom-select-options {
    max-height: 300px;
    overflow-y: auto;
    opacity: 1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Option group label */
.custom-select-options .option-group-label {
    padding: 10px 16px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
    background: var(--cream);
    border-bottom: 1px solid var(--gray-light);
}

/* Individual option */
.custom-select-options .option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s var(--ease);
    font-size: 15px;
    border-bottom: 1px solid rgba(229, 229, 229, 0.5);
}

.custom-select-options .option:last-child {
    border-bottom: none;
}

.custom-select-options .option:hover {
    background: var(--cream);
}

.custom-select-options .option.selected {
    background: rgba(201, 169, 97, 0.1);
    color: var(--gold-dark);
    font-weight: 500;
}

.custom-select-options .option.selected::after {
    content: '✓';
    float: right;
    color: var(--gold);
}

/* Disabled state */
.custom-select.disabled .custom-select-trigger {
    background: var(--cream);
    color: var(--gray);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ==================== END CUSTOM SELECT ==================== */

/* ==================== CUSTOM CHECKBOX ==================== */

/* Hide native checkbox completely */
.custom-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom checkbox wrapper - apply to parent label */
.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
    padding-left: 32px;
}

/* The visual checkbox */
.checkbox-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 1px solid var(--gray-light, #ccc);
    background: var(--white, #fff);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

/* Hover state */
.checkbox-group label:hover::before {
    border-color: var(--gold, #C9A961);
}

/* Checked state - background */
.checkbox-group label:has(.custom-checkbox:checked)::before {
    background: var(--gold, #C9A961);
    border-color: var(--gold, #C9A961);
}

/* Checkmark */
.checkbox-group label::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* Show checkmark when checked */
.checkbox-group label:has(.custom-checkbox:checked)::after {
    opacity: 1;
}

/* Focus state */
.checkbox-group label:has(.custom-checkbox:focus)::before {
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.2);
}

/* ==================== END CUSTOM CHECKBOX ==================== */

/* Loading state */
.loading {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--gray);
    font-size: 0.875rem;
}

.error-message {
    text-align: center;
    padding: var(--space-2xl);
    color: #c00;
    font-size: 0.875rem;
}

/* Navigation styles are in header.css — single source of truth */

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .collection-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .lines-grid,
    .lines-grid:has(> :nth-child(3):last-child),
    .lines-grid:has(> :nth-child(4):last-child),
    .lines-grid:has(> :nth-child(5)) {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 1.5rem;
    }

    .line-card {
        aspect-ratio: 16/10;
    }

    .line-card-content {
        padding: 1.5rem;
    }

    .line-card-content h3 {
        font-size: 1.5rem;
    }

    .line-card-arrow {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 36px;
        height: 36px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    /* Hero mobile responsive */
    .hero-video {
        height: 100svh; /* Small viewport height - accounts for mobile browser UI */
        min-height: 550px;
    }

    .hero-content {
        padding: 1.5rem;
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .hero-title br {
        display: none; /* Remove line break on mobile for better flow */
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 3vw, 1.125rem);
        margin-bottom: 2rem;
    }

    .scroll-indicator {
        bottom: 2rem;
        height: 50px;
    }

    .scroll-indicator span {
        height: 25px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    /* Hero mobile improvements */
    .hero-video {
        height: 100svh; /* Use small viewport height for mobile browsers */
        min-height: 500px;
    }

    .hero-content {
        padding: 1rem;
        max-width: 100%;
    }

    .hero-subtitle {
        margin-bottom: 2rem;
    }

    .scroll-indicator {
        bottom: 1.5rem;
    }
}

/* ==================== ENHANCED MOBILE STYLES ==================== */

@media (max-width: 768px) {
    /* Root spacing adjustments */
    :root {
        --space-2xl: 4rem;
        --space-3xl: 5rem;
    }

    /* About section mobile */
    .about-section {
        padding: var(--space-xl) var(--space-sm);
    }

    .about-text h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-image {
        aspect-ratio: 4/3;
        margin-top: 1rem;
    }

    /* Collection section mobile */
    .collection-section {
        padding: var(--space-xl) var(--space-sm);
    }

    .section-header {
        margin-bottom: var(--space-lg);
        padding: 0 var(--space-xs);
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .collection-info h3 {
        font-size: 1.1rem;
    }

    .collection-info .price {
        font-size: 1.1rem;
    }

    /* Gallery section mobile */
    .gallery-section {
        padding: var(--space-xl) 0;
    }

    /* CTA section mobile */
    .cta-section {
        padding: var(--space-xl) var(--space-sm);
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .cta-section p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Inner pages mobile */
    .section {
        padding: var(--space-xl) var(--space-sm);
        padding-top: calc(70px + var(--space-lg));
    }

    .capsules-section {
        padding: var(--space-xl) var(--space-sm);
        padding-top: calc(70px + var(--space-lg));
    }

    /* Grid mobile */
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: var(--space-sm) 0;
    }

    /* Card mobile */
    .card-content {
        padding: var(--space-sm);
    }

    /* Process steps mobile */
    .process-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .process-step {
        padding: var(--space-sm);
    }

    /* Lightbox mobile */
    .lightbox-image {
        max-width: 95vw;
        max-height: 80vh;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
    }

    .lightbox-nav {
        padding: 0 0.5rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 0.75rem 1rem;
    }

    /* Form elements mobile */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        padding: 14px 16px;
    }

    /* Custom select mobile */
    .custom-select-trigger {
        min-height: 52px;
        padding: 14px 16px;
    }

    .custom-select-options .option {
        padding: 14px 16px;
    }

    /* Scroll indicator mobile */
    .scroll-indicator {
        bottom: 2rem;
        height: 40px;
    }

    .scroll-indicator span {
        height: 20px;
    }

    /* Loading and error mobile */
    .loading,
    .error-message {
        padding: var(--space-lg) var(--space-sm);
    }
}

@media (max-width: 480px) {
    /* Additional small mobile adjustments */
    .about-text h2 {
        font-size: 1.75rem;
    }

    .collection-info {
        padding: 1rem;
    }

    .collection-info h3 {
        font-size: 1rem;
    }

    /* Hero on very small screens */
    .hero-content {
        padding: 1.5rem 1rem;
    }

    /* CTA button adjustments */
    .cta-container {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-container .btn {
        width: 100%;
    }
}

/* ==================== SAFE AREA FOR MOBILE DEVICES ==================== */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    footer {
        padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
    }
}

/* ==================== SCROLL ANIMATIONS ==================== */

/* Base state for all animated elements */
[data-scroll] {
    opacity: 0;
    will-change: transform, opacity;
    transition:
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-scroll].is-visible {
    opacity: 1;
}

/* Fade animations */
[data-scroll="fade"] {
    transform: none;
}

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

[data-scroll="fade-up"].is-visible {
    transform: translateY(0);
}

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

[data-scroll="fade-down"].is-visible {
    transform: translateY(0);
}

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

[data-scroll="fade-left"].is-visible {
    transform: translateX(0);
}

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

[data-scroll="fade-right"].is-visible {
    transform: translateX(0);
}

/* Scale animations */
[data-scroll="zoom-in"] {
    transform: scale(0.9);
}

[data-scroll="zoom-in"].is-visible {
    transform: scale(1);
}

[data-scroll="zoom-out"] {
    transform: scale(1.1);
}

[data-scroll="zoom-out"].is-visible {
    transform: scale(1);
}

/* Slide animations (more dramatic) */
[data-scroll="slide-up"] {
    transform: translateY(100px);
}

[data-scroll="slide-up"].is-visible {
    transform: translateY(0);
}

[data-scroll="slide-left"] {
    transform: translateX(100px);
}

[data-scroll="slide-left"].is-visible {
    transform: translateX(0);
}

[data-scroll="slide-right"] {
    transform: translateX(-100px);
}

[data-scroll="slide-right"].is-visible {
    transform: translateX(0);
}

/* Flip animations */
[data-scroll="flip-up"] {
    transform: perspective(1000px) rotateX(10deg) translateY(40px);
    transform-origin: center bottom;
}

[data-scroll="flip-up"].is-visible {
    transform: perspective(1000px) rotateX(0) translateY(0);
}

[data-scroll="flip-left"] {
    transform: perspective(1000px) rotateY(-10deg) translateX(40px);
    transform-origin: right center;
}

[data-scroll="flip-left"].is-visible {
    transform: perspective(1000px) rotateY(0) translateX(0);
}

/* Reveal animation (for text) */
[data-scroll="reveal"] {
    clip-path: inset(100% 0 0 0);
    transform: translateY(20px);
}

[data-scroll="reveal"].is-visible {
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
}

/* Blur animation */
[data-scroll="blur"] {
    filter: blur(10px);
    transform: scale(1.02);
}

[data-scroll="blur"].is-visible {
    filter: blur(0);
    transform: scale(1);
}

/* Stagger delays for child elements */
[data-scroll-stagger] > *:nth-child(1) { transition-delay: 0ms; }
[data-scroll-stagger] > *:nth-child(2) { transition-delay: 100ms; }
[data-scroll-stagger] > *:nth-child(3) { transition-delay: 200ms; }
[data-scroll-stagger] > *:nth-child(4) { transition-delay: 300ms; }
[data-scroll-stagger] > *:nth-child(5) { transition-delay: 400ms; }
[data-scroll-stagger] > *:nth-child(6) { transition-delay: 500ms; }
[data-scroll-stagger] > *:nth-child(7) { transition-delay: 600ms; }
[data-scroll-stagger] > *:nth-child(8) { transition-delay: 700ms; }
[data-scroll-stagger] > *:nth-child(9) { transition-delay: 800ms; }
[data-scroll-stagger] > *:nth-child(10) { transition-delay: 900ms; }

/* Custom delay attribute support */
[data-scroll-delay="100"] { transition-delay: 100ms; }
[data-scroll-delay="200"] { transition-delay: 200ms; }
[data-scroll-delay="300"] { transition-delay: 300ms; }
[data-scroll-delay="400"] { transition-delay: 400ms; }
[data-scroll-delay="500"] { transition-delay: 500ms; }
[data-scroll-delay="600"] { transition-delay: 600ms; }
[data-scroll-delay="700"] { transition-delay: 700ms; }
[data-scroll-delay="800"] { transition-delay: 800ms; }

/* Custom duration support */
[data-scroll-duration="fast"] {
    transition-duration: 0.4s;
}

[data-scroll-duration="slow"] {
    transition-duration: 1.2s;
}

[data-scroll-duration="slower"] {
    transition-duration: 1.6s;
}

/* Easing variations */
[data-scroll-easing="ease-out"] {
    transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

[data-scroll-easing="ease-in-out"] {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-scroll-easing="bounce"] {
    transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Special: Image reveal with overlay */
.scroll-image-reveal {
    position: relative;
    overflow: hidden;
}

.scroll-image-reveal::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cream, #FAF8F3);
    transform: scaleX(1);
    transform-origin: right;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    transition-delay: 0.2s;
}

.scroll-image-reveal.is-visible::after {
    transform: scaleX(0);
}

.scroll-image-reveal img {
    transform: scale(1.2);
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.4s;
}

.scroll-image-reveal.is-visible img {
    transform: scale(1);
}

/* Special: Text line reveal */
.scroll-line-reveal {
    overflow: hidden;
}

.scroll-line-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-line-reveal.is-visible span {
    transform: translateY(0);
}

/* Special: Counter animation trigger */
[data-scroll="counter"] {
    opacity: 1;
    transform: none;
}

/* Parallax base (controlled by JS) */
[data-scroll-parallax] {
    will-change: transform;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    [data-scroll],
    [data-scroll].is-visible,
    .scroll-image-reveal::after,
    .scroll-image-reveal img,
    .scroll-line-reveal span {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
        clip-path: none !important;
    }
}

/* ==================== END SCROLL ANIMATIONS ==================== */

/* ==================== TOUCH DEVICE OPTIMIZATIONS ==================== */

@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .collection-item:hover {
        transform: none;
    }

    .collection-item:hover .collection-image img {
        transform: none;
    }

    .card:hover {
        transform: none;
        box-shadow: none;
    }

    .about-image:hover img {
        transform: none;
    }

    .gallery-item:hover img {
        transform: none;
    }

    .gallery-item:hover::after {
        background: transparent;
    }

    /* Active states for touch */
    .collection-item:active {
        transform: scale(0.98);
    }

    .card:active {
        transform: scale(0.98);
    }
}
