/* ═══════════════════════════════════════════
   URSTROM Website — Base Styles
   All layout, typography, and components.
   Colors come from theme CSS files.
   ═══════════════════════════════════════════ */

/* ─── Typography ─────────────────────────── */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-Variable.woff2') format('woff2');
    font-weight: 300 700;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('../fonts/Outfit-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/PlusJakartaSans-Variable.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: 'DM Sans';
    src: url('../fonts/DMSans-Variable.woff2') format('woff2');
    font-weight: 100 1000;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/Manrope-Variable.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: 'Sora';
    src: url('../fonts/Sora-Variable.woff2') format('woff2');
    font-weight: 100 800;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/PlayfairDisplay-Variable.woff2') format('woff2');
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/JetBrainsMono-Variable.woff2') format('woff2');
    font-weight: 100 800;
    font-display: swap;
}

/* ─── Design Variables (overridable via Admin) ── */
:root {
    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-size-base: 16px;
    --heading-scale: 1.25;
    --line-height-body: 1.6;
    --letter-spacing-body: 0em;
    --letter-spacing-heading: 0.02em;
    --font-weight-body: 400;
    --font-weight-heading: 600;
    /* Layout */
    --container-width: 1200px;
    --nav-height: 72px;
    --section-padding: 5rem;
    --hero-min-height: 100vh;
    --product-grid-min: 320px;
    --product-grid-gap: 2rem;
    --radius-card: 8px;
    --radius-button: 4px;
    /* Buttons */
    --btn-padding-y: 0.6rem;
    --btn-padding-x: 1.25rem;
    --btn-font-size: 0.875rem;
    /* Footer */
    --footer-border-width: 3px;
    /* Hero */
    --hero-overlay-opacity: 1;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-body);
    line-height: var(--line-height-body);
    letter-spacing: var(--letter-spacing-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-heading);
    letter-spacing: var(--letter-spacing-heading);
    color: var(--text-primary);
}

/* ─── Navigation ─────────────────────────── */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease;
    height: var(--nav-height);
}

.site-nav.scrolled {
    background: var(--nav-bg-scrolled);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    flex: 1;
}

.nav-logo img {
    height: 32px;
    transition: filter 0.3s ease;
}

/* Apply logo color based on theme */
.nav-logo img {
    filter: brightness(0) invert(0.9);
}

[data-theme*="light"] .nav-logo img {
    filter: brightness(0) invert(0.2);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
}

.nav-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    padding: 0.25rem 0.6rem;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex: 1;
}

/* Cart icon in nav */
.nav-cart {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-cart:hover { color: var(--text-primary); }

.nav-cart svg { width: 20px; height: 20px; }

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--accent-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Language switcher */
.lang-switch {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    overflow: hidden;
}

.lang-switch a {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.lang-switch a.active {
    background: var(--accent-secondary);
    color: #fff;
}

.lang-switch a:hover:not(.active) {
    color: var(--text-primary);
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle button {
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: var(--text-muted);
    padding: 0.25rem 0.4rem;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.theme-toggle button:hover,
.theme-toggle button.active {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

/* Mobile nav toggle */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.25rem;
}

.nav-hamburger svg { width: 24px; height: 24px; }

/* Mobile nav overlay */
.nav-mobile {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 999;
    padding: 2rem;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-mobile.open { display: flex; }

.nav-mobile .nav-link {
    font-size: 1.25rem;
    font-family: 'Space Grotesk', sans-serif;
    border: none;
    padding: 0;
    color: var(--text-secondary);
    display: block;
}

.nav-mobile .nav-link:hover,
.nav-mobile .nav-link.active {
    color: var(--text-primary);
    border: none;
}

/* ─── Hero Section ───────────────────────── */

.hero {
    position: relative;
    min-height: var(--hero-min-height);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-hero-gradient);
    opacity: var(--hero-overlay-opacity);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.hero-logo {
    height: 80px;
    margin: 0 auto 1.5rem;
}

.hero-logo img {
    height: 100%;
    margin: 0 auto;
    filter: brightness(0) invert(0.9);
}

[data-theme*="light"] .hero-logo img {
    filter: none;
}

.hero-tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.hero-cta {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--accent-secondary);
    color: #fff;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background: var(--accent-secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--text-muted);
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator svg { width: 24px; height: 24px; }

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

/* ─── Sections ───────────────────────────── */

.section {
    padding: var(--section-padding) 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 3rem;
}

/* ─── Product Grid ───────────────────────── */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--product-grid-min), 1fr));
    gap: var(--product-grid-gap);
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.product-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-secondary);
}

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

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

