:root {
    color-scheme: light;
    --paper:#f8f2eb;
    --surface:#fffaf4;
    --wine:#682b3d;
    --wine-dark:#47202b;
    --rose:#873e50;
    --ink:#38242a;
    --muted:#6f555b;
    --edge:#e6d8d0;
    --serif:Georgia,'Times New Roman',serif;
    font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    color:var(--ink);
    background:var(--paper);
}
*,*::before,*::after { box-sizing:border-box; }
body { margin:0; min-width:280px; min-height:100vh; display:flex; flex-direction:column; }
main { flex:1; }
a { color:inherit; text-decoration:none; }
img { display:block; max-width:100%; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
:focus-visible { outline:2px solid #963e53; outline-offset:4px; }
h1,h2,h3,p { margin:0 0 .65em; overflow-wrap:anywhere; }
h1,h2,h3 { font-family:var(--serif); color:var(--wine-dark); line-height:1.12; }
h1 { font-size:clamp(2.25rem,5vw,4rem); }
h2 { font-size:clamp(1.45rem,3vw,2.35rem); }
h3 { font-size:clamp(1.05rem,2.3vw,1.65rem); }
p { line-height:1.55; }
.shell { width:min(1280px,100% - 48px); margin-inline:auto; }
.icon { width:1.2em; height:1.2em; flex:none; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.site-header { position:relative; z-index:3; border-bottom:1px solid #87505c; background:var(--wine); color:var(--surface); }
.site-header .brand { color:var(--surface); }
.site-header :focus-visible { outline-color:#ffe0d6; }
.header-row { display:flex; align-items:center; justify-content:space-between; gap:clamp(12px,2.3vw,34px); min-height:76px; }
.brand { font: bold clamp(1.2rem,2.1vw,1.8rem)/1 var(--serif); display:inline-flex; align-items:center; gap:.38em; color:var(--wine-dark); white-space:nowrap; }
.brand .icon { width:1em; height:1em; }
.desktop-nav,.header-actions { display:flex; align-items:center; gap:clamp(12px,1.6vw,25px); font-size:.88rem; }
.desktop-nav a { display:block; padding-block:12px; white-space:nowrap; }
.desktop-nav [aria-current] { box-shadow:0 2px #e5b5a8; }
.header-actions a { position:relative; min-height:44px; display:flex; align-items:center; gap:.39em; white-space:nowrap; }
.header-actions a b { border-radius:100px; color:var(--wine); background:var(--surface); font-size:.67rem; display:grid; min-width:18px; padding:2px; place-items:center; }
.search { display:flex; align-items:center; gap:4px; background:var(--surface); border:1px solid var(--edge); border-radius:24px; min-width:120px; max-width:295px; flex:1; padding-inline:8px; }
.search button { border:0; background:transparent; color:var(--wine); display:grid; place-items:center; padding:8px; order:2; }
.search input { border:0; background:transparent; width:100%; padding:7px 4px; min-width:0; font-size:.85rem; }
.mobile-menu { display:none; }
.storefront-intro { display:grid; gap:22px; }
.hero { position:relative; isolation:isolate; overflow:hidden; display:flex; align-items:center; min-height:clamp(290px,31vw,480px); background:#48282b; }
.hero picture { position:absolute; inset:0; z-index:-2; }
.hero img { width:100%; height:100%; object-fit:cover; object-position:center; }
.hero::after { position:absolute; inset:0; content:""; z-index:-1; background:linear-gradient(90deg,#3f1e2add 0%,#3f1e2a97 36%,transparent 78%); }
.hero-content { padding-block:clamp(26px,5vw,66px); }
.hero h1 { font-size:clamp(2.65rem,5.25vw,5.05rem); color:var(--surface); margin:0 0 .36em; font-weight:normal; letter-spacing:-.035em; line-height:1; }
.hero-content .button { background:#f8e8df; border-color:#f8e8df; color:var(--wine-dark); border-radius:24px; }
.hero-content .button:hover { background:#fffaf4; }
.shop-categories { display:grid; grid-template-columns:repeat(auto-fit,minmax(175px,1fr)); gap:9px; }
.shop-categories a { display:flex; align-items:center; gap:.6rem; min-width:0; min-height:62px; padding:10px 14px; color:var(--wine); background:#f1e1d9; border:1px solid var(--edge); border-radius:9px; line-height:1.2; font-size:.92rem; font-weight:650; }
.shop-categories a:hover { background:#ead2c9; }
.shop-categories a span { overflow-wrap:anywhere; }
.shop-categories .icon { font-size:1.15rem; }
.category-arrow { margin-left:auto; }
.featured { padding:28px 0 46px; }
.shop-section-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; margin-bottom:15px; padding-bottom:10px; border-bottom:1px solid var(--edge); }
.shop-section-heading h2 { margin:0; }
.shop-section-heading a { font-size:.9rem; white-space:nowrap; }
.product-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.catalog-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.product-card { display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--edge); border-radius:12px; overflow:hidden; min-width:0; }
.card-image { display:block; background:#ecdbce; overflow:hidden; aspect-ratio:5 / 4; }
.card-image img { width:100%; height:100%; object-fit:contain; }
.card-content { display:flex; flex:1; flex-direction:column; align-items:stretch; padding:12px; }
.card-content h3 { font-size:clamp(1rem,1.65vw,1.42rem); margin-bottom:.3em; }
.card-content .price { font-size:clamp(1.1rem,1.9vw,1.55rem); margin-top:auto; padding-top:5px; }
.card-content .button { width:100%; }
.card-variant { margin-bottom:7px; padding-inline:7px; font-size:.8rem; }
.card-content a:hover,.back:hover { text-decoration:underline; }
.rating { display:flex; flex-wrap:wrap; align-items:center; column-gap:.35em; font-size:.8rem; margin:0 0 5px; }
.stars { font-size:1.06rem; color:#a25e0b; white-space:nowrap; letter-spacing:-.035em; }
.price { font:bold clamp(1.3rem,2.35vw,1.85rem)/1.15 var(--serif); color:var(--wine); margin-bottom:12px; }
.button { border:1px solid var(--rose); background:var(--rose); color:#fffaf7; padding:10px 15px; min-height:44px; border-radius:7px; font-size:.88rem; font-weight:650; display:inline-flex; justify-content:center; align-items:center; gap:7px; text-align:center; transition:background-color .16s; }
.button:hover { background:var(--wine-dark); color:white; }
.button.outline { color:var(--wine); background:transparent; }
.button.outline:hover { background:var(--wine); color:white; }
.section { padding-block:40px 62px; }
.back { display:inline-block; color:var(--wine); font-weight:650; }
.product-page { padding-top:24px; }
.product-path { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px; font-size:.85rem; color:var(--muted); }
.product-path [aria-current] { color:var(--wine); font-weight:650; overflow-wrap:anywhere; }
.product-path a:hover { text-decoration:underline; }
.product-detail { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); align-items:start; gap:clamp(14px,3.4vw,49px); margin-block:18px 27px; }
.product-gallery { min-width:0; }
.gallery-frame { position:relative; isolation:isolate; }
.product-stage { display:block; overflow:hidden; border:1px solid var(--edge); border-radius:12px; background:#ecddd4; touch-action:pan-y pinch-zoom; }
.gallery-arrow,.photo-expand,.photo-dialog button { min-width:40px; min-height:40px; border-radius:22px; border:1px solid var(--edge); background:var(--surface); color:var(--wine); font-size:1.45rem; line-height:1; }
.gallery-arrow,.photo-expand { position:absolute; width:40px; padding:0; box-shadow:0 3px 13px #41242a26; }
.gallery-arrow { top:50%; transform:translateY(-50%); }
.gallery-arrow.previous { left:8px; }
.gallery-arrow.next { right:8px; }
.photo-expand { top:9px; right:9px; }
.photo-count { position:absolute; left:50%; bottom:11px; transform:translateX(-50%); font-size:.76rem; color:var(--surface); background:#47202bd4; border-radius:20px; padding:4px 11px; pointer-events:none; }
.photo-dialog { box-sizing:border-box; width:min(930px,100% - 24px); max-width:none; max-height:calc(100% - 24px); padding:0; border:0; border-radius:16px; background:var(--surface); color:var(--wine-dark); }
body:has(.photo-dialog[open]) { overflow:hidden; }
.photo-dialog::backdrop { background:#2c151ddc; }
.photo-dialog-top,.photo-dialog-actions { display:flex; align-items:center; gap:12px; padding:10px 15px; }
.photo-dialog-top { justify-content:space-between; }
.photo-dialog-actions { justify-content:center; }
.photo-dialog-view { height:min(67vh,670px); overflow:auto; background:#f1e4da; }
.photo-dialog-view img { width:100%; height:100%; object-fit:contain; }
.photo-dialog.is-zoomed .photo-dialog-view img { max-width:none; width:150%; height:150%; }
.product-main { width:100%; height:clamp(335px,42vw,555px); object-fit:contain; }
.product-thumbs { display:flex; flex-wrap:wrap; gap:7px; margin-top:8px; }
.product-thumbs a { display:block; padding:2px; border:1px solid var(--edge); border-radius:8px; background:var(--surface); }
.product-thumbs a[aria-current] { border-color:var(--wine); box-shadow:0 0 0 1px var(--wine); }
.product-thumbs img { width:60px; height:60px; object-fit:cover; border-radius:5px; }
.product-copy h1 { font-size:clamp(2rem,4vw,3.7rem); margin-bottom:.22em; }
.product-copy > .price { margin-top:12px; font-size:clamp(1.7rem,3.3vw,2.7rem); }
.taste { color:var(--wine); font-weight:650; }
.filters { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin-block:18px; }
.filters label:first-of-type { flex:1 1 210px; }
.filters label:not(:first-of-type) { flex:1 1 135px; max-width:200px; }
.reviews { margin-top:14px; }
.review { border-block-start:1px solid var(--edge); padding-block:14px 5px; }
.review .stars { margin-left:.4em; }
.stack { display:grid; gap:12px; align-content:start; }
.stack .button { justify-self:start; }
.compact { max-width:540px; }
label { display:grid; gap:5px; font-weight:600; font-size:.9rem; }
input,select,textarea { min-width:0; width:100%; padding:10px 12px; min-height:44px; border:1px solid #cbb7b2; border-radius:6px; background:#fffdfa; color:var(--ink); }
textarea { resize:vertical; }
.checkbox { display:flex; align-items:center; }
.checkbox input { width:auto; min-height:20px; }
.checkout-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:18px; align-items:start; }
.panel { background:var(--surface); border:1px solid var(--edge); padding:clamp(16px,3vw,32px); border-radius:12px; }
.account { max-width:650px; margin-inline:auto; }
.account form+p,.account form { margin-top:14px; }
.cart-row { display:grid; grid-template-columns:64px 1fr 80px; gap:10px; align-items:center; padding-block:12px; border-bottom:1px solid var(--edge); }
.cart-row img { object-fit:cover; border-radius:5px; }
.cart-row p { margin:0; }
.cart-row+.button { margin-top:16px; }
.text-button { padding:4px 0; border:0; background:none; color:var(--wine); text-decoration:underline; }
.line { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid var(--edge); padding-bottom:8px; }
.line :last-child { text-align:right; flex-shrink:0; }
.total { margin-top:16px; color:var(--wine); }
.notice { padding:12px 15px; background:#f0e1da; color:var(--wine-dark); border-radius:7px; margin:14px 0 0; }
.notice.error { background:#f5d9d6; color:#622025; }
.spaced { margin-top:24px; }
.site-footer { border-top:1px solid #87505c; background:#47202b; color:var(--surface); }
.site-footer .brand { color:var(--surface); }
.footer-row { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; min-height:92px; padding-block:18px; }
.footer-row nav { display:flex; flex-wrap:wrap; gap:16px; font-size:.88rem; }
@media(max-width:1080px) {
    .desktop-nav { display:none; }
    .mobile-menu { display:block; }
    .mobile-menu > summary { list-style:none; display:grid; place-items:center; min-height:44px; min-width:38px; cursor:pointer; color:var(--surface); font-size:1.2rem; }
    .mobile-menu > summary::-webkit-details-marker { display:none; }
    .mobile-menu nav { position:absolute; left:12px; top:calc(100% + 4px); min-width:210px; border:1px solid var(--edge); background:var(--surface); color:var(--wine-dark); padding:10px; border-radius:8px; box-shadow:0 8px 20px #3c182520; }
    .mobile-menu nav a,.menu-categories summary { display:block; padding:12px; font-size:.92rem; cursor:pointer; }
    .mobile-menu nav > a,.menu-categories { border-top:1px solid var(--edge); }
    .mobile-menu nav :focus-visible { outline-color:var(--wine); }
    .menu-categories summary::after { content:"+"; float:right; }
    .menu-categories[open] summary::after { content:"−"; }
    .menu-categories a { margin-left:12px; }
    .menu-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:4px 10px 12px; font-family:var(--serif); }
    .menu-close { min-width:42px; min-height:42px; border:1px solid var(--edge); border-radius:22px; background:var(--surface); color:var(--wine); font-size:1.45rem; }
    .menu-account { font-weight:700; color:var(--wine); }
    .menu-account .icon { vertical-align:middle; }
    .mobile-menu.is-enhanced[open] .menu-backdrop { position:fixed; inset:0; background:#2e152191; border:0; cursor:pointer; }
    .mobile-menu.is-enhanced[open] nav { position:fixed; inset:0 auto 0 0; width:min(365px,86vw); padding:14px; border:0; border-radius:0 12px 12px 0; overflow:auto; }
    .brand { margin-right:auto; }
}
@media(max-width:900px) {
    .catalog-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:640px) {
    .shell { width:calc(100% - 24px); }
    .header-row { display:grid; grid-template-columns:70px minmax(0,1fr) 70px; gap:4px 6px; padding-block:3px 9px; }
    .header-row .brand { grid-column:2; grid-row:1; margin:0; justify-self:center; }
    .mobile-menu { grid-column:1; grid-row:1; justify-self:start; }
    .header-actions { grid-column:3; grid-row:1; gap:3px; justify-self:end; }
    .header-actions a { justify-content:center; min-width:33px; }
    .header-actions a span { display:none; }
    .header-actions a b { position:absolute; top:3px; right:-3px; }
    .header-search { grid-column:1 / -1; grid-row:2; width:100%; max-width:none; }
    .header-search input { min-height:37px; }
    .site-header { position:sticky; top:0; }
    .storefront-intro { gap:12px; }
    .shop-categories { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
    .shop-categories a { gap:6px; font-size:.79rem; padding:7px 8px; min-height:48px; }
    .shop-categories .icon { font-size:.95rem; }
    .hero { min-height:clamp(210px,57vw,300px); }
    .hero img { object-position:62% center; }
    .hero::after { background:linear-gradient(90deg,#3f1e2adf 4%,#3f1e2a91 49%,transparent 89%); }
    .hero-content .button { font-size:.8rem; padding-inline:11px; }
    .hero h1 { font-size:clamp(2rem,8.5vw,3.2rem); }
    .featured { padding-top:17px; }
    .checkout-grid,.product-detail { grid-template-columns:1fr; }
    .product-grid { gap:9px; }
    .catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .card-image { aspect-ratio:1 / 1; }
    .card-content { padding:8px; }
    .card-content .button { padding-inline:5px; font-size:.76rem; }
    .price { margin-bottom:8px; }
    .section { padding-block:25px 42px; }
    .product-page { padding-top:16px; }
    .product-path { font-size:.75rem; }
    .product-main { height:min(100vw - 24px,430px); }
    .product-copy.panel { padding:16px 13px; }
    .product-thumbs { flex-wrap:nowrap; overflow:auto; padding:2px; }
    .product-thumbs a { flex:none; }
    .product-thumbs img { width:clamp(46px,13vw,68px); height:clamp(46px,13vw,68px); }
    .product-copy .purchase-buttons { flex-direction:column; }
    .product-copy .purchase-buttons .button { flex:none; width:100%; }
    .filters { gap:8px; }
}
@media(prefers-reduced-motion:reduce) {
    *,*::before,*::after { transition:none !important; }
}
.account-links { display:flex; flex-wrap:wrap; gap:8px; margin-block:12px; }
.gift-form { padding-top:12px; }
.admin-layout { display:grid; grid-template-columns:205px minmax(0,1fr); gap:22px; }
.admin-main { min-width:0; }
.admin-main h1 { font-size:clamp(1.9rem,3.8vw,3.1rem); }
.admin-sidebar { align-self:start; padding:16px; background:#442430; border-radius:12px; color:#f9eee8; }
.admin-sidebar strong { display:block; margin:4px 4px 14px; font-family:var(--serif); }
.admin-sidebar nav { display:grid; gap:3px; }
.admin-sidebar a { display:block; padding:11px 10px; border-radius:6px; font-size:.87rem; }
.admin-sidebar a:hover,.admin-sidebar [aria-current] { background:#f8e8df; color:#442430; }
.stats-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.stat { padding:clamp(14px,2vw,24px); }
.stat h2 { font:650 .9rem/1.4 system-ui,sans-serif; color:var(--muted); }
.stat strong { display:block; color:var(--wine); font-size:clamp(1.4rem,2.9vw,2.4rem); line-height:1.1; margin-block:8px; }
.stat p { font-size:.8rem; margin:0; color:var(--muted); }
.admin-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start; }
@media(max-width:950px) {
    .admin-layout { grid-template-columns:1fr; gap:18px; }
    .admin-sidebar { padding:10px; }
    .admin-sidebar strong { margin-bottom:6px; }
    .admin-sidebar nav { display:flex; flex-wrap:wrap; }
}
@media(max-width:640px) {
    .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .admin-columns { grid-template-columns:1fr; }
    .header-row .brand { font-size:clamp(1rem,5vw,1.3rem); }
}

.admin-product-photo { object-fit:cover; border-radius:8px; }
.product-purchase { margin:16px 0 0; }
.purchase-options,.purchase-buttons { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.variant-control { flex:1 1 100%; min-width:0; margin:0; padding:0; border:0; }
.variant-control legend { padding:0; font-size:.9rem; font-weight:650; }
.variant-choices { display:flex; flex-wrap:wrap; gap:8px; margin-top:5px; }
.variant-choice { display:block; position:relative; cursor:pointer; }
.variant-choice input { position:absolute; width:1px; height:1px; min-height:0; padding:0; opacity:0; }
.variant-choice span { display:grid; gap:2px; padding:6px 12px; border-radius:8px; border:1px solid var(--edge); min-height:44px; color:var(--wine); }
.variant-choice small { font-size:.68rem; color:var(--muted); }
.variant-choice input:checked + span { border-color:var(--wine); background:#f5e6de; }
.variant-choice input:focus-visible + span { outline:2px solid var(--wine); outline-offset:2px; }
.quantity-stepper { display:flex; align-items:center; gap:3px; margin-top:5px; }
.quantity-stepper input { flex:0 0 53px; width:53px; padding:5px; text-align:center; }
.quantity-stepper button { flex:0 0 38px; width:38px; min-width:38px; padding:0; min-height:44px; border:1px solid var(--edge); border-radius:6px; background:var(--surface); color:var(--wine); }
.quantity-stepper input::-webkit-inner-spin-button { appearance:none; }
.purchase-buttons .button { flex:1 1 140px; border-radius:28px; min-height:49px; }
.product-info { padding:0 13px 0; margin:0; border-top:1px solid var(--edge); }
.product-info:last-of-type { border-bottom:1px solid var(--edge); }
.product-info summary { display:block; list-style:none; padding:14px 24px 14px 0; font-weight:760; cursor:pointer; position:relative; color:var(--wine-dark); }
.product-info summary::-webkit-details-marker { display:none; }
.product-info summary::after { content:"+"; position:absolute; right:0; font-size:1.2rem; color:var(--wine); }
.product-info[open] summary::after { content:"−"; }
.product-info[open] { padding-bottom:12px; }
.related-products { margin-top:36px; }
.admin-gallery { border:1px solid var(--edge); border-radius:8px; display:flex; flex-wrap:wrap; gap:10px; }
.admin-gallery legend { padding-inline:5px; }

.admin-category { border-top:1px solid var(--edge); padding-block:12px; }
.category-settings { display:flex; align-items:end; flex-wrap:wrap; gap:10px; }
.category-settings input[type=number] { width:86px; }
.category-settings .checkbox { min-height:44px; }
