/* Default — demo storefront for the STOHRX dashboard.
   Everything on the page is rendered by site.js from the demo tenant's
   pages / page_sections / items / categories rows. */

:root {
  --bg: #f6f4f0;
  --surface: #ffffff;
  --surface-2: #efebe4;
  --ink: #1d1c1a;
  --ink-2: #3a3833;
  --muted: #6b675f;
  --line: #e3ded5;
  --accent: #b4532a;
  --accent-ink: #ffffff;
  --dark: #1f1e1b;
  --radius: 14px;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.section { padding: 88px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(32px, 4vw, 46px); }
.section-head p { color: var(--muted); max-width: 46ch; }
.link-arrow { font-weight: 600; font-size: 14px; border-bottom: 1px solid currentColor; padding-bottom: 2px; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font-weight: 600; font-size: 15px;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: #000; }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.light:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- announcement + header ---------- */
.announce {
  background: var(--dark); color: #f3efe8; text-align: center;
  font-size: 13px; padding: 10px 16px; letter-spacing: 0.02em;
}
.announce a { border-bottom: 1px solid rgba(255,255,255,.4); }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 244, 240, 0.88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo { font-family: var(--serif); font-size: 32px; line-height: 1; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 28px; margin-right: auto; }
.nav a { font-size: 15px; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.cart-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600;
}
.cart-btn:hover { background: var(--surface); }
.cart-count {
  min-width: 20px; height: 20px; border-radius: 10px; background: var(--ink); color: #fff;
  font-size: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}
.menu-btn { display: none; background: none; border: 0; padding: 8px; margin-left: -8px; }
.menu-btn svg { width: 22px; height: 22px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: end; color: #fff; overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Darkened from the left (where the copy sits) and the bottom, so any
   hero photo the client uploads keeps the text legible. */
.hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.22) 55%, rgba(0,0,0,0) 85%),
    linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.5) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 72px; width: 100%; }
.hero .eyebrow { color: #fff; opacity: .9; }
.hero h1, .hero p { text-shadow: 0 1px 24px rgba(0,0,0,.18); }
@media (max-width: 820px) {
  .hero::after { background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.6) 100%); }
}
.hero h1 { font-size: clamp(44px, 7vw, 92px); max-width: 14ch; }
.hero p { margin-top: 18px; font-size: 18px; max-width: 46ch; color: rgba(255,255,255,.88); }
.hero .actions { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }

.page-hero { padding: 72px 0 40px; }
.page-hero h1 { font-size: clamp(44px, 6vw, 76px); max-width: 16ch; }
.page-hero p { margin-top: 16px; color: var(--muted); font-size: 18px; max-width: 56ch; }
.page-hero.with-image .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.page-hero.with-image img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius); }

/* ---------- intro ---------- */
.intro .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.intro h2 { font-size: clamp(34px, 4.4vw, 54px); }
.intro p { color: var(--ink-2); font-size: 18px; }

