/* ============ RESET & VARIABLES ============ */
:root {
    --brand: #4169E1;
    --brand-hover: #3154C4;
    --text: #111111;
    --text-muted: #666666;
    --bg: #FFFFFF;
    --bg-alt: #F9FAFB;
    --border: #E5E5E5;

    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;

    --pad: clamp(24px, 5vw, 80px);
    --bottom-nav-h: 64px;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px)); /* Space for bottom nav */
}

@media (min-width: 1024px) {
    body { padding-bottom: 0; }
}

img { max-width: 100%; display: block; object-fit: cover; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.1; }

section[id] { scroll-margin-top: 100px; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 32px; font-weight: 500; font-size: 16px;
    border-radius: 4px; transition: all 0.3s ease; border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-full { width: 100%; padding: 18px; font-size: 18px; }

.btn-outline-dark {
    border: 1px solid var(--text); color: var(--text); padding: 14px 28px;
    display: inline-flex; align-items: center; transition: all 0.3s;
}
.btn-outline-dark:hover { background: var(--text); color: #fff; }

.link-arrow {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 500;
    color: #fff; font-size: 16px; transition: gap 0.3s;
}
.link-arrow:hover { gap: 12px; }

/* ============ NAVIGATION ============ */
.nav-wrapper {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 32px var(--pad) 20px;
    transition: padding 0.4s ease, background 0.4s ease, border 0.4s ease;
    background: transparent;
    border-bottom: 1px solid transparent;
}

.nav-wrapper.scrolled {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 16px var(--pad);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; gap: 40px;
}

/* Logo constraints */
.logo-full { display: block; width: 130px; height: auto; object-fit: contain; }
.logo-short { display: none; }

.nav-center { display: none; gap: 32px; align-items: center; }
.nav-center a {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #fff;
    transition: color 0.3s;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    position: relative;
    padding-bottom: 4px;
}

.nav-center a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 0; height: 1px;
    background-color: #fff;
    transition: width 0.3s ease;
}
.nav-center a:hover::after { width: 100%; }

.nav-wrapper.scrolled .nav-center a {
    color: var(--text);
    text-shadow: none;
}
.nav-wrapper.scrolled .nav-center a::after { background-color: var(--brand); }
.nav-wrapper.scrolled .nav-center a:hover { color: var(--brand); }

.btn-account {
    display: none; align-items: center; gap: 8px; padding: 10px 20px;
    border-radius: 100px; border: 1.5px solid rgba(255, 255, 255, 0.5);
    color: #fff; font-weight: 500; font-size: 14px;
    background: rgba(0, 0, 0, 0.25); backdrop-filter: blur(10px);
    transition: all 0.3s;
}
.btn-account:hover { background: rgba(255, 255, 255, 0.15); border-color: #fff; }
.nav-wrapper.scrolled .btn-account {
    color: var(--text); border-color: var(--border); background: transparent; backdrop-filter: none;
}
.nav-wrapper.scrolled .btn-account:hover { color: var(--brand); border-color: var(--brand); background: var(--bg-alt); }

.mobile-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; color: #fff;
    background: rgba(0, 0, 0, 0.25); border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 100px; backdrop-filter: blur(10px);
}
.nav-wrapper.scrolled .mobile-toggle {
    color: var(--text); background: transparent; border-color: var(--border);
}

/* ============ FULL-SCREEN MOBILE MENU ============ */
.mobile-menu-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    padding: 32px var(--pad) 40px;
    padding-top: calc(32px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow-y: auto;
}

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

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 32px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.mobile-menu-header .logo img {
    width: 110px;
    height: auto;
    object-fit: contain;
}

.mobile-close {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.mobile-close:hover {
    background: var(--text);
    color: #fff;
    transform: rotate(90deg);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mobile-nav a {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.2s;
}

.mobile-menu-fullscreen.open .mobile-nav a {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-fullscreen.open .mobile-nav a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-fullscreen.open .mobile-nav a:nth-child(2) { transition-delay: 0.16s; }
.mobile-menu-fullscreen.open .mobile-nav a:nth-child(3) { transition-delay: 0.22s; }
.mobile-menu-fullscreen.open .mobile-nav a:nth-child(4) { transition-delay: 0.28s; }

.mobile-nav a:first-child { padding-top: 0; }
.mobile-nav a:last-child { border-bottom: none; }

.mobile-nav-num {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    letter-spacing: 0.12em;
    flex-shrink: 0;
}

.mobile-nav-text {
    font-family: var(--font-serif);
    font-size: clamp(28px, 7vw, 34px);
    font-weight: 600;
    color: var(--text);
    line-height: 1.15;
    transition: color 0.2s;
}

.mobile-nav a:active .mobile-nav-text,
.mobile-nav a:hover .mobile-nav-text {
    color: var(--brand);
}

.mobile-menu-footer {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.mobile-menu-fullscreen.open .mobile-menu-footer {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.34s;
}

.mobile-signin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 24px;
    background: var(--text);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border-radius: 100px;
    text-decoration: none;
    transition: background 0.25s ease;
}
.mobile-signin-btn:active { background: var(--brand); }

.mobile-socials {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.mobile-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--text-muted);
    transition: all 0.25s ease;
}
.mobile-socials a:active,
.mobile-socials a:hover {
    background: var(--brand);
    color: #fff;
}
.mobile-socials svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .logo-full { display: none; }
    .logo-short { display: block; width: 90px; height: auto; object-fit: contain; }
    .mobile-menu-header .logo .logo-full { display: none; }
    .mobile-menu-header .logo .logo-short { display: block; width: 90px; height: auto; }
}

@media (min-width: 1024px) {
    .nav-center { display: flex; }
    .btn-account { display: inline-flex; }
    .mobile-toggle { display: none; }
    .mobile-menu-fullscreen { display: none; }
}

/* ============ HERO ============ */
.hero {
    position: relative; height: 100vh; min-height: 700px;
    display: flex; align-items: center; padding: 0 var(--pad);
    padding-top: 100px;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
}
.hero-content { max-width: 850px; color: #fff; padding-top: 40px; }
.hero h1 {
    font-size: clamp(38px, 5vw, 72px);
    margin-bottom: 24px;
    line-height: 1.05;
    max-width: 14ch;
}
.hero p { font-size: clamp(18px, 2vw, 22px); font-weight: 400; max-width: 600px; margin-bottom: 48px; opacity: 0.9; }
.hero-actions { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }

@media (max-width: 768px) {
    .hero { padding-top: 100px; }
    .hero h1 { max-width: 100%; }
}

@media (min-width: 1024px) {
    .hero { padding-top: 0; }
}

/* ============ SECTIONS ============ */
.section-pad { padding: 120px var(--pad); }
.section-header { max-width: 700px; margin-bottom: 64px; }
.section-header h2 { font-size: clamp(36px, 4vw, 56px); margin-bottom: 16px; }
.section-header p { font-size: 20px; color: var(--text-muted); }

/* ============ FINE ART & GALLERY ============ */
.gallery-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 4px; }
.gallery-item { position: relative; overflow: hidden; cursor: pointer; aspect-ratio: 1; }
.gallery-item img { width: 100%; height: 100%; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-label {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 50%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 32px; color: #fff; opacity: 0; transition: opacity 0.4s;
}
.gallery-item:hover .gallery-label { opacity: 1; }
.gallery-label span {
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
    font-weight: 600; margin-bottom: 4px; color: #c9d8ff;
}
.gallery-label strong { font-family: var(--font-serif); font-size: 28px; }

@media (min-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-item.tall { grid-row: span 2; aspect-ratio: auto; }
    .gallery-item.wide { grid-column: span 2; aspect-ratio: auto; }
}

/* ============ CUSTOM FRAMING ============ */
.studio-section { padding: 120px var(--pad); background: var(--bg-alt); }
.studio-workspace { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; }
@media (min-width: 1100px) { .studio-workspace { grid-template-columns: 1.2fr 0.8fr; gap: 64px; } }

.studio-canvas-wrapper {
    position: sticky; top: 100px; background: #fff; border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06); overflow: hidden; border: 1px solid var(--border);
}
#frameCanvas { display: block; width: 100%; height: 600px; }
.canvas-badge {
    position: absolute; top: 24px; left: 24px; background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px); padding: 8px 16px; border-radius: 40px;
    font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px;
}
.dot { width: 8px; height: 8px; background: var(--brand); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.canvas-dims {
    position: absolute; bottom: 24px; left: 24px; background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px); padding: 12px 20px; border-radius: 8px; font-size: 15px;
}
.canvas-dims strong { margin-left: 8px; font-size: 18px; }

.studio-controls { display: flex; flex-direction: column; gap: 40px; }
.control-step { border-bottom: 1px solid var(--border); padding-bottom: 32px; }
.step-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.step-num { font-family: var(--font-serif); font-size: 24px; font-style: italic; color: var(--brand); width: 32px; }
.step-header h3 { font-family: var(--font-sans); font-size: 20px; font-weight: 600; }

.dim-inputs { display: flex; gap: 20px; }
.input-group { flex: 1; }
.input-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.input-wrap { position: relative; }
.input-wrap input {
    width: 100%; padding: 16px; font-size: 20px; font-family: var(--font-sans);
    border: 1px solid var(--border); border-radius: 4px; background: #fff; outline: none; transition: border 0.2s;
}
.input-wrap input:focus { border-color: var(--brand); }
.input-wrap span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 500; }

.moulding-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.moulding-btn {
    background: #fff; border: 2px solid var(--border); border-radius: 4px;
    padding: 12px; text-align: left; transition: all 0.2s;
}
.moulding-btn.active { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(65, 105, 225, 0.1); }
.swatch { width: 100%; height: 40px; border-radius: 2px; margin-bottom: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.m-name { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.m-width { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.mat-selector {
    display: flex; background: #fff; border: 1px solid var(--border);
    border-radius: 4px; padding: 4px; margin-bottom: 20px;
}
.mat-selector button {
    flex: 1; padding: 12px; font-size: 15px; font-weight: 600;
    color: var(--text-muted); border-radius: 2px; transition: all 0.2s;
}
.mat-selector button.active { background: var(--text); color: #fff; }

.mat-slider { margin-top: 20px; }
.slider-header { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.slider-header strong { color: var(--brand); }
input[type=range] { width: 100%; height: 4px; background: var(--border); border-radius: 2px; -webkit-appearance: none; outline: none; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 20px; height: 20px;
    background: var(--text); border-radius: 50%; cursor: pointer;
}

.glazing-list { display: flex; flex-direction: column; gap: 12px; }
.glazing-btn {
    display: flex; align-items: center; padding: 20px; background: #fff;
    border: 2px solid var(--border); border-radius: 4px; text-align: left; transition: all 0.2s;
}
.glazing-btn.active { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(65, 105, 225, 0.1); }
.radio { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 50%; margin-right: 16px; position: relative; flex-shrink: 0; }
.glazing-btn.active .radio { border-color: var(--brand); }
.glazing-btn.active .radio::after { content: ''; position: absolute; inset: 3px; background: var(--brand); border-radius: 50%; }
.g-info strong { display: block; font-size: 16px; font-weight: 700; }
.g-info span { font-size: 14px; color: var(--text-muted); }

.checkout-panel {
    background: #fff; padding: 32px; border-radius: 8px; border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04); position: sticky; bottom: 24px;
}
.price-breakdown { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.p-row { display: flex; justify-content: space-between; font-size: 15px; color: var(--text-muted); }
.p-row span:last-child { font-weight: 600; color: var(--text); }
.total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.total-row span { font-size: 16px; font-weight: 700; }
.total-row strong { font-family: var(--font-serif); font-size: 32px; color: var(--brand); }

/* Mobile Sticky Canvas Fix */
@media (max-width: 1024px) {
    .studio-canvas-wrapper {
        position: sticky;
        top: 80px; /* Below the main nav */
        z-index: 10;
        height: auto;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    #frameCanvas {
        height: 280px;
    }
    .checkout-panel {
        position: relative;
        bottom: auto;
        margin-top: 24px;
    }
    .studio-section {
        padding: 80px var(--pad);
    }
    .studio-workspace {
        gap: 24px;
    }
}

/* ============ ARTISTS & BUSINESS ============ */
.craft-section { padding: 120px 0; background: #111; color: #fff; }
.craft-inner { padding: 0 var(--pad); display: grid; grid-template-columns: 1fr; gap: 64px; align-items: center; }
@media (min-width: 1024px) { .craft-inner { grid-template-columns: 1fr 1fr; } }
.craft-text h2 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 24px; color: #fff; }
.craft-text p { font-size: 18px; color: #aaa; margin-bottom: 40px; max-width: 480px; }
.craft-text .btn-outline-dark { border-color: #fff; color: #fff; }
.craft-text .btn-outline-dark:hover { background: #fff; color: #111; }
.craft-images { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.craft-images img { height: 400px; border-radius: 4px; }

/* ============ SUBSCRIPTIONS ============ */
.stories-section { padding: 120px var(--pad); background: #fff; }
.stories-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 24px; }
@media (min-width: 768px) { .stories-grid { grid-template-columns: repeat(3, 1fr); } }
.story-card { background: var(--bg-alt); padding: 32px; border-radius: 8px; }
.story-card p { font-size: 16px; color: var(--text-muted); font-style: italic; margin-bottom: 24px; line-height: 1.7; }
.story-card strong { font-size: 15px; color: var(--brand); text-transform: uppercase; letter-spacing: 0.05em; }

/* ============ FOOTER ============ */
.footer { padding: 80px 0 0; background: var(--bg-alt); color: var(--text); border-top: 1px solid var(--border); padding-bottom: 80px; }
@media (min-width: 1024px) { .footer { padding-bottom: 0; } }
.footer-inner { padding: 0 var(--pad); display: grid; grid-template-columns: 1fr; gap: 48px; margin-bottom: 64px; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer-logo { width: 130px; margin-bottom: 24px; }
.footer-brand p { color: var(--text-muted); max-width: 300px; font-size: 15px; }
.footer-links h4 { font-family: var(--font-sans); font-size: 16px; font-weight: 700; margin-bottom: 24px; color: var(--text); }
.footer-links a { display: block; color: var(--text-muted); margin-bottom: 12px; font-size: 15px; transition: color 0.2s; }
.footer-links a:hover { color: var(--brand); }

.footer-bottom {
    padding: 24px var(--pad); border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    color: var(--text-muted); font-size: 14px; flex-wrap: wrap; gap: 16px;
}
.footer-lang-dropdown { position: relative; }
.footer-lang-btn {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-muted); font-weight: 500; font-size: 14px; transition: color 0.2s;
}
.footer-lang-btn:hover { color: var(--brand); }
.footer-lang-menu {
    position: absolute; bottom: 100%; right: 0; margin-bottom: 12px;
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    display: none; flex-direction: column; min-width: 140px;
    padding: 6px; box-shadow: 0 -10px 30px rgba(0,0,0,0.08);
}
.footer-lang-dropdown.open .footer-lang-menu { display: flex; }
.footer-lang-menu a {
    padding: 10px 16px; font-size: 14px; color: var(--text-muted);
    border-radius: 4px; transition: all 0.2s;
}
.footer-lang-menu a:hover { background: var(--bg-alt); color: var(--brand); }

/* ============ FIXED BOTTOM NAVIGATION (Mobile) ============ */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    width: 100%;
    height: 100%;
    transition: color 0.2s;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:active {
    color: var(--brand);
}

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

/* Cart specific styling */
.cart-btn {
    position: relative;
}
.cart-icon-wrap {
    position: relative;
}
.cart-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--brand);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.cart-btn span#bottomTotal {
    font-weight: 600;
    font-size: 11px;
    color: var(--brand);
}

@media (min-width: 1024px) {
    .mobile-bottom-nav { display: none; }
}

/* ============ FLOATING SOCIAL REMOVED ============ */