/* ─── CSS Variables ─── */
:root {
    --bg: #1a1512;
    --surface: #2d241f;
    --surface-hover: #3a2f28;
    --accent: #c9a96e;
    --accent-hover: #dbbd8a;
    --secondary: #8b3a3a;
    --text-primary: #f5f0eb;
    --text-secondary: #a89f94;
    --border: #3d332b;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,169,110,0.1);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --max-width: 1200px;
    --rail-height: 64px;
}

/* ─── Reset ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

/* ─── Gradient Background ─── */
.gradient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, #1a1512, #2d1f1f, #1f2d28, #2d2a1f, #1a1512);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 100%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .gradient-bg {
        animation: none;
    }
}

/* ─── Site Header ─── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(26,21,18,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo:hover {
    color: var(--accent);
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    padding: 8px;
}

.cart-link:hover {
    color: var(--accent);
}

.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--accent);
    color: var(--bg);
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Category Rail ─── */
.category-rail {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(26,21,18,0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.category-rail::-webkit-scrollbar {
    display: none;
}

.rail-track {
    display: flex;
    gap: 8px;
    padding: 12px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
    scroll-snap-type: x mandatory;
}

.rail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    scroll-snap-align: start;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.rail-item:hover {
    color: var(--text-primary);
    background: var(--surface);
}

.rail-item.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(201,169,110,0.08);
}

.rail-item svg {
    width: 16px;
    height: 16px;
}

/* ─── Main Content Area ─── */
.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 140px 24px 80px;
}

/* ─── Typography ─── */
.display {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 20px;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(26px, 3.5vw, 36px);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 16px;
}

h3 {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.section-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 12px;
}

/* ─── Hero Section ─── */
.hero {
    min-height: calc(100vh - 140px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 64px;
    padding: 40px 0 0 48px;
}

.hero-text {
    text-align: left;
    max-width: 560px;
    flex-shrink: 0;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 32px;
}

.hero > .hero-scroll-wall {
    max-width: 420px;
    width: 100%;
    height: auto;
    gap: 10px;
    mask-image: none;
    -webkit-mask-image: none;
    align-self: stretch;
}

.hero-scroll-wall .scroll-card-name {
    font-size: 16px;
}

.hero-scroll-wall .scroll-card-price {
    font-size: 12px;
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 32px;
        padding: 40px 24px;
    }

    .hero-text {
        text-align: center;
    }

    .hero > .hero-scroll-wall {
        max-width: 100%;
        height: 360px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 4px 16px rgba(201,169,110,0.2);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201,169,110,0.3);
}

.btn-secondary {
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── Product Cards ─── */
.product-grid {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.product-grid::-webkit-scrollbar {
    height: 6px;
}

.product-grid::-webkit-scrollbar-track {
    background: transparent;
}

.product-grid::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.product-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

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

.card-image-link {
    display: block;
    position: relative;
}

.card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    background: var(--bg);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26,21,18,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .card-overlay {
    opacity: 1;
}

.add-to-cart-btn {
    padding: 12px 24px;
    background: var(--accent);
    color: var(--bg);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.card-info {
    padding: 20px;
}

.card-category {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 6px;
}

.card-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

/* ─── Section Layouts ─── */
.section {
    margin-bottom: 80px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 32px;
}

.view-all {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Brand Statement ─── */
.brand-statement {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 24px;
}

.brand-statement p {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 30px);
    font-style: italic;
    line-height: 1.5;
    color: var(--text-secondary);
}

.brand-statement a {
    display: inline-block;
    margin-top: 24px;
}

/* ─── Article Cards ─── */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
}

.article-card:hover {
    box-shadow: var(--shadow-hover);
}

.article-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-card-content {
    padding: 20px;
}

.article-card .category {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 8px;
}

.article-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.article-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.read-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ─── Product Detail Page ─── */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.product-detail-image {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.product-detail-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-detail-info .category {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 12px;
}

.product-detail-info .price {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    margin: 16px 0 24px;
}

.product-detail-info .tagline {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 32px;
}

.specs-table th,
.specs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.specs-table th {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    width: 40%;
}

.specs-table td {
    color: var(--text-primary);
}

/* ─── Cart Page ─── */
.cart-empty {
    text-align: center;
    padding: 80px 24px;
}

.cart-empty h2 {
    font-family: var(--font-display);
    font-size: 32px;
    margin-bottom: 16px;
}

.cart-empty p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    text-align: left;
    padding: 16px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.cart-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-item-info img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info .name {
    font-weight: 600;
}

.cart-item-info .category {
    font-size: 12px;
    color: var(--text-secondary);
}

.qty-input {
    width: 60px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    text-align: center;
}

.remove-btn {
    color: var(--secondary);
    font-size: 13px;
    transition: color 0.2s ease;
}

.remove-btn:hover {
    color: #b54545;
}

.cart-summary {
    background: var(--surface);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    margin-top: 32px;
    max-width: 400px;
    margin-left: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
    border-bottom: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

/* ─── Checkout Page ─── */
.checkout-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.order-complete {
    text-align: center;
    padding: 80px 24px;
}

.order-complete h2 {
    font-family: var(--font-display);
    font-size: 36px;
    margin-bottom: 16px;
}

.order-complete .order-number {
    font-size: 18px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 24px;
}

/* ─── Article Content ─── */
.article-content {
    max-width: 700px;
}

.article-content h2 {
    font-family: var(--font-display);
    font-size: 28px;
    margin: 40px 0 16px;
}

.article-content h3 {
    font-size: 20px;
    margin: 24px 0 12px;
}

.article-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 8px;
}

.article-content strong {
    color: var(--text-primary);
}

/* ─── Contact Form ─── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
}

.faq-question svg {
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding-bottom: 20px;
    color: var(--text-secondary);
}

/* ─── Footer ─── */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 80px;
    padding: 48px 24px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 32px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 14px;
}

.footer-nav {
    display: flex;
    gap: 24px;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.footer-nav a:hover {
    color: var(--accent);
}

.footer-bottom {
    width: 100%;
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .site-main {
        padding: 130px 16px 60px;
    }

    .product-card {
        flex: 0 0 240px;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cart-summary {
        margin-left: 0;
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .rail-item span {
        display: none;
    }

    .rail-item {
        padding: 10px;
    }

    .hero {
        min-height: calc(100vh - 120px);
    }
}

/* ─── Infinite Scroll Product Wall ─── */
.scroll-wall {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: var(--max-width);
    margin: 0 auto;
    height: 600px;
    overflow: hidden;
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
}

.scroll-column {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.scroll-column:hover .scroll-track {
    animation-play-state: paused;
}

.scroll-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    will-change: transform;
}

.scroll-column--up .scroll-track {
    animation: scrollUp 45s linear infinite;
}

.scroll-column--down .scroll-track {
    animation: scrollDown 45s linear infinite;
}

@keyframes scrollUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes scrollDown {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}

.scroll-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.scroll-card:hover {
    box-shadow: var(--shadow-hover);
    transform: scale(1.02);
    z-index: 2;
}

.scroll-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.scroll-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(26, 21, 18, 0.7) 70%,
        rgba(26, 21, 18, 0.95) 100%
    );
    pointer-events: none;
}

.scroll-card-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.scroll-card-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .scroll-wall {
        max-width: 100%;
        height: 420px;
        gap: 12px;
    }

    .scroll-card-name {
        font-size: 16px;
    }

    .scroll-card img {
        aspect-ratio: 4 / 3;
    }
}
