:root {
    --ivory: #f7f3ea;
    --linen: #ebe2d1;
    --paper: #fffaf1;
    --navy: #172435;
    --charcoal: #252525;
    --olive: #5c6a4a;
    --burgundy: #7b2430;
    --brass: #b89458;
    --muted: #776f62;
    --line: rgba(37, 37, 37, .14);
    --shadow: 0 22px 60px rgba(23, 36, 53, .12);
    --serif: Georgia, "Times New Roman", serif;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--charcoal);
    background: var(--ivory);
    font-family: var(--sans);
    line-height: 1.6;
}

.site-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-body > main {
    flex: 1;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(170px, 1fr) auto minmax(82px, 1fr);
    align-items: center;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    background: rgba(247, 243, 234, .92);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(184, 148, 88, .46);
    background: var(--paper);
    overflow: hidden;
}

.brand-mark img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: contrast(1.8) sepia(.25) saturate(1.3) brightness(.65);
}

.brand-name {
    font-family: var(--serif);
    font-size: 1.45rem;
    color: var(--navy);
}

.site-nav,
.header-actions,
.language-switcher {
    display: flex;
    align-items: center;
}

.site-nav {
    gap: 28px;
    color: var(--navy);
    font-size: .9rem;
}

.site-nav a,
.admin-link {
    border-bottom: 1px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.site-nav a:hover,
.admin-link:hover {
    color: var(--burgundy);
    border-color: var(--brass);
}

.header-actions {
    justify-content: flex-end;
    gap: 16px;
}

.language-switcher {
    position: relative;
    gap: 8px;
    min-width: 78px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    background: rgba(255, 250, 241, .66);
}

.language-switcher span {
    color: var(--navy);
    font-size: .78rem;
    font-weight: 800;
}

.language-switcher select {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

.language-switcher::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1px solid var(--brass);
    border-bottom: 1px solid var(--brass);
    transform: rotate(45deg) translateY(-2px);
}

.hero {
    min-height: 82vh;
    display: grid;
    align-items: center;
    padding: 96px clamp(22px, 6vw, 86px);
    color: var(--paper);
    background-color: var(--navy);
    background-position: center 46%;
    background-size: cover;
}

.hero-content {
    width: min(680px, 100%);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--brass);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    color: inherit;
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0;
}

.hero h1 {
    max-width: 640px;
    font-size: clamp(3.4rem, 6vw, 6.7rem);
}

.hero p:not(.eyebrow) {
    width: min(560px, 100%);
    margin: 24px 0 32px;
    color: rgba(255, 250, 241, .84);
    font-size: 1.08rem;
}

.button-primary,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.button-primary {
    padding: 12px 22px;
    border: 1px solid var(--brass);
    color: var(--paper);
    background: var(--burgundy);
}

.button-primary:hover {
    transform: translateY(-1px);
    background: var(--navy);
}

.text-link {
    color: var(--burgundy);
    font-weight: 700;
}

.text-link:hover {
    color: var(--navy);
}

.section,
.band,
.catalog-shell,
.legal-copy {
    padding: 72px clamp(18px, 5vw, 72px);
}

.section-heading,
.page-hero {
    max-width: 780px;
    margin-bottom: 34px;
}

.section-heading h2,
.page-hero h1 {
    color: var(--navy);
    font-size: clamp(2.1rem, 4vw, 4rem);
}

.section-heading p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
    color: var(--muted);
}

.band {
    background: var(--linen);
}

.featured-collection {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(260px, 520px);
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
    padding: 72px clamp(18px, 5vw, 72px);
    color: var(--paper);
    background: var(--navy);
}

.featured-collection h2 {
    font-size: clamp(2.3rem, 5vw, 5.2rem);
}

.featured-collection p:not(.eyebrow) {
    width: min(560px, 100%);
    color: rgba(255, 250, 241, .78);
}

.featured-collection img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 1px solid rgba(184, 148, 88, .46);
}

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

.product-card {
    position: relative;
    display: grid;
    grid-template-rows: 340px 1fr;
    min-height: 620px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    cursor: pointer;
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(184, 148, 88, .7);
    box-shadow: var(--shadow);
}

.product-media {
    overflow: hidden;
    background: #ded4c1;
}

.product-media-button {
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease, filter .5s ease;
}

.product-card:hover .product-media img {
    transform: scale(1.035);
    filter: saturate(.9) contrast(1.04);
}

.favorite-button {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 250, 241, .7);
    color: var(--paper);
    background: rgba(23, 36, 53, .58);
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.favorite-button:hover,
.favorite-button.is-saved {
    color: var(--paper);
    background: var(--burgundy);
    transform: translateY(-1px);
}

