:root {
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --font-accent: 'Caveat', cursive;
  --on-primary: #ffffff;
  --linen: #f4ede2;
  --paper: #fffaf2;
  --ink: #3a2f28;
  --muted: #7a6a5d;
  --sage: #6f8763;
  --sage-dark: #566c4c;
  --clay: #c0664a;
  --clay-dark: #a3523a;
  --thread: #d9c6ab;
  --radius: 18px;
  --shadow: 0 6px 18px rgba(80, 60, 40, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  background-image: radial-gradient(rgba(120, 96, 70, 0.05) 1px, transparent 1px);
  background-size: 6px 6px;
}
img { max-width: 100%; display: block; }
a { color: var(--clay-dark); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 0.4em; font-weight: 700; color: var(--head-color, inherit); }
h1 { font-size: calc(clamp(2rem, 5vw, 3.1rem) * var(--scale, 1)); }
h2 { font-size: calc(clamp(1.5rem, 3.4vw, 2.1rem) * var(--scale, 1)); }
h3 { font-size: calc(1.2rem * var(--scale, 1)); }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.script { font-family: var(--font-accent); color: var(--clay); font-size: calc(1.6rem * var(--scale, 1)); line-height: 1; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 50; }
.loading { text-align: center; padding: 80px 0; color: var(--muted); font-style: italic; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--linen); backdrop-filter: blur(6px); border-bottom: 2px dashed var(--thread); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--paper); border: 2px solid var(--thread); }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; }
.amp { font-family: var(--font-accent); color: var(--clay); font-size: 1.6rem; }
.site-nav { display: flex; gap: 6px; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover, .site-nav a.active { background: var(--paper); box-shadow: inset 0 0 0 2px var(--thread); }
.menu-toggle { display: none; }
.cart-button { position: relative; background: var(--sage); color: var(--on-primary); border: 0; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.cart-button:hover { background: var(--sage-dark); }
.cart-count { position: absolute; top: -4px; right: -4px; background: var(--clay); color: var(--on-primary); font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.cart-count[data-zero='true'] { display: none; }

@media (max-width: 820px) {
  .menu-toggle { display: inline-block; background: var(--paper); border: 2px solid var(--thread); border-radius: 999px; padding: 7px 14px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
  .site-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--paper); border-bottom: 2px dashed var(--thread); padding: 10px 18px 16px; }
  .site-nav.open { display: flex; }
  .brand-name { font-size: 1.1rem; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; padding: 12px 22px; border-radius: 999px; transition: transform 0.1s ease, background 0.2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--clay); color: var(--on-primary); }
.btn-primary:hover { background: var(--clay-dark); }
.btn-sage { background: var(--sage); color: var(--on-primary); }
.btn-sage:hover { background: var(--sage-dark); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--thread); }
.btn-ghost:hover { background: var(--paper); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.icon-btn { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ink); padding: 6px 10px; }

/* Sections */
section { padding: 48px 0; }
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 56px 0 40px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.hero-collage { position: relative; aspect-ratio: 1 / 1; }
.hero-collage img { position: absolute; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); border: 6px solid var(--paper); }
.hero-collage img:nth-child(1) { width: 62%; height: 62%; left: 0; top: 4%; transform: rotate(-3deg); }
.hero-collage img:nth-child(2) { width: 50%; height: 50%; right: 0; top: 0; transform: rotate(4deg); }
.hero-collage img:nth-child(3) { width: 52%; height: 52%; right: 8%; bottom: 0; transform: rotate(-2deg); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 32px; } .hero-collage { max-width: 420px; width: 100%; margin: 0 auto; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--paper); border-radius: var(--radius); padding: 28px; border: 2px dashed var(--thread); box-shadow: var(--shadow); }
.panel h2 { margin-top: 4px; }
.panel-link { text-decoration: none; color: inherit; display: block; transition: transform 0.15s; }
.panel-link:hover { transform: translateY(-3px); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head p { margin: 0; color: var(--muted); max-width: 40em; }

/* Filters */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 22px; }
.chip { font: inherit; font-size: 15px; font-weight: 700; background: var(--paper); color: var(--ink); border: 2px solid var(--thread); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chip.active { background: var(--sage); border-color: var(--sage); color: var(--on-primary); }
.pick { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.pick select { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--thread); background: var(--paper); color: var(--ink); max-width: 260px; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.card { background: var(--paper); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); border: 2px dashed transparent; transition: border-color 0.2s, transform 0.15s; display: flex; flex-direction: column; }
.card:hover { border-color: var(--thread); transform: translateY(-3px); }
.card-img { aspect-ratio: 1 / 1; background: var(--thread); object-fit: cover; width: 100%; }
.card-img.empty { display: grid; place-items: center; font-family: var(--font-accent); font-size: 1.5rem; color: var(--muted); }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-group { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.card-title { font-family: var(--font-head); font-size: 1.12rem; font-weight: 700; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.price { font-weight: 700; font-size: 1.1rem; color: var(--clay-dark); }
.stock { font-size: 13px; color: var(--sage-dark); font-weight: 700; }

/* Item page */
.item { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; padding: 36px 0; }
@media (max-width: 820px) { .item { grid-template-columns: 1fr; gap: 22px; } }
.gallery-main { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); background: var(--thread); box-shadow: var(--shadow); }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs button { padding: 0; border: 3px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; }
.thumbs button.active { border-color: var(--sage); }
.thumbs img { width: 70px; height: 70px; object-fit: cover; }
.item-info .price { font-size: 1.6rem; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--thread); border-radius: 999px; background: var(--paper); }
.qty button { font: inherit; font-weight: 700; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; color: var(--ink); }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }
.buy-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.back { display: inline-block; margin-top: 24px; font-weight: 700; text-decoration: none; }
.desc { white-space: pre-line; }

