:root {
    --paper: #f3ece1;
    --paper-2: #efe4d4;
    --card: #fbf6ee;
    --ink: #1c1612;
    --muted: #6f6258;
    --line: rgba(28, 22, 18, .12);
    --gold: #b0894a;
    --gold-2: #c9a56a;
    --safelight: #b54732;
    --carbon: #161210;
    --shadow: 0 18px 40px rgba(28, 22, 18, .08);
    --radius: 18px;
    --font: "Manrope", "Segoe UI", sans-serif;
    --display: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(176, 137, 74, .18), transparent 50%),
        radial-gradient(900px 400px at 110% 0%, rgba(181, 71, 50, .1), transparent 46%),
        var(--paper);
    min-height: 100vh;
    line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }

.grain {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}
.film-edge {
    height: 16px;
    background:
        repeating-linear-gradient(90deg, #161210 0 11px, transparent 11px 20px),
        #161210;
    background-size: 20px 16px, 100% 16px;
    box-shadow: inset 0 -6px 0 #c9a56a;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(243, 236, 225, .9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { color: var(--safelight); display: flex; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong {
    font-family: var(--display);
    font-size: 28px;
    letter-spacing: .08em;
    font-weight: 700;
    text-transform: uppercase;
}
.logo-text em {
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .04em;
}
.site-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.site-nav a {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}
.site-nav a:hover, .site-nav a.is-on { background: var(--ink); color: var(--paper); }
.cart-link { position: relative; }
.cart-n {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--safelight);
    color: #fff;
    font-size: 11px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 999px;
    padding: 8px 14px;
}

.flash {
    margin: 18px 0 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: #e7f3e4;
    border: 1px solid #b7d7ad;
}
.flash-error { background: #f8e6e2; border-color: #e3b2a7; }

.hero {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 40px;
    align-items: center;
    padding: 56px 0 28px;
}
.kicker {
    color: var(--safelight);
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
}
h1, h2, h3, .display {
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.08;
    margin: 8px 0 12px;
}
h1 { font-size: clamp(42px, 7vw, 78px); }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: 26px; margin: 0 0 8px; }
.lead { font-size: 18px; color: var(--muted); max-width: 42ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-panel {
    background: var(--carbon);
    color: var(--paper);
    border-radius: 28px;
    padding: 28px;
    min-height: 280px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.hero-panel::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 180px;
    height: 180px;
    border: 18px solid rgba(201, 165, 106, .25);
    border-radius: 50%;
}
.hero-panel .kicker { color: var(--gold-2); }
.hero-panel p { color: #d9cbb8; }
.sprockets {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}
.sprockets span {
    width: 14px;
    height: 10px;
    background: #2b241f;
    border-radius: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    background: var(--ink);
    color: var(--paper);
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
}
.btn:hover { background: #2c241e; }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
}
.btn-safelight { background: var(--safelight); color: #fff; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.section { padding: 42px 0; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 22px;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.card, .ad-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.card-media, .ad-media {
    aspect-ratio: 4 / 3;
    background: #2a221c;
    position: relative;
    overflow: hidden;
}
.card-media img, .ad-media img, .ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-2);
    font-family: var(--display);
    font-size: 64px;
    background:
        radial-gradient(circle at 30% 20%, rgba(201,165,106,.35), transparent 40%),
        #231c18;
}
.card-body, .ad-body { padding: 16px 18px 18px; }
.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.muted { color: var(--muted); margin: 0; }
.price { font-weight: 700; }
.price s { color: var(--muted); font-weight: 500; margin-left: 8px; }
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--safelight);
    color: #fff;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 5px 8px;
    border-radius: 999px;
    font-weight: 700;
}
.ad-body .badge { position: static; display: inline-block; margin-bottom: 8px; }
.ad-card { display: grid; grid-template-columns: 140px 1fr; min-height: 160px; }
.ad-card .ad-media { aspect-ratio: auto; min-height: 160px; }
.ad-list { display: grid; gap: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.35);
    border: 1px solid var(--line);
}
.step b {
    font-family: var(--display);
    font-size: 32px;
    color: var(--gold);
    display: block;
}

.cta {
    background: var(--carbon);
    color: var(--paper);
    border-radius: 28px;
    padding: 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.cta p { color: #d9cbb8; }

.site-footer {
    margin-top: 48px;
    background: var(--carbon);
    color: #d9cbb8;
    padding: 40px 0 20px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-brand {
    font-family: var(--display);
    color: var(--paper);
    font-size: 32px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.site-footer h2 { color: var(--paper); font-size: 22px; }
.site-footer a { color: var(--gold-2); text-decoration: none; }
.footer-copy { margin-top: 28px; font-size: 13px; color: #8a7d70; padding-bottom: 12px; }

.page-hero { padding: 36px 0 8px; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: start; }
.form, .panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}
label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="time"], input[type="number"], input[type="password"], select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 11px 12px;
}
textarea { min-height: 120px; resize: vertical; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.help { font-size: 13px; color: var(--muted); }
.help a { color: var(--safelight); }
.error { color: var(--safelight); font-size: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 22px; }
.filters a {
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
}
.filters a.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.product-hero { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; }
.product-photo {
    background: #231c18;
    border-radius: 24px;
    overflow: hidden;
    min-height: 360px;
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.qty-row { display: flex; gap: 10px; align-items: center; }
.qty-row input { width: 88px; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #231c18; }
.total { font-size: 22px; font-family: var(--display); }

.thanks {
    text-align: center;
    padding: 48px 20px;
    background: var(--card);
    border-radius: 28px;
    border: 1px solid var(--line);
}
.thanks .num {
    font-family: var(--display);
    font-size: 48px;
    color: var(--safelight);
}

.empty {
    padding: 40px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }

.contact-map {
    border-radius: 24px;
    overflow: hidden;
    background: #231c18;
    color: var(--gold-2);
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
}

body.consent-pending { overflow: hidden; }
.consent {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(22, 18, 16, .72);
}
.consent-card {
    width: min(720px, 100%);
    max-height: min(88vh, 860px);
    overflow: auto;
    background: var(--card);
    border-radius: 24px;
    padding: 28px 26px 22px;
    box-shadow: var(--shadow);
}
.consent-text,
.consent-doc {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.6;
}
.consent-text {
    max-height: 42vh;
    overflow: auto;
    margin: 14px 0 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.consent-doc { margin: 0; }
.consent-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}
.consent-check input { margin-top: 3px; width: auto; }

@media (max-width: 900px) {
    .hero, .grid-3, .steps, .footer-grid, .split, .product-hero, .ad-card { grid-template-columns: 1fr; }
    .cta { flex-direction: column; align-items: flex-start; }
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 84px;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 10px;
        flex-direction: column;
        align-items: stretch;
        box-shadow: var(--shadow);
    }
    .site-nav.is-open { display: flex; }
    .header-inner { position: relative; }
    .card-media, .ad-media { min-height: 180px; }
}

@media (max-width: 520px) {
    h1 { font-size: 40px; }
    .hero { padding-top: 28px; }
    .cart-table th:nth-child(3), .cart-table td:nth-child(3) { display: none; }
}