.product-card-body {
    padding: 1.25rem;
}

.product-card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.product-card-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.product-card-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
}

.product-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.product-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--accent-secondary);
    font-weight: 500;
    transition: gap 0.2s ease;
}

.product-card-link:hover {
    gap: 0.75rem;
}

.product-card-link svg { width: 16px; height: 16px; }

/* ─── Product Detail ─────────────────────── */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding-top: var(--nav-height);
}

.product-gallery {
    position: relative;
}

.product-gallery-main {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 1rem;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.product-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
}

.product-gallery-thumb {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.product-gallery-thumb.active,
.product-gallery-thumb:hover {
    border-color: var(--accent-secondary);
}

.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding-top: 1rem;
}

.product-info-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.product-info-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.product-info-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.product-info-price .contact-pricing {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--accent-secondary);
    color: #fff;
    border: none;
    border-radius: var(--radius-button);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.btn-buy:hover {
    background: var(--accent-secondary-hover);
}

.btn-add-cart {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-button);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-add-cart:hover {
    background: var(--accent-primary-hover);
}

.product-description {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    line-height: 1.7;
    color: var(--text-secondary);
}

.product-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-strong);
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.product-tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.product-tab:hover { color: var(--text-primary); }
.product-tab.active {
    color: var(--accent-secondary);
    border-bottom-color: var(--accent-secondary);
}

.product-tab-panel { display: none; }
.product-tab-panel.active { display: block; }

/* ─── Specs Grid ────────────────────────── */

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

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

.spec-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--accent-secondary);
    opacity: 0.85;
}

.spec-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.spec-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    line-height: 1.2;
}

.spec-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.3;
}

/* Spec Icon Style: Filled */
[data-spec-icons="filled"] .spec-icon {
    fill: var(--accent-secondary);
    stroke: none;
    opacity: 0.7;
}

/* Spec Icon Style: Minimal — no card bg, just lines */
[data-spec-icons="minimal"] .spec-item {
    background: none;
    border: none;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}