/* App card */
.app-card { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.app-card img { width: 96px; height: 96px; border-radius: 22px; background: #000; }
@media (max-width: 560px) { .app-card { grid-template-columns: 1fr; } }

/* Text pages */
.page { max-width: 760px; padding: 40px 0; }
.page .panel p { white-space: pre-line; }
.rates { width: 100%; border-collapse: collapse; margin-top: 10px; }
.rates td { padding: 10px 4px; border-bottom: 1px dashed var(--thread); }
.rates td:last-child { text-align: right; font-weight: 700; }

/* Cart drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(58, 47, 40, 0.35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--paper); z-index: 41; transform: translateX(100%); transition: transform 0.25s ease; display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12); }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 2px dashed var(--thread); }
.drawer-head h2 { margin: 0; font-size: 1.4rem; }
.drawer-body { padding: 16px 20px 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; }
.cart-line img, .cart-line .ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--thread); }
.cart-line .t { font-weight: 700; line-height: 1.3; }
.cart-line .qty button { width: 30px; height: 30px; }
.totals { border-top: 2px dashed var(--thread); padding-top: 12px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-weight: 700; font-size: 1.15rem; }
.notice { background: #fff3e6; border: 1px solid #f0d2b3; border-radius: 12px; padding: 12px 14px; font-size: 15px; }

/* Footer */
.site-footer { margin-top: 40px; border-top: 2px dashed var(--thread); padding: 30px 0 40px; background: rgba(255, 250, 242, 0.6); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.footer-brand { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--ink); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--clay-dark); }

.preview-banner { background: var(--clay); color: var(--on-primary); text-align: center; font-weight: 700; padding: 6px 12px; font-size: 14px; }

/* Delivery details form (cart) */
.details { display: flex; flex-direction: column; gap: 10px; border-top: 2px dashed var(--thread); padding-top: 14px; }
.details h3 { margin: 0; }
.paychoice { border: 1px solid var(--thread); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.paychoice legend { font-weight: 700; padding: 0 6px; }
.paychoice label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.bank-table { border-collapse: collapse; margin: 8px 0 12px; }
.bank-table td { padding: 4px 16px 4px 0; }
.details .field { display: flex; flex-direction: column; gap: 3px; font-size: 14px; font-weight: 700; }
.details input, .details select { font: inherit; font-weight: 400; padding: 9px 11px; border: 2px solid var(--thread); border-radius: 10px; background: #fff; color: var(--ink); }
.details input:focus, .details select:focus { outline: none; border-color: var(--sage); }
.details .row2 { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }

/* Own logo: full image, no circle, no shop name beside it */
.brand.has-logo img { width: auto; height: 56px; max-width: 220px; border-radius: 0; border: 0; background: none; object-fit: contain; }
.brand.has-logo .brand-name { display: none; }
@media (max-width: 820px) { .brand.has-logo img { height: 44px; max-width: 160px; } }

/* ---------- Editable elements (Website → Pages in the app) ---------- */
.header-inner > .el-brand { margin-right: auto; }
.header-inner > .el, .footer-inner > .el { display: flex; align-items: center; }
.brand.brand-logo .brand-name { display: none; }
.brand.logo-none img { width: auto; height: 56px; max-width: 220px; border-radius: 0; border: 0; background: none; object-fit: contain; }
.brand.logo-square img { border-radius: 0; }
.brand.logo-rounded img { border-radius: 12px; }
.brand.logo-pill img, .brand.logo-arch img { border-radius: 999px 999px 10px 10px; }
@media (max-width: 820px) { .brand.logo-none img { height: 44px; max-width: 160px; } }
.site-nav.lay-underline a { border-radius: 0; }
.site-nav.lay-underline a:hover, .site-nav.lay-underline a.active { background: none; box-shadow: inset 0 -3px 0 var(--clay); }
.site-nav.lay-plain a:hover, .site-nav.lay-plain a.active { background: none; box-shadow: none; color: var(--clay-dark); }
.footer-links.lay-stacked { flex-direction: column; gap: 6px; }
.site-header.static { position: static; }
.site-footer.static { margin-top: 0; }
.footer-inner.static, .header-inner { padding-left: 0; }

/* alignment, width, size */
.el.al-center { text-align: center; }
.el.al-right { text-align: right; }
.el.al-center .hero-actions, .el.al-center .btn-group, .el.al-center .section-head, .el.al-center .toolbar { justify-content: center; }
.el.al-right .hero-actions, .el.al-right .btn-group, .el.al-right .section-head, .el.al-right .toolbar { justify-content: flex-end; }
.el.al-center .section-head p, .el.al-center .hero p.lead { margin-left: auto; margin-right: auto; }
.el.al-center .figure img, .el.al-center .app-card img { margin-left: auto; margin-right: auto; }
.el.w-narrow { max-width: 760px; }
.el.w-wide { width: 100vw; margin-left: calc(50% - 50vw); padding-left: max(18px, calc(50vw - 570px)); padding-right: max(18px, calc(50vw - 570px)); }
.el.has-bg { padding: 6px 28px; border-radius: var(--radius); margin: 20px 0; }
.el.has-bg.w-wide { border-radius: 0; }
.text-block { padding: 40px 0; }
.text-block .panel { margin-top: 6px; }
.text-link { font-weight: 700; text-decoration: none; }
.divider { border: 0; border-top: 2px dashed var(--thread); margin: 24px 0; }
.spacer.sp-sm { height: 16px; } .spacer.sp-md { height: 40px; } .spacer.sp-lg { height: 80px; }
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-group.lay-stacked { flex-direction: column; align-items: flex-start; }
.el.al-center .btn-group.lay-stacked { align-items: center; }

/* hero layouts */
.hero.lay-image-left .hero-collage { order: -1; }
.hero.lay-image-below, .hero.lay-no-image, .hero.no-collage { grid-template-columns: 1fr; }
.hero.lay-image-below .hero-collage { max-width: 520px; width: 100%; }
.el.al-center .hero.lay-image-below .hero-collage { margin: 0 auto; }
.hero-collage.n1 img { width: 90%; height: 90%; left: 5%; top: 5%; transform: none; }
.hero-collage.n2 img:nth-child(2) { top: auto; bottom: 0; }

/* product grid layouts */
.grid.lay-grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid.lay-grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid.lay-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) { .grid.lay-grid-3, .grid.lay-grid-4 { grid-template-columns: repeat(2, 1fr); } }
.grid.lay-list { grid-template-columns: 1fr; }
.grid.lay-list .card { flex-direction: row; }
.grid.lay-list .card-img { width: 130px; flex-shrink: 0; }

/* panels */
.split.lay-stacked { grid-template-columns: 1fr; }
.panel-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: calc(var(--radius) - 6px); margin-bottom: 14px; }

/* feature card */
.app-card.lay-image-right img { order: 2; }
.app-card.lay-image-right { grid-template-columns: 1fr auto; }
.app-card.lay-image-top { grid-template-columns: 1fr; }

/* picture element */
.figure { margin: 0; position: relative; }
.figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.figure figcaption { margin-top: 10px; color: var(--muted); }
.figure.lay-caption-over figcaption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 18px 22px; color: #fff; font-weight: 700; font-size: 1.2rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); border-radius: 0 0 var(--radius) var(--radius); }
.pic-empty { border: 2px dashed var(--thread); border-radius: var(--radius); padding: 50px; text-align: center; color: var(--muted); }

/* picture shapes (any element) */
.el.shape-square .sh { border-radius: 0 !important; }
.el.shape-rounded .sh { border-radius: var(--radius) !important; }
.el.shape-circle .sh { border-radius: 50% !important; aspect-ratio: 1 / 1; object-fit: cover; }
.el.shape-arch .sh { border-radius: 999px 999px var(--radius) var(--radius) !important; }
.el.shape-pill .sh { border-radius: 999px !important; }
.el.shape-none .sh { border-radius: 0 !important; box-shadow: none !important; border: 0 !important; }
.el.shape-circle .card { overflow: visible; background: transparent; box-shadow: none; }
.el.shape-circle .card-img, .el.shape-arch .card-img { margin: 10px 10px 0; width: calc(100% - 20px); }

/* item options (variations) */
.option-pick { margin: 12px 0 0; }

/* ---------- Preview / edit mode (inside the app) ---------- */
.embedded .skip { display: none; }
.editing .el { position: relative; }
.editing .el:hover { outline: 2px dashed var(--clay); outline-offset: 4px; }
.atd-edit { position: absolute; top: 4px; right: 4px; z-index: 30; font: 700 13px/1 system-ui, sans-serif; background: #237f7f; color: #fff; border: 0; border-radius: 999px; padding: 6px 11px; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.header-inner .atd-edit, .footer-inner .atd-edit { top: -2px; right: -6px; padding: 3px 8px; font-size: 11px; }
.editing .el-hidden { opacity: 0.4; }
.editing .el-hidden::after { content: 'Hidden'; position: absolute; top: 4px; left: 4px; background: #555; color: #fff; font: 700 11px/1 system-ui; padding: 4px 8px; border-radius: 6px; }
.el-error { padding: 12px; border: 1px dashed #c62828; color: #c62828; }
.cart-sample { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); max-width: 420px; margin: 24px auto; }

/* Product card size (Products element → Style → Product card size).
   Sets how wide each card is; the grid fits as many as the screen allows. */
.grid.cs-xs { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.grid.cs-sm { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.grid.cs-md { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid.cs-lg { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.grid.cs-xs .card-body { padding: 8px 10px 10px; }
.grid.cs-xs .card-title { font-size: 0.92rem; }
.grid.cs-xs .card-group, .grid.cs-xs .stock { font-size: 11px; }
.grid.cs-xs .price { font-size: 0.95rem; }
.grid.cs-sm .card-body { padding: 10px 12px 14px; }
.grid.cs-sm .card-title { font-size: 1rem; }
.grid.lay-list.cs-xs .card-img { width: 70px; }
.grid.lay-list.cs-sm .card-img { width: 100px; }
.grid.lay-list.cs-lg .card-img { width: 180px; }
.grid.lay-list[class*='cs-'] { grid-template-columns: 1fr; }

/* Category tiles (Products element → Show as: Category tiles) */
.cat-card { font: inherit; text-align: left; padding: 0; cursor: pointer; width: 100%; }
.cat-card .card-title { margin-top: 2px; }
.toolbar strong { font-family: var(--font-head); font-size: 1.15rem; }

/* Ticked variations under an item title ("with: inside pocket"). */
.card-with { font-size: 0.85em; opacity: 0.75; margin-top: 2px; }
.item-with { font-size: 1rem; opacity: 0.75; margin: -4px 0 8px; }
.rewards-note { margin: 10px 0; padding: 10px 12px; border: 1px dashed var(--thread); border-radius: 12px; }
.rewards-note p { margin: 0 0 6px; }
.rewards-form { display: flex; gap: 8px; flex-wrap: wrap; }
.rewards-form input { flex: 1; min-width: 160px; padding: 8px 10px; border: 1px solid var(--thread); border-radius: 10px; font: inherit; }
.gv-page { max-width: 640px; }
.gv-amounts { display: flex; flex-wrap: wrap; gap: 10px; }
.gv-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--thread); border-radius: 999px; padding: 8px 14px; cursor: pointer; background: #fff; }
.gv-chip input[name="gvCustom"] { width: 70px; padding: 4px 6px; border: 1px solid var(--thread); border-radius: 8px; font: inherit; }
.details textarea { padding: 8px 10px; border: 1px solid var(--thread); border-radius: 10px; font: inherit; }
