:root {
    color-scheme: light;
    --background: #eee6d9;
    --panel: #f8f3ea;
    --stone: #e3d5c5;
    --border: #cbbba8;
    --text: #30251e;
    --muted: #655345;
    --dark: #493427;
    --serif: Georgia, serif;
}

* { box-sizing: border-box; }

html { background: #bfa083 linear-gradient(120deg, #c6aa8e, #b39477); }

body {
    color: var(--text);
    font: 1rem/1.6 Arial, sans-serif;
    overflow-wrap: anywhere;
}

a { color: var(--text); text-underline-offset: .25em; }
a:hover { color: #765437; }
:focus-visible { outline: 2px solid #85582f; outline-offset: 4px; }

h1, h2, .brand { font-family: var(--serif); }
h1, h2 { font-weight: normal; line-height: 1.07; }
h1 { font-size: clamp(2.4rem, 5vw, 4.7rem); margin: 0 0 .35em; }
h2 { font-size: clamp(2rem, 3.8vw, 3.5rem); margin: 0 0 .6em; }
p { margin: 0 0 1em; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:lang(zh-Hant) { --serif: "Noto Serif CJK TC", "Songti TC", "PMingLiU", "Microsoft JhengHei", serif; }

.site-frame {
    --frame-width: min(85%, 90rem);
    display: flex;
    flex-direction: column;
    width: var(--frame-width);
    min-height: 100vh;
    margin: 0 auto;
    background: var(--background);
}
.site-frame::before, .site-frame::after {
    content: "";
    position: fixed;
    inset-block: 1rem;
    width: calc((100% - var(--frame-width)) / 2);
    background: url("../decor/marble-column.webp") center / contain no-repeat;
    pointer-events: none;
}
.site-frame::before { left: 0; }
.site-frame::after { right: 0; transform: scaleX(-1); }
.container { width: calc(100% - 2 * clamp(1.25rem, 4vw, 4.25rem)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--border); }
.header-row, .actions, .filters, .admin-bar, nav { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.5rem; }
.admin-bar { justify-content: space-between; }
.header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .75rem clamp(1rem, 3vw, 3rem);
    min-height: 5.25rem;
    padding-block: .95rem;
}
.brand { justify-self: start; color: var(--text); font-size: clamp(1.4rem, 2.8vw, 2rem); line-height: 1.1; text-decoration: none; }
.brand img { max-width: min(12rem, 100%); max-height: 3.35rem; width: auto; object-fit: contain; }
nav a { color: var(--muted); }
.site-header nav a { text-decoration: none; font-size: .95rem; }
.main-nav a { padding-block: .4rem; }
.site-header nav a:hover, nav a[aria-current] { color: var(--text); text-decoration: underline; }
.site-header .language-switch { gap: .4rem .85rem; border-inline-start: 1px solid var(--border); padding-inline-start: clamp(1rem, 3vw, 2.5rem); }
.site-header .language-switch a { padding-block: .4rem; white-space: nowrap; font-size: .85rem; }
.site-header .language-switch a[aria-current] { font-weight: 700; }
main { flex: 1; padding-block: clamp(2.25rem, 5vw, 4.25rem) clamp(3rem, 8vw, 6rem); }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.footer-content { padding-block: 1.5rem; }
.company-details { margin-bottom: 1.25rem; }
.company-details strong { color: var(--text); font-weight: 600; }
.company-details address { margin-top: .25rem; font-style: normal; white-space: pre-line; }

.home { padding-top: clamp(1.5rem, 4vw, 3.5rem); }
.hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: clamp(1.75rem, 4.5vw, 4.5rem);
}
.hero-copy { container-type: inline-size; }
.hero h1 { font-size: clamp(2.25rem, 12cqi, 4.7rem); letter-spacing: -.04em; text-wrap: balance; }
.hero-copy > p, .order-intro { max-width: 32rem; color: var(--muted); }
.hero-figure { margin: 0; }
.hero-media { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-figure figcaption { margin-top: .55rem; color: var(--muted); font-size: .85rem; }
.photo-preset {
    background: radial-gradient(ellipse at 35% 22%, var(--panel), var(--stone) 84%);
    display: grid;
    place-items: center;
}
.photo-preset::after {
    content: "";
    width: 28%;
    aspect-ratio: 1;
    border: 1px solid #b29b84;
    border-radius: 50%;
}
.actions { margin-top: 1.85rem; }
.home-section { margin-top: clamp(2.75rem, 5vw, 5rem); padding-top: clamp(1.5rem, 3vw, 2.75rem); border-top: 1px solid var(--border); }
.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 1.3rem;
}
.section-heading h2 { margin: 0; }
.bespoke-section {
    margin-inline: clamp(-2rem, -2vw, -.75rem);
    padding: clamp(1.5rem, 3vw, 2.75rem) clamp(.75rem, 2vw, 2rem);
    background: #f8f2e3;
}
.bespoke-section .section-heading { margin-bottom: .65rem; }
.bespoke-section h2 { scroll-margin-top: 1.25rem; }
.bespoke-intro { color: var(--muted); margin-bottom: clamp(1.5rem, 3.5vw, 3rem); }
.bespoke-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 4vw, 4.5rem);
}
.bespoke-piece {
    display: block;
    break-inside: avoid;
    margin: 0 0 clamp(1.65rem, 4vw, 4rem);
    text-decoration: none;
}
.bespoke-piece:hover .bespoke-caption { text-decoration: underline; }
.bespoke-photo { width: 100%; height: auto; object-fit: cover; background: var(--stone); }
.bespoke-photo--wide { aspect-ratio: 5 / 3; }
.bespoke-photo--square { aspect-ratio: 1; }
.bespoke-photo--tall { aspect-ratio: 4 / 5; }
.bespoke-caption {
    display: flex;
    justify-content: space-between;
    gap: .35rem;
    padding-block: .65rem .35rem;
    font: 1.05rem/1.4 var(--serif);
}
.catalog-heading { margin-bottom: 2rem; }
.filters { margin-top: 1.25rem; border-block: 1px solid var(--border); gap: .25rem 1.75rem; }
.filters a { border-bottom: 2px solid transparent; padding-block: .7rem; text-decoration: none; }
.filters a[aria-current] { border-color: var(--dark); text-decoration: none; }