[data-spec-icons="minimal"] .spec-item:hover {
    border-bottom-color: var(--accent-secondary);
}
[data-spec-icons="minimal"] .spec-icon {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

/* Spec Icon Style: None — no icons at all */
[data-spec-icons="none"] .spec-icon {
    display: none;
}
[data-spec-icons="none"] .spec-item {
    gap: 0;
}

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

/* ─── Category Filter ────────────────────── */

.category-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-filter-btn {
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-filter-btn:hover,
.category-filter-btn.active {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

/* ─── About Section ──────────────────────── */

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.about-text .subtitle {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.about-badge:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.3);
}
.about-badge img {
    display: block;
    width: 80px;
    height: auto;
    filter: brightness(0) invert(1);
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-visual img {
    max-width: 80%;
    filter: brightness(0) invert(0.9);
    opacity: 0.1;
}

[data-theme*="light"] .about-visual img {
    filter: brightness(0) invert(0.2);
    opacity: 0.08;
}

/* ─── Contact Form ───────────────────────── */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-form label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-form input,
.contact-form textarea {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

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

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    padding-top: 1rem;
}

.contact-info h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contact-info-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent-secondary);
    flex-shrink: 0;
}

/* ─── Cart / Checkout ────────────────────── */

.cart-page,
.checkout-page {
    padding-top: calc(var(--nav-height) + 3rem);
    min-height: 100vh;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

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

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

.cart-item-image {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    object-fit: cover;
}

.cart-item-name {
    font-weight: 500;
}

.cart-qty-input {
    width: 60px;
    padding: 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    text-align: center;
    color: var(--text-primary);
}

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    max-width: 400px;
    margin-left: auto;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.cart-summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    border-top: 1px solid var(--border-strong);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
}

.btn-checkout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-checkout:hover { background: var(--accent-primary-hover); }

/* Checkout form */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.payment-method:has(input:checked) {
    border-color: var(--accent-secondary);
}

.payment-method input[type="radio"] {
    accent-color: var(--accent-secondary);
}

/* ─── Page Content (CMS Pages) ───────────── */

.page-content {
    max-width: 800px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.page-content h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.page-content h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
.page-content h4 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
.page-content p { margin-bottom: 1rem; }
.page-content ul, .page-content ol { margin: 0.5rem 0 1rem 1.5rem; }
.page-content li { margin-bottom: 0.25rem; }
.page-content blockquote {
    border-left: 3px solid var(--accent-secondary);
    padding: 0.75rem 1.25rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 0 4px 4px 0;
}
.page-content a { color: var(--accent-secondary); text-decoration: underline; }
.page-content a:hover { color: var(--accent-primary); }
.page-content a.btn { color: #fff; text-decoration: none; }
.page-content a.btn:hover { color: #fff; }
.page-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.page-content th, .page-content td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.page-content th { background: var(--bg-secondary); font-weight: 600; }
.page-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.page-content img { max-width: 100%; height: auto; border-radius: 4px; }

/* ─── Footer ─────────────────────────────── */

.site-footer {
    background: var(--bg-secondary);
    border-top: var(--footer-border-width) solid var(--accent-primary);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.footer-brand img {
    height: 28px;
    margin-bottom: 0.75rem;
    filter: brightness(0) invert(0.9);
}

[data-theme*="light"] .footer-brand img {
    filter: brightness(0) invert(0.2);
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.8rem;
    max-width: 280px;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-col h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

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

.footer-social svg { width: 20px; height: 20px; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ─── Gate Page ──────────────────────────── */

.gate-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: var(--bg-primary);
    overflow: hidden;
}

.gate-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.gate-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.75) 100%);
}

.gate-card {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 380px;
    width: 100%;
}

.gate-logo {
    height: 60px;
    margin: 0 auto 2rem;
}

.gate-logo img {
    height: 100%;
    margin: 0 auto;
    filter: brightness(0) invert(0.9);
}

.gate-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.gate-form {
    display: flex;
    gap: 0.5rem;
}

.gate-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

.gate-form input:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

.gate-form button {
    padding: 0.75rem 1.5rem;
    background: var(--accent-secondary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gate-form button:hover { background: var(--accent-secondary-hover); }

.gate-error {
    color: var(--accent-primary);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* ─── Error Page ─────────────────────────── */

.error-page {
    padding-top: calc(var(--nav-height) + 5rem);
    text-align: center;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
}

.error-title {
    font-size: 1.5rem;
    margin: 1rem 0;
}

.error-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.error-content {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 600px;
}

.error-content.page-content {
    margin-left: auto;
    margin-right: auto;
}

/* ─── Flash Messages ─────────────────────── */

.flash-messages {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1rem 1.5rem 0;
}

/* ─── Alerts (public) ────────────────────── */

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-success { background: rgba(76, 175, 80, 0.15); color: #66bb6a; }
.alert-error { background: rgba(191, 67, 66, 0.15); color: #ef5350; }

/* ─── Buttons (public) ───────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--btn-padding-y) var(--btn-padding-x);
    border: none;
    border-radius: var(--radius-button);
    font-size: var(--btn-font-size);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary { background: var(--accent-secondary); color: #fff; }
.btn-primary:hover { background: var(--accent-secondary-hover); }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
}
.btn-ghost:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* ─── Order Confirmation ─────────────────── */

.order-confirmation {
    padding-top: calc(var(--nav-height) + 3rem);
    text-align: center;
    min-height: 60vh;
}

.order-confirmation .checkmark {
    width: 64px;
    height: 64px;
    color: var(--accent-secondary);
    margin: 0 auto 1rem;
}

/* ─── Animations ─────────────────────────── */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ─────────────────────────── */

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: block; }
    .nav-right .lang-switch,
    .nav-right .theme-toggle { display: none; }

    .hero-logo { height: 50px; }
    .hero-tagline { letter-spacing: 0.08em; }

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

    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-visual { display: none; }

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

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

    .footer-content {
        flex-direction: column;
    }

    .footer-links { flex-direction: column; gap: 1.5rem; }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .cart-table { font-size: 0.85rem; }
    .cart-item-image { width: 48px; height: 48px; }

    /* Mobile nav extras */
    .nav-mobile .lang-switch {
        display: flex;
        border: none;
    }
    .nav-mobile .theme-toggle {
        display: flex;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── Downloads Page ─────────────────────── */

.downloads-hero {
    padding: 8rem 0 2rem;
}

.downloads-hero .section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
}

.downloads-hero .section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.downloads-section {
    padding: 0 0 4rem;
}

.downloads-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

/* Release Cards */
.release-card {
    background: var(--bg-card, var(--bg-secondary));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s ease;
}

.release-card.latest {
    border-color: var(--accent-secondary);
}

.release-header {
    margin-bottom: 1.5rem;
}

.release-version {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.version-number {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.release-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.release-badge {
    display: inline-block;
    background: var(--accent-secondary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2em 0.6em;
    border-radius: 4px;
}

/* Download Button Grid */
.download-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    transition: all 0.25s ease;
    text-decoration: none;
    color: var(--text-primary);
    gap: 0.4rem;
    cursor: pointer;
}

.download-btn:hover {
    transform: translateY(-3px);
    border-color: var(--accent-secondary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

.download-btn.disabled {
    opacity: 0.25;
    pointer-events: none;
    cursor: default;
}

.download-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-icon svg {
    width: 100%;
    height: 100%;
}

.download-btn:hover .download-icon {
    color: var(--text-primary);
}

.download-platform {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.download-ext {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.download-size {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Release Changelog */
.release-changelog {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.release-changelog ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.release-changelog li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.2rem 0;
    line-height: 1.6;
}

.release-changelog li::before {
    content: '\2022';
    color: var(--accent-secondary);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Full Changelog Section */
.changelog-section {
    margin-top: 3rem;
    background: var(--bg-card, var(--bg-secondary));
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.changelog-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    padding: 1.25rem 1.5rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
    color: var(--text-primary);
    transition: background 0.2s ease;
}

.changelog-title:hover {
    background: var(--bg-primary);
}

.changelog-chevron {
    transition: transform 0.3s ease;
}

.changelog-section.open .changelog-chevron {
    transform: rotate(180deg);
}

.changelog-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 1.5rem;
}

.changelog-section.open .changelog-content {
    max-height: 600px;
    overflow-y: auto;
    padding: 0 1.5rem 1.5rem;
}

.changelog-date {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--accent-secondary);
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

.changelog-date:first-child {
    margin-top: 0;
}

.changelog-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.changelog-list li {
    color: var(--text-secondary);
    font-size: 0.82rem;
    padding: 0.2rem 0;
    line-height: 1.6;
}

.changelog-list code {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-right: 0.4rem;
}

/* Changelog scrollbar */
.changelog-content::-webkit-scrollbar {
    width: 6px;
}

.changelog-content::-webkit-scrollbar-track {
    background: transparent;
}

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

/* Downloads responsive */
@media (max-width: 768px) {
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .downloads-hero {
        padding: 6rem 0 1.5rem;
    }

    .release-card {
        padding: 1.25rem;
    }

    .version-number {
        font-size: 1.25rem;
    }
}

/* ─── Campus Overlay ──────────────────────── */

.campus-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000;
    background: #000;
}

.campus-close {
    position: absolute;
    top: 1rem; right: 1.5rem;
    z-index: 2010;
    background: none; border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.campus-close:hover { opacity: 1; }

.campus-preloader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2005;
}

.campus-logo {
    width: 120px;
    height: auto;
    filter: invert(1);
    opacity: 0;
    animation: campusLogoIn 2.5s ease forwards;
}

.campus-tagline {
    margin-top: 1.5rem;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    animation: campusTagIn 2.5s ease forwards;
}

@keyframes campusLogoIn {
    0%   { opacity: 0; transform: scale(0.8); }
    20%  { opacity: 1; transform: scale(1); }
    75%  { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.1); }
}

@keyframes campusTagIn {
    0%   { opacity: 0; transform: translateX(40px); }
    20%  { opacity: 0; transform: translateX(40px); }
    40%  { opacity: 1; transform: translateX(0); }
    75%  { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-40px); }
}

.campus-frame {
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.campus-frame.visible { opacity: 1; }

/* ─── Video BG mobile handling ───────────── */

.hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* ─── Scroll to Top Button ─────────────── */

.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 90;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--accent-primary);
    color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

.scroll-top svg {
    width: 22px;
    height: 22px;
}
