:root {
    --paper: #fafbf8;
    --surface: #eef1eb;
    --ink: #202d28;
    --muted: #56625b;
    --line: #d8ded6;
    --accent: #51664f;
    --hero: #1c2925;
    --sage: #c4d4b6;
    --white: #fff;
    --radius: 1.65rem;
    color: var(--ink);
    background: var(--paper);
    font: 1rem/1.55 Geist, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3, legend { letter-spacing: -.045em; font-weight: 650; line-height: 1.1; }
small { font-size: .875rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { color: var(--ink); background: #d7e1ce; }

.wrap { width: min(100% - 5rem, 1232px); margin-inline: auto; }
.skip-link { position: absolute; top: 0; left: 1rem; z-index: 5; padding: .65rem 1rem; transform: translateY(-120%); background: var(--ink); color: var(--white); }
.skip-link:focus { transform: none; }
.screen-reader-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-header { border-bottom: 1px solid var(--line); }
.staff-context { background: var(--surface); border-bottom: 1px solid var(--line); }
.staff-context .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; padding-block: .38rem; font-size: .875rem; }
.header-inner, .brand-group, .header-actions, .footer-inner { display: flex; align-items: center; }
.header-inner { min-height: 3.15rem; justify-content: space-between; gap: .65rem; }
.brand-group, .header-actions { gap: .75rem; min-width: 0; white-space: nowrap; }
.brand { border-radius: .25rem; text-decoration: none; font: 1.17rem/1.05 Georgia, serif; letter-spacing: -.045em; }
.brand-divider { width: 1px; height: 1.2rem; background: var(--line); }
.shop-name { font-weight: 650; text-decoration: none; }
.header-actions form { margin: 0; }
.header-link, .account-name { font-size: .9rem; color: var(--muted); }
.header-link:not(:hover) { text-decoration: none; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: .66rem 1.25rem;
    border-radius: .8rem;
    border: 1px solid transparent;
    background: var(--hero);
    color: var(--white);
    font-weight: 650;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: #32483a; }
.button.compact { min-height: 2.65rem; padding: .42rem 1rem; font-size: .9rem; }
.header-actions .button.compact { min-height: 2rem; padding: .24rem .58rem; }
.button.outline { color: var(--ink); border-color: var(--line); background: var(--white); }
.button.outline:hover { background: var(--surface); border-color: var(--accent); }
.button:disabled { cursor: not-allowed; border-color: var(--line); background: var(--surface); color: var(--muted); }
.cart-link { gap: .45rem; }
.cart-link span { display: grid; place-items: center; min-width: 1.28rem; height: 1.28rem; padding-inline: .22rem; border-radius: 1rem; background: var(--sage); color: var(--hero); font-size: .77rem; }

.eyebrow { font-size: .77rem; font-weight: 750; letter-spacing: .12em; line-height: 1.5; text-transform: uppercase; }

.login-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 56rem;
    margin: 3rem auto;
    padding: clamp(1.25rem, 4vw, 2.75rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}
.login-section h1, .quote-panel h2 { font-size: clamp(1.65rem, 2.8vw, 2.2rem); }
.login-section p { margin-top: .65rem; color: var(--muted); max-width: 26rem; }
.login-form { display: grid; gap: .8rem; }
.login-form .button { justify-self: start; }

.shop-title { margin-block: 1.6rem .85rem; font-size: clamp(1.9rem, 3.4vw, 2.65rem); }
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(19.5rem, .58fr); align-items: start; gap: clamp(1.5rem, 4vw, 3rem); margin-bottom: 3.5rem; }
.catalog { min-width: 0; border: 0; padding: 0; margin: 0; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .78rem; }
.product {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: .8rem .85rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--white);
    cursor: pointer;
}
.product:hover { border-color: var(--accent); }
.product:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.product:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.product input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.product-info { display: flex; justify-content: space-between; align-items: center; gap: .35rem; }
.product-info strong, .product-info small { display: block; }
.product-info strong { font-size: .96rem; line-height: 1.23; letter-spacing: -.015em; overflow-wrap: anywhere; }
.product-info small { margin-top: .27rem; color: var(--muted); }
.radio-look { flex: none; width: 1rem; height: 1rem; border: 1px solid #788574; border-radius: 50%; }
.product:has(input:checked) .radio-look { border: .26rem solid var(--accent); }

.quote-panel, .admin-card, .request-card, .empty-state { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.quote-panel { padding: clamp(1.1rem, 2.5vw, 1.85rem); box-shadow: 0 12px 38px #233c2110; }
.selected-product { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .15rem .7rem; margin: .85rem 0 1.1rem; padding: .7rem .9rem; border-radius: .65rem; background: var(--surface); }
.selected-product span, .optional { color: var(--muted); font-size: .875rem; font-weight: 400; }
.login-form label, .quote-panel > label:not(.upload), .admin-card label:not(.checkbox) { display: grid; gap: .35rem; font-size: .9rem; font-weight: 650; }
.quote-panel > label:not(.upload), .quote-panel > div[data-design-field] label, .quote-panel > div[data-lot-field] label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .3rem; font-size: .9rem; font-weight: 650; }
[data-design-field], [data-lot-field] { margin-bottom: .9rem; }
input:not([type="radio"], [type="checkbox"], [type="file"], [type="hidden"]), textarea, select {
    min-width: 0;
    width: 100%;
    padding: .59rem .72rem;
    border: 1px solid #b6c2b3;
    border-radius: .64rem;
    background: var(--white);
    color: var(--ink);
    font-size: 1rem;
}
textarea { resize: vertical; }
.quantity-control { position: relative; }
.quantity-control input { padding-right: 4rem; }
.quantity-control span { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); font-size: .875rem; color: var(--muted); pointer-events: none; }
.quantity-control input::-webkit-inner-spin-button { appearance: none; }
.quick-quantities { display: flex; flex-wrap: wrap; gap: .35rem; margin: .48rem 0 .92rem; }
.quick-quantities button { min-height: 2.25rem; padding: .2rem .6rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--paper); color: var(--ink); font-size: .875rem; cursor: pointer; }
.quick-quantities button[aria-pressed="true"], .quick-quantities button:hover { border-color: var(--accent); background: var(--surface); }
.quick-quantities[hidden] + label { margin-top: .9rem; }
.upload { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 4.4rem; margin-bottom: .9rem; padding: .55rem .72rem; border: 1px dashed #81927b; border-radius: .65rem; background: var(--paper); cursor: pointer; }
.upload:hover { background: var(--surface); }
.upload:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload strong, .upload small { display: block; overflow-wrap: anywhere; }
.upload strong { font-size: .95rem; }
.upload small { color: var(--muted); }
.quote-total { margin: .85rem 0 .8rem; padding-top: .73rem; border-top: 1px solid var(--line); }
.quote-total > div { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; font-weight: 600; }
.quote-total strong { font-size: 1.35rem; letter-spacing: -.035em; text-align: right; }
.quote-total small, .submit-note { color: var(--muted); }
.quote-total .delivery-line { margin-top: .45rem; font-size: .875rem; }
.submit-button { width: 100%; }
.submit-note { text-align: center; font-size: .875rem; margin-top: .48rem; }

.message { margin: 1rem 0; padding: .75rem 1rem; border: 1px solid transparent; border-radius: .75rem; overflow-wrap: anywhere; }
.message.success { background: #e9f1e5; border-color: #bdcfb8; color: #234a30; }
.message.error { background: #fcf1e8; border-color: #e8baa3; color: #732d19; }
.message p { margin-top: .15rem; }
.empty-state, .legal { padding: 2rem; margin-block: 2rem 4rem; }
.empty-state p, .legal p { margin-top: .8rem; max-width: 68ch; }
.legal h1 { font-size: 3rem; }
.cart-page { margin-block: 2rem 3.5rem; }
.cart-heading, .cart-item-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; }
.cart-heading { margin-bottom: 1rem; }
.cart-heading h1, .receipt h1 { font-size: clamp(1.95rem, 4vw, 2.85rem); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(19rem, .6fr); gap: clamp(1.25rem, 4vw, 3rem); align-items: start; }
.cart-sidebar { display: grid; gap: .9rem; min-width: 0; }
.current-address, .receipt address, .admin-order address { margin-top: .4rem; font-style: normal; overflow-wrap: anywhere; }
.address-form { display: grid; gap: .65rem; margin-top: .7rem; }
.address-form label:not(.checkbox) { display: grid; min-width: 0; gap: .2rem; font-size: .875rem; font-weight: 650; }
.address-form .button { justify-self: start; }
.address-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.address-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.new-address { margin-top: .75rem; }
.new-address summary { cursor: pointer; font-weight: 650; }
.delivery-form fieldset { display: grid; gap: .4rem; margin: 0 0 .6rem; padding: 0; border: 0; }
.delivery-form legend { margin-bottom: .4rem; }
.delivery-form label { display: flex; align-items: start; gap: .55rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: .55rem; cursor: pointer; }
.delivery-form label:has(input:checked) { border-color: var(--accent); background: var(--surface); }
.delivery-form small { display: block; color: var(--muted); }
.cart-items { display: grid; gap: .75rem; list-style: none; padding: 0; margin: 0; }
.cart-item, .receipt, .admin-order { padding: clamp(1rem, 2.2vw, 1.6rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.cart-item h2 { font-size: 1.45rem; }
.cart-item-heading span, .cart-item > p, .admin-order p { color: var(--muted); }
.cart-item > p { margin-top: .3rem; overflow-wrap: anywhere; }
.cart-design { border-top: 1px solid var(--line); margin-top: .75rem; padding-top: .65rem; overflow-wrap: anywhere; }
.cart-design .cart-item-controls { margin-top: .35rem; }
.cart-item-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; margin-top: .85rem; }
.cart-item-controls label { display: grid; gap: .18rem; width: 8rem; font-size: .875rem; font-weight: 650; }
.cart-item-controls input { padding-block: .41rem; }
.cart-item-controls .text-button { min-height: 2.65rem; padding-block: .42rem; background: transparent; color: var(--accent); font-size: .9rem; }
.cart-item-controls .text-button:hover { text-decoration: underline; }
.cart-summary > p { margin-top: .5rem; color: var(--muted); }
.cart-summary dl { margin-block: .85rem; }
.cart-summary dl div { display: flex; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--line); padding-block: .5rem; }
.cart-summary dd { margin: 0; text-align: right; }
.cart-summary .cart-total { font-weight: 680; }
.cart-summary form { margin-top: .8rem; }
.receipt { max-width: 52rem; }
.receipt h1 { margin-block: .45rem .65rem; }
.receipt ul { padding-inline-start: 1.2rem; }
.receipt .button { margin-top: 1.05rem; }
.site-footer { margin-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { min-height: 5.6rem; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding-block: .8rem; font-size: .9rem; }
.footer-inner div { display: flex; gap: 1.1rem; }
.footer-inner a:not(:hover) { text-decoration: none; }

.admin { padding-top: 2.2rem; }
.admin-intro h1 { font-size: clamp(1.95rem, 4vw, 2.85rem); }
.admin-intro .button { margin-top: .65rem; }
.admin-layout { display: grid; grid-template-columns: minmax(10rem, .23fr) minmax(0, 1fr); gap: 1.25rem; margin-block: 1.5rem; }
.admin-navigation, .admin-content { display: grid; align-content: start; gap: .65rem; }
.admin-navigation a { padding: .5rem .75rem; border-radius: .6rem; overflow-wrap: anywhere; }
.admin-navigation a[aria-current] { background: var(--surface); font-weight: 650; }
.admin-card { padding: clamp(1rem, 3vw, 1.7rem); }
.admin-card h2, .request-list h2 { margin-bottom: .7rem; font-size: 1.65rem; }
.staff-order-start { margin-bottom: .85rem; }
.admin-card h3 { margin: .85rem 0 .2rem; }
.admin-card p { color: var(--muted); margin-bottom: .6rem; }
.admin-fields, .assignment-fields, .account-form { display: grid; gap: .65rem; }
.admin-fields { grid-template-columns: 2fr 1fr; }
.assignment { min-width: 0; margin: .55rem 0 .8rem; border: 1px solid var(--line); border-radius: .65rem; }
.assignment legend { padding-inline: .2rem; letter-spacing: 0; font-size: .9rem; }
.assignment summary { cursor: pointer; padding: .3rem .6rem; font-weight: 650; }
.assignment > form { padding-inline: .6rem; }
.assignment > form label { margin-bottom: .65rem; }
.assignment-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-spacing { margin: .7rem 0; }
.checkbox { display: flex; gap: .43rem; align-items: center; margin-block: .1rem .45rem; font-size: .9rem; }
input[type="checkbox"] { accent-color: var(--accent); width: 1rem; height: 1rem; }
.account-form { grid-template-columns: 1.15fr auto minmax(8rem, 1fr) auto; align-items: center; border-top: 1px solid var(--line); padding-block: .8rem; }
.account-form strong { overflow-wrap: anywhere; }
.add-account { grid-template-columns: 1fr 1fr auto; align-items: end; }
.add-account h3 { grid-column: 1 / -1; }
.request-list { margin-block: 2rem; }
.request-card { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem; margin-bottom: .65rem; }
.request-card h3 { margin-block: .3rem; }
.request-card small { display: block; overflow-wrap: anywhere; }
.request-card p { overflow-wrap: anywhere; }
.request-card > div:last-child { min-width: 0; max-width: 30%; }
.admin-order { margin-bottom: .75rem; }
.admin-order header p { margin-top: .25rem; }
.order-group-heading { margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .65rem; min-width: 0; }
.order-group-heading h4 { margin: 0 0 .2rem; }
.order-group-heading pre { max-width: 100%; overflow: auto; }
.order-line { display: flex; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; margin-top: .7rem; padding-top: .65rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.order-line small { display: block; }
.pagination { display: flex; gap: 1rem; }

@media (max-width: 900px) {
    .wrap { width: min(100% - 2.5rem, 1232px); }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-form { grid-template-columns: 1.15fr 1fr; align-items: end; }
}

@media (max-width: 670px) {
    .wrap { width: calc(100% - 1.5rem); }
    .header-inner { min-height: 2.8rem; gap: .28rem; }
    .brand-group, .header-actions { gap: .3rem; }
    .brand { font-size: .94rem; }
    .header-actions .button.compact { padding-inline: .35rem; font-size: .75rem; }
    .brand-divider, .shop-name, .header-link, .account-name { display: none; }
    .login-section, .shop-layout, .admin-layout { grid-template-columns: 1fr; gap: 1.1rem; margin-top: 1.35rem; }
    .cart-layout { grid-template-columns: 1fr; }
    .quote-panel { border-radius: 1.05rem; }
    .product-grid { gap: .54rem; }
    .request-card { flex-direction: column; }
    .request-card > div:last-child { max-width: none; }
}

@media (max-width: 400px) {
    .footer-vat { display: none; }
    .admin-fields, .assignment-fields, .account-form { grid-template-columns: 1fr; }
}
