/* Itematy templates: shared layout. Each template sets the variables below in its own
   index.html (colours, fonts, corners) and picks a page structure; content comes from data. */
:root {
  --bg: #fffbf5; --surface: #ffffff; --ink: #1c1917; --muted: #57534e; --line: #ede4d8;
  --accent: #b42318; --on-accent: #ffffff; --chip: #f5efe6;
  --display: Georgia, serif; --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px; --img-radius: 12px; --display-case: none; --display-weight: 700;
  --hero-overlay: linear-gradient(180deg, rgba(0,0,0,.30), rgba(0,0,0,.45) 40%, rgba(0,0,0,.80));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.display { font-family: var(--display); font-weight: var(--display-weight); text-transform: var(--display-case); letter-spacing: .005em; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* header */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 700 16px var(--display); overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* announcement */
.notice { background: var(--accent); color: var(--on-accent); font-size: 14px; }
.notice .wrap { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 10px 16px; flex-wrap: wrap; text-align: center; }
.notice a { color: inherit; font-weight: 700; }

/* hero */
.hero { padding: 24px 0 8px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(38px, 9vw, 64px); line-height: 1.02; }
.hero h1 .accent { color: var(--accent); }
.hero p.lead { margin: 0 0 18px; font-size: 17px; color: var(--muted); max-width: 560px; }
.hero .badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
.chips li { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--chip); color: var(--ink); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 -16px 20px; }
.hero-grid img:nth-child(3):last-child { grid-column: span 2; }
.hero-grid img { width: 100%; height: 140px; object-fit: cover; }
.hero-photo { border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.hero-photo img { width: 100%; height: 240px; object-fit: cover; }
.hero-cover { position: relative; min-height: 440px; display: flex; align-items: flex-end; color: #fff; background: #222 center/cover no-repeat; }
.hero-cover::before { content: ''; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero-cover .wrap { position: relative; padding-bottom: 28px; width: 100%; }
.hero-cover p.lead { color: rgba(255,255,255,.88); }
.hero-cover .badge { color: #fff; opacity: .9; }
.hero-cover .btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.hero-cover .chips li { background: rgba(255,255,255,.16); color: #fff; }

/* category nav */
.cat-nav { position: sticky; top: 64px; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.cat-nav .wrap { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.cat-nav .wrap::-webkit-scrollbar { display: none; }
.cat-nav a { flex: none; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.cat-nav a:hover { border-color: var(--accent); }

/* sections */
section.block { padding: 28px 0; scroll-margin-top: 120px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { margin: 0; font-size: 28px; line-height: 1.1; }
.block-head .note { font-size: 13px; color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }

/* items */
.item { display: flex; text-align: start; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.thumb { flex: none; border-radius: var(--img-radius); overflow: hidden; background: var(--chip); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; font: 700 28px var(--display); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.item .name { font-weight: 700; font-size: 16px; line-height: 1.25; }
.item .desc { font-size: 13px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .price { font-weight: 700; margin-top: 4px; }
.add { margin-top: 6px; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; min-height: 34px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; }
.tags { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--ink); }

.list { display: grid; gap: 4px; }
.list .item { gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.list .thumb { width: 92px; height: 76px; }
.list .item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid .item, .rail .item { flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.grid .thumb, .rail .thumb { width: 100%; aspect-ratio: 4 / 3; border-radius: 0; }
.grid .item-body, .rail .item-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 42%); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.rail .item { scroll-snap-align: start; }

/* featured */
.special { display: grid; grid-template-columns: 1fr; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: var(--bg); cursor: pointer; border: 0; padding: 0; text-align: start; width: 100%; }
.special .thumb { width: 100%; height: 200px; border-radius: 0; }
.special .item-body { padding: 16px; }
.special .eyebrow { color: var(--accent); }
.special .name { font: var(--display-weight) 28px/1.1 var(--display); text-transform: var(--display-case); }
.special .add { margin-top: 10px; }

/* story */
.story { display: grid; gap: 18px; align-items: center; }
.story h2 { margin: 0 0 10px; font-size: 30px; line-height: 1.1; }
.story p { margin: 0 0 12px; color: var(--muted); }
.story-img { border-radius: var(--radius); overflow: hidden; }
.story-img img { width: 100%; height: 260px; object-fit: cover; }

/* reviews */
.reviews { display: grid; gap: 12px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0; }
.review blockquote { margin: 0 0 8px; }
.review figcaption { font-size: 13px; color: var(--muted); font-weight: 600; }

/* visit */
.visit { display: grid; gap: 18px; }
.visit-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.visit-card h3 { margin: 0 0 10px; font-size: 18px; }
.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours th, .hours td { padding: 6px 0; border-bottom: 1px solid var(--line); text-align: start; }
.hours td { text-align: end; color: var(--muted); }
.visit-card a { font-weight: 600; }
.visit-card p { margin: 0 0 8px; }

.site-foot { padding: 28px 0 96px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 20px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* item sheet */
.item-modal[hidden] { display: none; }
.item-modal { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.item-modal-card { position: relative; width: min(520px, 100%); max-height: 92vh; overflow-y: auto; background: var(--surface); color: var(--ink); border-radius: 18px 18px 0 0; }
.item-modal-img img { width: 100%; height: 240px; object-fit: cover; }
.item-modal-img:empty { display: none; }
.item-modal-body { padding: 18px 18px 24px; }
.item-modal-x { position: absolute; top: 10px; inset-inline-end: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 22px; cursor: pointer; z-index: 1; }
.item-modal-cat { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
#modal-name { margin: 4px 0 6px; font: var(--display-weight) 26px/1.15 var(--display); text-transform: var(--display-case); }
#modal-desc { color: var(--muted); margin: 0 0 8px; }
#modal-price { font-weight: 700; font-size: 18px; margin-bottom: 12px; }

/* ordering (cart, checkout, order status) — classes used by ordering.js */
.modal-add[hidden], .cart-fab[hidden], .drawer[hidden], #modal-order[hidden], #modal-size-wrap[hidden] { display: none !important; }
.modal-add { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.modal-add select, .modal-add input, .drawer input, .drawer textarea, .drawer select { width: 100%; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 15px; }
.modal-add label, .drawer label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; margin: 10px 0 5px; }
.qty { display: inline-flex; align-items: center; gap: 10px; }
.qty button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); font-size: 18px; cursor: pointer; line-height: 1; }
.qty span { min-width: 22px; text-align: center; font-weight: 800; }
.add-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.btn-gold { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; padding: 13px 20px; font-weight: 800; font-size: 15px; cursor: pointer; min-height: 46px; }
.btn-gold[disabled] { opacity: .5; cursor: default; }
.cart-fab { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 2500; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; padding: 15px 22px; font-weight: 900; font-size: 15px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.drawer { position: fixed; inset: 0; z-index: 3500; background: rgba(0,0,0,.5); display: flex; justify-content: flex-end; }
.drawer-panel { width: min(440px, 100%); height: 100%; background: var(--surface); color: var(--ink); overflow-y: auto; padding: 20px 20px 28px; position: relative; }
.drawer-panel h3 { font: var(--display-weight) 24px var(--display); margin: 4px 0 14px; }
.drawer-x { position: absolute; top: 12px; inset-inline-end: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--chip); font-size: 22px; cursor: pointer; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line .nm { font-weight: 700; }
.cart-line .sub { color: var(--muted); font-size: 12px; }
.cart-line .pr { font-weight: 800; text-align: end; }
.totals { margin: 14px 0; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.totals .grand { color: var(--ink); font-weight: 900; font-size: 17px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; padding: 11px; border-radius: 10px; border: 1px solid var(--line); background: transparent; font-weight: 700; cursor: pointer; }
.seg button.on { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: var(--accent); color: var(--accent); }
.form-err { color: #b42318; font-size: 13px; margin: 10px 0 0; min-height: 1em; }
.muted-note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.steps { display: flex; gap: 6px; margin: 14px 0 18px; }
.steps div { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.steps div::before { content: ''; display: block; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 6px; }
.steps div.done { color: var(--accent); }
.steps div.done::before { background: var(--accent); }
.order-no { font: 900 40px/1 var(--display); color: var(--accent); }

/* wider screens */
@media (min-width: 760px) {
  .hero { padding: 48px 0 16px; }
  .hero-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
  .hero-grid { margin: 0; border-radius: var(--radius); overflow: hidden; }
  .hero-grid img { height: 190px; }
  .hero-photo { margin: 0; }
  .hero-photo img { height: 380px; }
  .hero-cover { min-height: 520px; }
  .list { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .rail { grid-auto-columns: minmax(200px, 23%); }
  .special { grid-template-columns: 1.2fr 1fr; }
  .special .thumb { height: 100%; min-height: 260px; }
  .special .item-body { padding: 28px; align-self: center; }
  .story { grid-template-columns: 1fr 1fr; gap: 40px; }
  .story-img img { height: 380px; }
  .visit { grid-template-columns: 1fr 1fr; }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .item-modal { align-items: center; }
  .item-modal-card { border-radius: 18px; }
}
