:root {
    --ink: #38312c;
    --muted: #81766f;
    --paper: #fcf8f5;
    --line: #eadfd8;
    --gold: #c7a65f;
    --gold-deep: #876832;
    --gold-wash: #f2e8d2;
    --blush: #f8eee9;
    --rose: #a96f65;
    --serif: "Bodoni MT", "Didot", "Times New Roman", serif;
    --script: "Segoe Script", "Brush Script MT", cursive;
    --sans: "Trebuchet MS", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: linear-gradient(180deg, #fffdfa 0%, var(--paper) 50%, #fffdfa 100%); color: var(--ink); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.site-header { min-height: 76px; padding: 0 6vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,253,250,.88); }
.wordmark { color: var(--gold-deep); font-family: var(--serif); font-size: 25px; font-style: italic; font-weight: 400; white-space: nowrap; }
.wordmark span { display: inline-block; margin-left: 4px; color: var(--gold); font-family: var(--sans); font-size: 10px; font-style: normal; }
.site-header nav { display: flex; gap: 30px; font-size: 13px; }
.site-header nav a:hover, .back-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-header.admin-topbar { display: grid; height: 76px; min-height: 76px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 0 clamp(20px, 5vw, 68px); background: #fffdfa; }
.admin-brand { display: inline-flex; min-width: 0; height: 100%; align-items: center; gap: 11px; justify-self: start; }
.admin-brand-mark { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid #e6d6b5; background: var(--gold-wash); color: var(--gold-deep); font-family: var(--serif); font-size: 23px; font-style: italic; }
.admin-brand-copy { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.admin-brand-copy strong { color: var(--ink); font-family: var(--serif); font-size: 20px; font-weight: 400; line-height: 1; }
.admin-brand-copy small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.site-header.admin-topbar nav { height: 100%; align-items: center; align-self: stretch; gap: 8px; margin: 0; padding: 0; font-size: 12px; line-height: 1; }
.site-header.admin-topbar nav a { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 13px; white-space: nowrap; }
.site-header.admin-topbar nav .admin-nav-current { background: var(--gold-wash); color: var(--gold-deep); }
.site-header.admin-topbar nav .admin-nav-logout { margin-left: 4px; border-left: 1px solid var(--line); color: var(--muted); }
.admin-nav-short { display: none; }
main { min-height: calc(100vh - 130px); }
.site-footer { min-height: 54px; padding: 18px 6vw; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.catalog-hero { min-height: 280px; padding: 52px 10vw; display: flex; align-items: center; background-color: var(--blush); background-image: repeating-linear-gradient(135deg, transparent 0 25px, rgba(135,104,50,.035) 25px 26px); overflow: hidden; }
.hero-copy { max-width: 620px; animation: rise-in .55s ease-out both; }
.eyebrow { margin: 0 0 17px; color: var(--gold-deep); font-size: 10px; font-weight: 700; letter-spacing: 0; }
.catalog-hero h1 { max-width: 600px; margin: 0; color: var(--gold); font-family: var(--script); font-size: 76px; font-style: normal; font-weight: 400; line-height: .98; }
.hero-description { max-width: 440px; margin: 22px 0; color: #585951; font-size: 15px; line-height: 1.65; }
.text-link { display: inline-flex; align-items: center; gap: 12px; border-bottom: 1px solid currentColor; padding-bottom: 5px; font-size: 13px; font-weight: 700; }
.text-link span { font-size: 17px; }
.catalog-section { padding: 48px 6vw 90px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: 39px; font-weight: 400; }
.catalog-result-count { flex: 0 0 auto; margin: 0 0 10px auto; color: var(--muted); font-size: 11px; }
.search-form { display: flex; min-width: 290px; border-bottom: 1px solid var(--ink); }
.search-form input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 12px 4px; background: transparent; font-size: 12px; }
.search-form button { border: 0; padding: 0 2px 0 12px; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.category-nav { display: flex; gap: 8px; overflow-x: auto; padding: 23px 0 30px; }
.category-chip { flex: 0 0 auto; padding: 9px 14px; border: 1px solid var(--line); border-radius: 3px; color: #50514b; font-size: 11px; transition: background .18s, border-color .18s; }
.category-chip:hover, .category-chip.is-selected { border-color: var(--gold-deep); background: var(--gold-deep); color: white; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 18px; }
.product-card { min-width: 0; animation: rise-in .45s ease-out both; }
.product-card:nth-child(2) { animation-delay: .04s; }
.product-card:nth-child(3) { animation-delay: .08s; }
.product-card:nth-child(4) { animation-delay: .12s; }
.product-image { position: relative; display: grid; aspect-ratio: 4 / 5; place-items: center; overflow: hidden; background: #f0e5dc; }
.product-image--1 { background-color: #eee6d9; }
.product-image--2 { background-color: #f1e2de; }
.product-image--3 { background-color: #eee9df; }
.product-image img, .detail-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.product-image:hover img { transform: scale(1.035); }
.image-placeholder { display: grid; width: 40%; aspect-ratio: 1; place-items: center; border: 1px solid rgba(135,104,50,.4); border-radius: 50%; color: var(--gold-deep); font-family: var(--serif); font-size: 54px; }
.image-index { position: absolute; top: 12px; left: 12px; padding: 5px 7px; background: var(--paper); font-size: 9px; }
.product-card-copy { padding: 13px 2px 0; }
.product-categories { display: flex; flex-wrap: wrap; gap: 6px 11px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.product-categories a:hover { color: var(--ink); text-decoration: underline; }
.product-card h3 { margin: 8px 0 5px; font-family: var(--serif); font-size: 22px; font-weight: 400; line-height: 1.1; }
.product-price { margin: 0; font-size: 12px; font-weight: 700; }
.product-price span, .detail-price span { color: var(--muted); font-size: 9px; font-weight: 500; }
.empty-state { max-width: 540px; margin: 40px auto 90px; padding: 60px 24px; text-align: center; }
.empty-mark { display: block; margin-bottom: 12px; color: var(--gold); font-size: 32px; }
.empty-state h3, .empty-state h1 { margin: 0 0 9px; font-family: var(--serif); font-size: 32px; font-weight: 400; }
.empty-state p { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.detail-shell { max-width: 1180px; margin: 0 auto; padding: 38px 6vw 85px; }
.back-link { display: inline-block; margin-bottom: 25px; color: var(--muted); font-size: 12px; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .8fr); align-items: center; gap: clamp(38px, 8vw, 110px); }
.detail-image { display: grid; min-height: 420px; aspect-ratio: 4 / 4.5; place-items: center; overflow: hidden; background: #f0e5dc; }
.detail-copy h1 { margin: 14px 0; font-family: var(--serif); font-size: 58px; font-weight: 400; line-height: 1; }
.detail-price { margin: 0 0 26px; font-size: 16px; font-weight: 700; }
.detail-description { max-width: 430px; margin-bottom: 28px; color: #55564f; font-size: 14px; line-height: 1.8; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 48px; padding: 0 20px; border: 1px solid var(--ink); font-size: 12px; font-weight: 700; }
.button-accent { border-color: var(--gold); background: var(--gold-wash); color: var(--ink); }
.button-accent:hover { background: #e8d8b7; }
.purchase-note, .contact-note { color: var(--muted); font-size: 10px; line-height: 1.5; }
.contact-note { margin-top: 16px; font-size: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.auth-page { display: grid; min-height: calc(100svh - 130px); place-items: center; padding: 22px 16px 36px; }
.auth-shell { width: min(100%, 440px); margin: 0 auto; padding: 0; }
.auth-return { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; margin: 0 0 12px 2px; color: var(--gold-deep); font-size: 12px; }
.auth-card { position: relative; overflow: hidden; padding: 30px; border: 1px solid var(--line); background: #fffdfa; }
.auth-card::before { position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--gold), #ead9b4, var(--gold)); content: ""; }
.auth-card > .eyebrow { margin: 0 0 8px; }
.auth-card h1 { margin: 0; font-family: var(--serif); font-size: 38px; font-weight: 400; line-height: 1.05; }
.auth-description { margin: 10px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-error { margin: 0 0 18px; padding: 12px; border: 1px solid #e6c9c1; background: #fbefeb; color: #7d4840; font-size: 12px; line-height: 1.45; }
.auth-form { display: grid; gap: 17px; }
.auth-field label { display: block; margin: 0 0 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
.auth-field input { display: block; width: 100%; min-height: 50px; padding: 12px; border: 1px solid var(--line); border-radius: 2px; background: white; color: var(--ink); font-size: 16px; }
.auth-field input:focus { border-color: var(--gold-deep); outline: 2px solid rgba(199,166,95,.25); outline-offset: 1px; }
.auth-submit { width: 100%; min-height: 52px; margin-top: 4px; border: 0; border-radius: 2px; background: var(--gold-deep); color: white; font-size: 14px; font-weight: 700; cursor: pointer; }
.auth-submit:hover { background: #72572c; }
.auth-submit:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.auth-switch { margin: 21px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.auth-switch a { margin-left: 4px; color: var(--gold-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.admin-shell { max-width: 1200px; margin: 0 auto; padding: 42px 6vw 80px; }
.admin-shell h1, .admin-shell h2 { font-family: var(--serif); font-weight: 400; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-heading h1 { margin: 0; font-size: 38px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th, .admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-actions a, .admin-actions button { border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 11px; text-decoration: underline; cursor: pointer; }
.admin-form { max-width: 720px; }
.admin-form label { display: block; margin: 15px 0 6px; font-size: 12px; font-weight: 700; }
.admin-form input:not([type=checkbox]), .admin-form textarea, .admin-form select { width: 100%; min-height: 42px; padding: 10px; border: 1px solid var(--line); background: white; }
.admin-form textarea { min-height: 135px; resize: vertical; }
.admin-form .category-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.admin-form .category-option { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); font-size: 12px; }
.admin-form .category-option label { margin: 0; font-weight: 400; }
.form-help { color: var(--muted); font-size: 10px; }
.notice { margin: 16px 0; padding: 12px 14px; border-left: 3px solid var(--gold); background: #f7f0e2; font-size: 12px; }
.notice-error { border-color: var(--rose); background: #fbefeb; }
.notice ul { margin: 0; padding-left: 18px; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.admin-toolbar form { display: flex; gap: 8px; }
.admin-toolbar input { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); }
.admin-toolbar button { padding: 0 13px; border: 0; background: var(--gold-deep); color: white; }
.button-dark { background: var(--ink); color: white; }
.status-label { display: inline-block; padding: 4px 7px; background: var(--gold-wash); color: var(--gold-deep); font-size: 9px; }
.status-label.is-inactive { background: #e6e5df; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: #fffdfa; }
.admin-table { min-width: 760px; }
.admin-table th { padding: 14px 16px; background: #f7f1e8; }
.admin-table td { padding: 15px 16px; }
.admin-table tbody tr { transition: background .16s ease; }
.admin-table tbody tr:hover { background: #fcf7ee; }
.admin-product-name { font-family: var(--serif); font-size: 17px; }
.admin-product-price { white-space: nowrap; font-weight: 700; }
.admin-actions { gap: 14px; }
.admin-actions a:hover, .admin-actions button:hover { color: var(--gold-deep); text-decoration-thickness: 2px; }
.admin-empty { padding: 34px 16px !important; color: var(--muted); text-align: center !important; }
.access-denied { position: relative; display: grid; min-height: min(680px, calc(100svh - 130px)); grid-template-columns: minmax(110px, .36fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 6vw, 84px); overflow: hidden; }
.access-denied::before { position: absolute; top: 11%; bottom: 11%; left: 31%; width: 1px; background: var(--line); content: ""; }
.access-denied-mark { color: var(--gold); font-family: var(--serif); font-size: clamp(56px, 9vw, 112px); font-style: italic; line-height: .9; }
.access-denied-copy { position: relative; max-width: 580px; padding: 30px 0; }
.access-denied-copy h1 { margin: 0 0 15px; font-family: var(--serif); font-size: clamp(36px, 5vw, 58px); font-weight: 400; line-height: 1.02; }
.access-denied-copy > p:not(.eyebrow) { max-width: 440px; color: #585951; font-size: 15px; line-height: 1.65; }
.access-denied-hint { margin: 17px 0 24px; }
.access-denied .button { margin-top: 12px; }
.access-denied .button span { color: var(--gold); }

@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .catalog-hero { padding: 48px 7vw; }
}

@media (max-width: 650px) {
    .site-header { min-height: 0; align-items: stretch; flex-direction: column; gap: 10px; padding: 13px 20px 12px; }
    .wordmark { font-size: 22px; }
    .wordmark span { font-size: 9px; }
    .site-header nav { justify-content: flex-end; gap: 22px; font-size: 11px; }
    .site-header.admin-topbar { height: 68px; min-height: 68px; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 12px; }
    .admin-brand { gap: 7px; }
    .admin-brand-mark { width: 32px; height: 32px; flex-basis: 32px; font-size: 20px; }
    .admin-brand-copy strong { font-size: 17px; }
    .admin-brand-copy small { display: none; }
    .site-header.admin-topbar nav { flex: 0 0 auto; gap: 2px; font-size: 10px; }
    .site-header.admin-topbar nav a { min-height: 38px; padding: 0 7px; }
    .site-header.admin-topbar nav .admin-nav-logout { margin-left: 1px; }
    .admin-nav-full { display: none; }
    .admin-nav-short { display: inline; }
    .catalog-hero { min-height: 0; padding: 32px 20px 36px; }
    .catalog-hero h1 { font-size: 42px; line-height: 1.02; }
    .catalog-section { padding: 30px 20px 65px; }
    .section-heading { align-items: stretch; flex-direction: column; }
    .section-heading h2 { font-size: 34px; }
    .catalog-result-count { margin: -12px 0 0; }
    .search-form { width: 100%; }
    .category-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-right: 0; padding: 18px 0 24px; overflow: visible; }
    .category-chip { display: flex; min-width: 0; min-height: 44px; align-items: center; justify-content: center; padding: 9px 10px; text-align: center; line-height: 1.3; white-space: normal; }
    .category-chip:last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 4.5px); }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
    .product-card h3 { font-size: 19px; }
    .product-image { aspect-ratio: 3 / 4; }
    .detail-shell { padding: 27px 20px 60px; }
    .product-detail { grid-template-columns: 1fr; gap: 28px; }
    .detail-image { min-height: 0; aspect-ratio: 4 / 4.2; }
    .detail-copy h1 { font-size: 42px; }
    .admin-shell { padding: 30px 20px 60px; }
    .admin-heading, .admin-toolbar { align-items: stretch; flex-direction: column; }
    .admin-heading h1 { font-size: 33px; }
    .admin-toolbar form { width: 100%; }
    .admin-toolbar input { flex: 1; min-width: 0; }
    .admin-table-wrap { margin-right: 0; overflow: visible; border: 0; background: transparent; }
    .admin-table { display: block; min-width: 0; border-collapse: separate; }
    .admin-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .admin-table tbody { display: grid; gap: 12px; }
    .admin-table tbody tr:not(.admin-table-empty) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding: 4px 14px; border: 1px solid var(--line); background: #fffdfa; }
    .admin-table tbody tr:not(.admin-table-empty):hover { background: #fffdfa; }
    .admin-table td { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 5px; padding: 11px 0; overflow-wrap: anywhere; white-space: normal; }
    .admin-table td::before { color: var(--muted); content: attr(data-label); font-size: 9px; font-weight: 700; text-transform: uppercase; }
    .admin-table td:nth-child(1), .admin-table td:nth-child(2), .admin-table td:nth-child(5) { grid-column: 1 / -1; }
    .admin-product-name { font-size: 20px; }
    .admin-table-empty { display: block; padding: 0 14px; border: 1px solid var(--line); background: #fffdfa; }
    .admin-table-empty .admin-empty { display: block; border: 0; }
    .admin-actions { gap: 8px; }
    .admin-actions a, .admin-actions button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); text-decoration: none; }
    .access-denied { min-height: calc(100svh - 120px); grid-template-columns: 1fr; align-content: center; gap: 15px; padding-top: 34px; padding-bottom: 48px; }
    .access-denied::before { top: 0; right: 20px; bottom: auto; left: 20px; width: auto; height: 1px; }
    .access-denied-mark { font-size: 58px; }
    .access-denied-copy { padding: 0; }
    .access-denied-copy h1 { font-size: 40px; }
    .access-denied-copy > p:not(.eyebrow) { font-size: 14px; }
    .admin-form .category-options { grid-template-columns: 1fr; }
    .auth-page { min-height: calc(100svh - 116px); padding: 14px 16px 24px; }
    .auth-return { margin-bottom: 8px; }
    .auth-card { padding: 24px 20px; }
    .auth-card h1 { font-size: 34px; }
    .auth-description { margin-bottom: 20px; }
    .auth-form { gap: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}