@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:wght@400;500;700&family=Fjalla+One&display=swap');

:root {
  --bg: #eee9dd;
  --fg: #505c3c;
  --fg-soft: rgba(80, 92, 60, .75);
  --sand: #c3b288;
  --ink: #121212;
  --head: 'Fjalla One', 'Arial Narrow', sans-serif;
  --body: 'Bodoni Moda', Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg-soft); font-family: var(--body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; color: var(--fg); letter-spacing: .04em; line-height: 1.15; margin: 0 0 .5em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 99; }

/* Header */
.site-header { background: var(--fg); color: var(--bg); position: sticky; top: 0; z-index: 30; }
.site-header .bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 20px; max-width: 1400px; margin: 0 auto; }
.nav { display: flex; gap: 24px; }
.nav a { text-decoration: none; font-size: 15px; letter-spacing: .03em; }
.nav a:hover, .nav a.active { text-decoration: underline; text-underline-offset: 5px; }
.logo img { height: 68px; width: auto; margin: 0 auto; }
.logo .fallback { font-family: var(--head); font-size: 28px; color: var(--bg); text-decoration: none; }
.icons { display: flex; justify-content: flex-end; gap: 6px; }
.icon-btn { background: none; border: 0; color: inherit; cursor: pointer; padding: 8px; position: relative; display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.badge { position: absolute; top: 2px; right: 0; background: var(--bg); color: var(--fg); font: 11px/1 var(--body); border-radius: 10px; min-width: 17px; padding: 3px 4px; text-align: center; }
.badge[hidden] { display: none; }
.menu-btn { display: none; }
.announce { background: var(--bg); color: var(--ink); text-align: center; padding: 10px 16px; font-size: 15px; border-bottom: 1px solid rgba(80,92,60,.15); }

/* Hero */
.hero { position: relative; min-height: min(78vh, 640px); display: grid; place-items: center; text-align: center; background: #6b7058 center/cover no-repeat; }
.hero::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.28); }
.hero-inner { position: relative; padding: 40px 20px; }
.hero h2 { color: var(--bg); font-size: clamp(2.6rem, 9vw, 5.6rem); letter-spacing: .06em; margin-bottom: 28px; }