.favorite-button span {
    font-size: 1.45rem;
    line-height: 1;
}

.favorite-button.is-saved span::before {
    content: "\2665";
    font-size: 1.45rem;
}

.favorite-button.is-saved span {
    font-size: 0;
}

.product-body {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 22px;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
    margin-top: 4px;
}

.quick-view-link {
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
}

.product-body h3 {
    color: var(--navy);
    font-size: 1.6rem;
}

.product-body p {
    margin: 0;
    color: var(--muted);
}

.product-meta {
    display: grid;
    gap: 8px;
    margin: 8px 0 0;
}

.product-meta div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.product-meta dt {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.product-meta dd {
    margin: 0;
    color: var(--navy);
    text-align: right;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.collection-tile {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 22px;
    border: 1px solid rgba(23, 36, 53, .2);
    color: var(--paper);
    background: linear-gradient(135deg, var(--navy), var(--olive));
    transition: transform .2s ease, border-color .2s ease;
}

.collection-tile:hover {
    transform: translateY(-3px);
    border-color: var(--brass);
}

.collection-tile span {
    font-family: var(--serif);
    font-size: 1.65rem;
}

.collection-tile small {
    color: rgba(255, 250, 241, .78);
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.story-card {
    display: grid;
    grid-template-rows: 260px 1fr;
    border-bottom: 1px solid var(--line);
    background: var(--ivory);
}

.story-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-card div {
    padding: 18px 0;
}

.story-card h3 {
    color: var(--navy);
    font-size: 1.65rem;
}

.story-card p:not(.eyebrow) {
    color: var(--muted);
}

.story-detail {
    padding-bottom: 72px;
    background: var(--ivory);
}

.story-detail-hero {
    width: min(900px, 100%);
    padding: 72px clamp(18px, 5vw, 72px) 34px;
}

.story-detail-hero h1 {
    color: var(--navy);
    font-size: clamp(2.8rem, 5vw, 5.4rem);
}

.story-detail-hero p:not(.eyebrow) {
    color: var(--muted);
    font-size: 1.08rem;
}

.story-detail-hero::after {
    content: "";
    display: block;
    width: 82px;
    height: 1px;
    margin-top: 28px;
    background: var(--brass);
}

.story-detail > img {
    width: calc(100% - clamp(36px, 10vw, 144px));
    max-height: 620px;
    margin: 0 auto;
    object-fit: cover;
}

.story-copy {
    width: min(820px, calc(100% - 36px));
    margin: 42px auto 0;
    color: var(--charcoal);
    font-family: var(--serif);
    font-size: 1.28rem;
    line-height: 1.8;
}

.page-hero.compact {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 72px clamp(18px, 5vw, 72px) 38px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(110deg, rgba(255, 250, 241, .92), rgba(235, 226, 209, .72)),
        var(--linen);
}

.catalog-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
    padding-top: 28px;
}

.filters {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.filters h2 {
    margin: 12px 0 4px;
    color: var(--navy);
    font-family: var(--sans);
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.filters a {
    padding: 8px 10px;
    color: var(--muted);
}

.filters a.is-active,
.filters a:hover {
    color: var(--paper);
    background: var(--navy);
}

.affiliate-note,
.empty-state {
    display: inline-block;
    margin: 12px 0 0;
    padding: 10px 12px;
    border-left: 3px solid var(--brass);
    color: var(--muted);
    background: var(--paper);
}

.product-grid > .empty-state {
    grid-column: 1 / -1;
}

.legal-copy {
    width: min(850px, 100%);
    margin: 0 auto;
    padding-top: 48px;
    padding-bottom: 80px;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 1.18rem;
    line-height: 1.85;
}

.site-footer {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 440px) 1fr;
    gap: 28px;
    padding: 38px clamp(18px, 5vw, 72px);
    border-top: 1px solid var(--line);
    color: var(--paper);
    background: var(--navy);
}

.site-footer p {
    margin: 8px 0 0;
    color: rgba(255, 250, 241, .7);
}

.affiliate-line {
    text-align: center;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
}

.site-footer a {
    color: rgba(255, 250, 241, .76);
}

.site-footer a:hover {
    color: var(--brass);
}

.modal-open {
    overflow: hidden;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 22px;
}

.product-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 36, 53, .62);
    backdrop-filter: blur(8px);
}

.product-modal-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(260px, 430px) minmax(280px, 500px);
    width: min(940px, 100%);
    max-height: calc(100vh - 44px);
    overflow: auto;
    border: 1px solid rgba(184, 148, 88, .45);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.product-modal-panel > img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
}