.button, button {
    display: inline-block;
    padding: .72rem 1.25rem;
    border: 1px solid var(--dark);
    background: var(--dark);
    color: #fffdf9;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.button:hover, button:hover { background: #654a38; color: #fffdf9; }

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
    gap: 1.75rem clamp(.9rem, 2vw, 1.65rem);
}

.product-card { border-bottom: 1px solid var(--border); padding-bottom: .8rem; }
.product-card a { display: block; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.3; }
.product-card a:hover span { text-decoration: underline; }
.product-card span { display: block; padding-block: .8rem .25rem; }
.product-card p { margin-bottom: 0; color: var(--muted); font-size: .95rem; }
.product-card .buy-form { margin-top: .75rem; }
.product-card .buy-form button { padding: .35rem 1rem; font-size: .9rem; }
.product-media { width: 100%; aspect-ratio: 1; object-fit: contain; background-color: var(--panel); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.5rem; font-size: .9rem; color: var(--muted); }
.product-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 6vw, 6rem); align-items: center; }
.product-detail h1 { font-size: clamp(2.25rem, 4.5vw, 4rem); }
.product-detail .description { max-width: 34rem; border-top: 1px solid var(--border); padding-top: 1.15rem; }
.price { font-size: 1.35rem; color: var(--muted); }
.order-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: start;
    gap: clamp(1.5rem, 5vw, 5rem);
}
.order-copy { container-type: inline-size; }
.order-copy h1:lang(zh-Hant) { font-size: clamp(2rem, 13cqi, 4.7rem); }
.order-intro { margin-block: 1.2rem 1.65rem; }
.enquiry-panel { background: var(--panel); border: 1px solid var(--border); padding: clamp(1rem, 3vw, 2.5rem); }
.enquiry-panel .form { max-width: none; }
.enquiry-panel .notice:last-child { margin-bottom: 0; }
.request-error { max-width: 40rem; }