/* ---------- category tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; background: var(--surface-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.04); }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.5)); }
.tile span { position: absolute; left: 18px; bottom: 16px; z-index: 1; color: #fff; font-family: var(--serif); font-size: 30px; }

/* ---------- products ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
.card { display: block; }
.card .media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .media img { transform: scale(1.04); }
.card .meta { padding-top: 12px; display: flex; justify-content: space-between; gap: 12px; }
.card .name { font-weight: 500; font-size: 15px; }
.card .cat { color: var(--muted); font-size: 13px; }
.card .price { font-weight: 600; font-size: 15px; white-space: nowrap; }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: #fff; color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.badge.dark { background: var(--ink); color: #fff; }
.card.sold .media img { opacity: .55; filter: grayscale(.4); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-size: 14px;
}
.pill:hover { border-color: var(--ink-2); }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.select {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 14px; color: var(--ink);
}
.count { color: var(--muted); font-size: 14px; }

/* ---------- product page ---------- */
.pdp { padding: 48px 0 88px; }
.pdp .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.pdp .media { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 5; }
.pdp .media img { width: 100%; height: 100%; object-fit: cover; }
.pdp .info { position: sticky; top: 104px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.crumbs a:hover { color: var(--ink); }
.pdp h1 { font-size: clamp(38px, 4.4vw, 56px); }
.pdp .price { font-size: 22px; font-weight: 600; margin-top: 14px; }
.pdp .desc { margin-top: 22px; color: var(--ink-2); font-size: 17px; }
.pdp .stock { margin-top: 18px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.pdp .stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #3f9d5a; }
.pdp .stock.low::before { background: #d4912b; }
.pdp .stock.out::before { background: #b84a3a; }
.qty-row { display: flex; gap: 12px; margin-top: 28px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { background: none; border: 0; width: 42px; height: 48px; font-size: 18px; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.perks { margin-top: 32px; border-top: 1px solid var(--line); }
.perks div { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 16px; }
.perks div b { font-weight: 600; color: var(--ink); }

/* ---------- testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.quote .stars { color: var(--accent); letter-spacing: 3px; font-size: 14px; }
.quote p { font-family: var(--serif); font-size: 24px; line-height: 1.25; }
.quote small { color: var(--muted); font-size: 14px; margin-top: auto; }

/* ---------- visit band ---------- */
.visit { background: var(--dark); color: #f3efe8; }
.visit .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 48px; align-items: start; }
.visit h2 { font-size: clamp(34px, 4vw, 50px); }
.visit .eyebrow { color: #e5a27f; }
.visit h3 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #a8a297; margin-bottom: 10px; }
.visit p { white-space: pre-line; color: #e9e4da; }

/* ---------- about ---------- */
.story { display: grid; gap: 72px; }
.story-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.story-row:nth-child(even) .story-media { order: 2; }
.story-row img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.story-row h2 { font-size: clamp(32px, 3.6vw, 44px); margin-bottom: 16px; }
.story-row p { color: var(--ink-2); font-size: 17px; }
.story-row.text-only { grid-template-columns: 1fr; max-width: 760px; }

.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 26px; margin-bottom: 18px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.member h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; }
.member .role { color: var(--accent); font-size: 13px; font-weight: 600; margin-top: 2px; }
.member p { margin-top: 12px; color: var(--ink-2); font-size: 15px; }

.closing { text-align: center; }
.closing h2 { font-size: clamp(38px, 5vw, 64px); }
.closing p { margin: 16px auto 28px; color: var(--muted); max-width: 52ch; font-size: 17px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: grid; gap: 14px; }
.form label { font-size: 13px; font-weight: 600; display: grid; gap: 6px; }
.form input, .form textarea, .form select {
  font: inherit; font-size: 15px; font-weight: 400; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .sent { background: #eaf4ec; color: #245d34; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.info-card { background: var(--surface-2); border-radius: var(--radius); padding: 32px; display: grid; gap: 22px; }
.info-card h3 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.info-card p { white-space: pre-line; }

.faqs { max-width: 820px; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 0; font-size: 18px; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--muted); }
.faq[open] summary::after { content: '–'; }
.faq p { padding: 0 0 22px; color: var(--ink-2); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; margin-top: 24px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h4 { margin: 0 0 14px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .tag { color: var(--muted); margin-top: 12px; max-width: 32ch; font-size: 15px; }
.news { display: flex; gap: 8px; margin-top: 4px; }
.news input { flex: 1; min-width: 0; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; background: var(--surface); }
.news button { border: 0; border-radius: 999px; background: var(--ink); color: #fff; padding: 10px 18px; font-size: 14px; font-weight: 600; }
.legal { max-width: var(--wrap); margin: 48px auto 0; padding: 20px 24px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }

/* ---------- cart drawer + modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 18, 15, .4); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 61;
  background: var(--bg); transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-size: 30px; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; }
.icon-btn:hover { background: var(--surface-2); }
.drawer .lines { flex: 1; overflow-y: auto; padding: 8px 24px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line img { width: 72px; height: 88px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.line .n { font-weight: 500; font-size: 15px; }
.line .p { color: var(--muted); font-size: 14px; }
.line .controls { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 14px; }
.line .controls button { background: none; border: 1px solid var(--line); border-radius: 50%; width: 26px; height: 26px; line-height: 1; }
.line .remove { background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; }
.drawer footer { padding: 20px 24px 28px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.drawer .sum { display: flex; justify-content: space-between; font-weight: 600; font-size: 17px; }
.drawer .note { color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 64px 0; color: var(--muted); }

.modal {
  position: fixed; left: 50%; top: 50%; z-index: 70; transform: translate(-50%, -46%); opacity: 0; pointer-events: none;
  width: min(440px, calc(100% - 32px)); background: var(--surface); border-radius: 18px; padding: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25); transition: opacity .2s ease, transform .2s ease;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal h2 { font-size: 32px; margin-bottom: 10px; }
.modal p { color: var(--ink-2); margin-bottom: 22px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 80; opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading { min-height: 60vh; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* The Site Editor scrolls the preview to a block; give it a brief outline. */
[data-block].flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 60% { box-shadow: inset 0 0 0 3px rgba(180, 83, 42, .55); } 100% { box-shadow: inset 0 0 0 3px rgba(180, 83, 42, 0); } }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .visit .wrap { grid-template-columns: 1fr 1fr; }
  .visit .wrap > :first-child { grid-column: 1 / -1; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .section { padding: 64px 0; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-flex; }
  .site-header .wrap { gap: 12px; }
  .intro .wrap, .page-hero.with-image .wrap, .pdp .wrap, .story-row, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .story-row:nth-child(even) .story-media { order: 0; }
  .pdp .info { position: static; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .quotes, .team { grid-template-columns: 1fr; }
  .visit .wrap { grid-template-columns: 1fr; gap: 28px; }
  .form .row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .cart-btn .label { display: none; }
  .hero .wrap { padding-bottom: 48px; }
}