.product-modal-copy {
    display: grid;
    align-content: center;
    gap: 16px;
    padding: 34px;
}

.product-modal-copy h2 {
    color: var(--navy);
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.product-modal-copy p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
}

.modal-meta {
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    color: var(--navy);
    background: rgba(255, 250, 241, .88);
    cursor: pointer;
    font-size: 1.4rem;
}

.setup-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
    background: var(--ivory);
}

.setup-screen div {
    width: min(720px, 100%);
    padding: 34px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.setup-screen h1 {
    color: var(--navy);
    font-size: 3rem;
}

.setup-screen code {
    display: block;
    margin-top: 18px;
    padding: 12px;
    overflow: auto;
    color: var(--burgundy);
    background: var(--linen);
}

.admin-body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    background: #f2ede4;
}

.admin-body.guest {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 24px;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    color: var(--paper);
    background: var(--navy);
}

.admin-brand .brand-name {
    color: var(--paper);
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
}

.admin-sidebar a,
.link-button {
    color: rgba(255, 250, 241, .76);
}

.admin-sidebar nav a {
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 250, 241, .12);
}

.admin-sidebar a:hover,
.link-button:hover {
    color: var(--brass);
}

.admin-user {
    margin-top: auto;
    color: rgba(255, 250, 241, .56);
    font-size: .86rem;
}

.admin-main {
    padding: 34px;
    overflow: auto;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.admin-header h1 {
    color: var(--navy);
    font-size: 2.8rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.stat-card,
.admin-table-wrap,
.admin-form,
.login-panel {
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 18px 42px rgba(23, 36, 53, .08);
}

.stat-card {
    padding: 22px;
}

.stat-card span {
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    color: var(--navy);
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 500;
}

.stat-card.urgent {
    border-color: rgba(123, 36, 48, .35);
}

.admin-grid-panels {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 18px;
    margin-top: 22px;
}

.admin-panel {
    border: 1px solid var(--line);
    padding: 22px;
    background: var(--paper);
    box-shadow: 0 18px 42px rgba(23, 36, 53, .08);
}

.admin-panel h2 {
    margin-bottom: 14px;
    color: var(--navy);
    font-family: var(--sans);
    font-size: .92rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

.mini-table th,
.mini-table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.admin-table-wrap {
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.actions {
    display: flex;
    gap: 14px;
    align-items: center;
}

.actions form {
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.link-button.danger {
    color: var(--burgundy);
}

.admin-form,
.login-panel {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.login-panel {
    width: min(420px, 100%);
}

.login-panel h1 {
    color: var(--navy);
    font-size: 2.4rem;
}

.login-mark {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: contrast(1.8) sepia(.25) saturate(1.3) brightness(.65);
}

.form-error {
    margin: 0;
    color: var(--burgundy);
}

.form-note {
    margin: -4px 0 0;
    padding: 10px 12px;
    border-left: 3px solid var(--brass);
    color: var(--muted);
    background: #fffdf8;
    font-size: .92rem;
}

label {
    display: grid;
    gap: 7px;
    color: var(--navy);
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    padding: 11px 12px;
    color: var(--charcoal);
    background: #fffdf8;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(184, 148, 88, .38);
    border-color: var(--brass);
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.two,
.admin-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-split {
    display: grid;
    gap: 22px;
    align-items: start;
}

.compact-form {
    align-content: start;
}

.switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.switch-row label,
.admin-form label:has(input[type="checkbox"]) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--burgundy);
}

.translation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

fieldset {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    padding: 16px;
}

legend {
    color: var(--burgundy);
    font-weight: 800;
}

[hidden] {
    display: none !important;
}

@media (max-width: 980px) {
    .site-header,
    .site-footer,
    .catalog-shell,
    .featured-collection,
    .admin-body,
    .admin-split,
    .form-grid.two {
        grid-template-columns: 1fr;
    }

    .site-header {
        position: static;
        justify-items: start;
    }

    .site-nav,
    .header-actions,
    .site-footer nav {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .filters,
    .admin-sidebar {
        position: static;
        height: auto;
    }

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

    .product-modal-panel > img {
        min-height: 320px;
        max-height: 48vh;
    }

    .admin-main {
        padding: 22px;
    }

    .admin-grid-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hero {
        min-height: 74vh;
        padding: 64px 18px;
    }

    .hero h1,
    .setup-screen h1 {
        font-size: 3rem;
    }

    .product-card {
        grid-template-rows: 300px 1fr;
        min-height: 580px;
    }

    .section,
    .band,
    .catalog-shell,
    .legal-copy {
        padding: 48px 18px;
    }
}