/* Buttons */
.btn { display: inline-block; font-family: var(--body); font-size: 15px; letter-spacing: .06em; padding: 14px 28px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: #000; }
.btn.light { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.block { display: block; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Product grid */
.section { padding: 56px 0; }
.section-title { text-align: center; font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 32px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
.card { text-decoration: none; display: block; }
.card .ph { aspect-ratio: 4 / 5; background: transparent; overflow: hidden; position: relative; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; transition: transform .4s; }
.card:hover .ph img { transform: scale(1.04); }
.card h3 { font-size: 1.05rem; margin: 14px 0 4px; }
.card:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.price { font-size: 15px; }
.tag { position: absolute; left: 10px; bottom: 10px; background: var(--bg); color: var(--fg); border: 1px solid var(--fg); border-radius: 20px; font-size: 12px; padding: 2px 10px; }
.center { text-align: center; margin-top: 36px; }
.page-head { text-align: center; padding: 48px 0 8px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.count { font-size: 14px; }

/* Product page */
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 40px 0 64px; align-items: start; }
.gallery .main { background: none; }
.gallery .main img { display: block; width: 100%; height: auto; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumbs button { width: 72px; height: 72px; padding: 0; border: 2px solid transparent; background: transparent; cursor: pointer; }
.thumbs button.on { border-color: var(--fg); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.pdp .vendor { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.pdp h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.pdp .price { font-size: 1.25rem; color: var(--fg); margin-bottom: 20px; }
.opt-label { display: block; font-size: 14px; margin-bottom: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.pills input { position: absolute; opacity: 0; }
.pills label { border: 1px solid var(--fg); padding: 8px 18px; cursor: pointer; color: var(--fg); min-width: 52px; text-align: center; }
.pills input:checked + label { background: var(--fg); color: var(--bg); }
.pills input:disabled + label { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.pills input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.qty { display: inline-flex; border: 1px solid var(--fg); margin-bottom: 18px; }
.qty button { width: 42px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--fg); }
.qty span { min-width: 42px; text-align: center; align-self: center; color: var(--fg); }
.desc { margin-top: 28px; }
.desc ul { padding-left: 20px; }
.msg { font-size: 14px; min-height: 22px; margin-top: 10px; color: var(--fg); }
.crumbs { padding-top: 20px; font-size: 14px; }

/* About / contact */
.about-hero { aspect-ratio: 16/6; background: var(--sand) center/cover no-repeat; }
.narrow { max-width: 720px; margin: 0 auto; text-align: center; }
.narrow p { font-size: 1.15rem; }
.team { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; margin-top: 24px; }
.team figure { margin: 0; text-align: center; width: 220px; }
/* the profile photos are already circular on a cream background, so show them whole */
.team img { width: 220px; aspect-ratio: 352 / 286; object-fit: contain; display: block; }
.team figcaption h3 { margin: 14px 0 2px; }
.form { max-width: 620px; margin: 0 auto; display: grid; gap: 14px; }
.form input, .form textarea, .newsletter input { font: inherit; padding: 12px; border: 1px solid var(--fg); background: transparent; color: var(--ink); width: 100%; }
.form label { display: grid; gap: 4px; font-size: 14px; }
.demo-note { font-size: 13px; text-align: center; opacity: .85; }

/* Footer */
.site-footer { border-top: 1px solid rgba(80,92,60,.25); padding: 48px 0 28px; margin-top: 24px; }
.newsletter { max-width: 520px; margin: 0 auto 28px; text-align: center; }
.newsletter form { display: flex; gap: 8px; }
.newsletter input { flex: 1; }
.foot-links { display: flex; justify-content: center; gap: 22px; margin-bottom: 18px; flex-wrap: wrap; }
.copy { text-align: center; font-size: 13px; }

/* Drawers & dialogs */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--bg); z-index: 50; transform: translateX(100%); transition: transform .25s; display: flex; flex-direction: column; box-shadow: -4px 0 20px rgba(0,0,0,.2); }
.drawer.open { transform: none; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid rgba(80,92,60,.25); }
.drawer header h2 { margin: 0; font-size: 1.3rem; }
.drawer .body { flex: 1; overflow: auto; padding: 16px 20px; }
.drawer footer { padding: 16px 20px; border-top: 1px solid rgba(80,92,60,.25); display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(80,92,60,.15); align-items: start; }
.line img { width: 72px; height: 72px; object-fit: cover; background: var(--sand); }
.line h4 { margin: 0; font: 400 .95rem var(--head); color: var(--fg); letter-spacing: .03em; }
.line small { display: block; }
.line .qty { margin: 6px 0 0; }
.line .qty button { width: 30px; height: 28px; }
.line .qty span { min-width: 30px; }
.link-btn { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; margin-top: 4px; }
.row { display: flex; justify-content: space-between; color: var(--fg); }
.empty { text-align: center; padding: 40px 0; }
.search-panel { position: fixed; top: 0; left: 0; right: 0; background: var(--bg); z-index: 50; transform: translateY(-100%); transition: transform .25s; padding: 20px; max-height: 90vh; overflow: auto; }
.search-panel.open { transform: none; }
.search-panel form { max-width: 720px; margin: 0 auto; display: flex; gap: 8px; }
.search-panel input { flex: 1; font: inherit; font-size: 18px; padding: 12px; border: 1px solid var(--fg); background: transparent; color: var(--ink); }
.results { max-width: 720px; margin: 12px auto 0; }
.results a { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; text-decoration: none; border-bottom: 1px solid rgba(80,92,60,.15); }
.results img { width: 56px; height: 56px; object-fit: cover; background: var(--sand); }
.modal { position: fixed; z-index: 60; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; background: var(--bg); padding: 24px; display: none; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.modal .form { max-width: none; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.modal .form > * { grid-column: span 6; }
.modal .form > .c3 { grid-column: span 3; }
.modal .form > .c4 { grid-column: span 4; }
.modal .form > .c2 { grid-column: span 2; }
.modal .form > .c1 { grid-column: span 1; }
.modal .form input, .modal .form textarea { padding: 8px 10px; }
.modal .form label { gap: 2px; font-size: 13px; }
.modal .demo-banner { font-size: 13px; padding: 8px 10px; margin-bottom: 10px; }
.modal h2 { margin-bottom: 10px; }
.modal .form .row { font-size: 14px; }
.modal .form .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .modal .form > .c3, .modal .form > .c4 { grid-column: span 6; } .modal .form > .c2 { grid-column: span 3; } .modal .form > .c1 { grid-column: span 3; } }
.modal.open { display: block; }
.modal h2 { font-size: 1.5rem; }
.demo-banner { background: #fff3c4; color: #5a4a00; padding: 10px 14px; font-size: 14px; border: 1px solid #e0c96a; margin-bottom: 14px; }
.cart-page { max-width: 820px; margin: 0 auto; padding: 24px 20px 64px; }

@media (max-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } .pdp { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .site-header .bar { grid-template-columns: auto 1fr auto; padding: 8px 12px; }
  .menu-btn { display: grid; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--fg); flex-direction: column; gap: 0; padding: 6px 20px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid rgba(238,233,221,.2); }
  .logo img { height: 52px; }
  .about-hero { aspect-ratio: 16/9; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