.cart-items { margin: 1.75rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.cart-item {
    display: grid;
    grid-template-columns: clamp(3.5rem, 8vw, 7rem) minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .75rem 1.25rem;
    padding-block: 1rem;
    border-bottom: 1px solid var(--border);
}
.cart-piece { display: grid; gap: .2rem; }
.cart-piece a { font: 1.25rem var(--serif); }
.cart-piece span, .cart-quantity span { color: var(--muted); font-size: .9rem; }
.cart-actions, .cart-actions form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.cart-actions button { padding: .35rem .65rem; font-size: .9rem; }
.cart-quantity button {
    min-width: 2.5rem;
    min-height: 2.5rem;
    border: 1px solid #a99b89;
    background: var(--panel);
    color: var(--text);
    font-size: 1rem;
}
.cart-quantity button:hover:not(:disabled) { background: var(--stone); }
.cart-quantity-value { min-width: 2.25ch; text-align: center; font-variant-numeric: tabular-nums; }
.cart-quantity button:disabled, .cart-checkout button:disabled {
    border-color: var(--border);
    background: var(--stone);
    color: var(--muted);
    cursor: default;
}
.cart-total { display: flex; justify-content: space-between; gap: 1rem; margin-block: 1.25rem; font-size: 1.15rem; }
.cart-checkout { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: 1rem; }
.cart-checkout p { margin: 0; color: var(--muted); font-size: .9rem; }

.form { display: grid; max-width: 35rem; gap: .4rem; }
.form input, .form textarea, .form select {
    width: 100%;
    padding: .6rem .75rem;
    margin-bottom: .75rem;
    border: 1px solid #a99b89;
    border-radius: .15rem;
    background: #fdfaf4;
    color: var(--text);
    font: inherit;
}

.form button { justify-self: start; }
.form textarea { resize: vertical; }
.notice { max-width: 35rem; padding: .75rem 1rem; border: 1px solid #747966; background: #eeeee4; }
.error { border-color: #a45c50; color: #772c21; background: #faeeea; }
.admin-bar { margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: .65rem; }
.text-button { color: var(--text); text-decoration: underline; background: transparent; border-color: transparent; }
.text-button:hover { color: #675142; background: transparent; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .65rem .8rem; border-bottom: 1px solid var(--border); }
th { background: var(--panel); }
dt { color: var(--muted); }
dd { margin: 0 0 .65rem; }
.description { white-space: pre-wrap; }

.cookie-notice { background: var(--panel); border-bottom: 1px solid var(--border); }
.cookie-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem 1.25rem; padding-block: .65rem; }
.cookie-row p { margin: 0; font-size: .9rem; }
.cookie-row button { padding: .4rem .8rem; font-size: .9rem; }
.cookie-info { font-size: .85rem; }
.cookie-info summary { width: fit-content; padding-block: .25rem; cursor: pointer; }
.cookie-info p { max-width: 40rem; margin: .6rem 0 0; }

@media (max-width: 52rem) {
    .site-frame { --frame-width: 100%; }
    .site-frame::before, .site-frame::after { display: none; }
    .hero, .product-detail, .order-layout { grid-template-columns: minmax(0, 1fr); }
    .hero h1 { font-size: clamp(2.4rem, 8vw, 4.4rem); }
    .order-intro { margin-bottom: 0; }
    .bespoke-gallery { display: block; columns: 2; }
    .bespoke-column { display: contents; }
}

@media (max-width: 40rem) {
    .container { width: calc(100% - 2rem); }
    .header-row { grid-template-columns: minmax(0, 1fr) auto; }
    .brand { grid-column: 1 / -1; }
    .main-nav { gap: .25rem 1rem; }
    .site-header .language-switch { justify-self: end; border: 0; padding: 0; }
    .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cart-item { grid-template-columns: 3.5rem minmax(0, 1fr) auto; }
    .cart-actions { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 22rem) {
    .products { grid-template-columns: minmax(0, 1fr); }
    .bespoke-gallery { columns: 1; }
}
