

:root {
  /* --- Palette (override in Theme settings) ----------------------------- */
  --bone:       #F6EFE3;
  --paper:      #FCF7EE;
  --paper-2:    #F1E7D6;
  --ink:        #2C241C;
  --ink-soft:   #6B5D4F;
  --clay:       #B5613B;
  --clay-deep:  #8F4A2C;
  --olive:      #5C6446;
  --olive-deep: #3F4630;
  --sand:       #E5D7C0;
  --blush:      #E8C9A8;
  --success:    #5C6446;
  --error:      #A8442E;

  /* --- Type ------------------------------------------------------------- */
  --font-display: 'Fraunces', 'Hoefler Text', Georgia, serif;
  --font-body:    'Mulish', system-ui, -apple-system, sans-serif;
  --tracking:     -0.01em;

  /* --- Form & rhythm ---------------------------------------------------- */
  --radius:    18px;
  --radius-sm: 10px;
  --radius-lg: 32px;
  --shadow:    0 1px 2px rgba(44,36,28,.04), 0 12px 28px -12px rgba(44,36,28,.18);
  --shadow-lg: 0 2px 6px rgba(44,36,28,.05), 0 30px 60px -24px rgba(44,36,28,.28);
  --maxw:      1240px;
  --gutter:    clamp(1rem, 4vw, 2.5rem);
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---- Base ---------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bone);
  /* subtle paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  line-height: 1.6;
  letter-spacing: var(--tracking);
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
p { text-wrap: pretty; }

/* ---- Layout helpers ------------------------------------------------------ */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 760px; }
.section { padding-block: clamp(3rem, 8vw, 7rem); }
.stack > * + * { margin-top: 1.25rem; }
.eyebrow {
  font-family: var(--font-body); font-weight: 700; font-size: .72rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--clay);
}
.muted { color: var(--ink-soft); }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .9rem 1.7rem; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: .95rem; cursor: pointer; letter-spacing: .01em;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background-color .25s, color .25s, box-shadow .25s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--clay); color: var(--paper); box-shadow: 0 10px 22px -10px var(--clay-deep); }
.btn--primary:hover { background: var(--clay-deep); transform: translateY(-2px); }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bone); }
.btn--olive { background: var(--olive); color: var(--paper); }
.btn--olive:hover { background: var(--olive-deep); transform: translateY(-2px); }
.btn--block { width: 100%; }
.btn--lg { padding: 1.05rem 2.2rem; font-size: 1.02rem; }
.btn[disabled], .btn--disabled { opacity: .5; pointer-events: none; }

/* ---- Badges -------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; padding: .3rem .7rem; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.badge--sale { background: var(--clay); color: var(--paper); }
.badge--soldout { background: var(--ink); color: var(--bone); }
.badge--soft { background: var(--paper-2); color: var(--ink-soft); }

/* ---- Cards / surfaces ---------------------------------------------------- */
.surface { background: var(--paper); border: 1px solid var(--sand); border-radius: var(--radius); }

/* ---- Product card -------------------------------------------------------- */
.product-card { display: block; border-radius: var(--radius); overflow: hidden; background: var(--paper); border: 1px solid var(--sand); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card__media { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--paper-2); }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.product-card:hover .product-card__media img { transform: scale(1.06); }
.product-card__media .badge { position: absolute; top: .8rem; }
.product-card__media .badge--sale { left: .8rem; }
.product-card__media .badge--soldout { right: .8rem; }
.product-card__body { padding: 1.1rem 1.2rem 1.3rem; }
.product-card__vendor { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.product-card__title { font-family: var(--font-display); font-size: 1.18rem; line-height: 1.15; margin: .3rem 0 .55rem; }
.product-card__price { display: flex; align-items: baseline; gap: .55rem; font-weight: 800; }
.product-card__price .was { font-weight: 500; text-decoration: line-through; color: var(--ink-soft); font-size: .9em; }

/* ---- Product grid -------------------------------------------------------- */
.grid-products { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px)  { .grid-products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-products { grid-template-columns: repeat(4, 1fr); } }

/* ---- Forms --------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .4rem; }
.label { font-weight: 700; font-size: .85rem; }
.input, .select, .textarea {
  width: 100%; padding: .8rem 1rem; background: var(--paper); border: 1.5px solid var(--sand);
  border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 4px rgba(181,97,59,.12); }
.qty { display: inline-flex; align-items: stretch; border: 1.5px solid var(--sand); border-radius: 999px; overflow: hidden; background: var(--paper); }
.qty button { width: 2.6rem; background: transparent; border: 0; cursor: pointer; font-size: 1.2rem; color: var(--ink-soft); }
.qty button:hover { background: var(--paper-2); color: var(--ink); }
.qty input { width: 3rem; text-align: center; border: 0; background: transparent; }
.qty input::-webkit-inner-spin-button { display: none; }

/* ---- Header -------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bone) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--sand); }
.site-header__bar { display: flex; align-items: center; gap: 1.5rem; height: 74px; }
.brand { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.brand span { color: var(--clay); }
.nav { display: none; gap: 1.6rem; margin-inline: auto; }
.nav a { font-weight: 600; font-size: .98rem; position: relative; padding-block: .3rem; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--clay); transition: width .3s; }
.nav a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; position: relative; transition: background-color .2s; }
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 22px; height: 22px; }
.cart-count { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--clay); color: var(--paper); font-size: .68rem; font-weight: 800; display: grid; place-items: center; }
@media (min-width: 900px) { .nav { display: flex; } .nav-toggle { display: none; } }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); margin: var(--gutter); margin-bottom: 0; min-height: clamp(420px, 64vh, 680px); display: flex; align-items: flex-end; color: var(--paper); isolation: isolate; }
.hero__media, .hero__media img, .hero__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(44,36,28,.72), rgba(44,36,28,.15) 55%, transparent); }
.hero__card { padding: clamp(1.5rem, 5vw, 3.5rem); max-width: 620px; }
.hero__card .eyebrow { color: var(--blush); }
.hero h1 { color: var(--paper); margin: .6rem 0 1rem; }
.hero p { font-size: 1.1rem; opacity: .92; margin-bottom: 1.6rem; max-width: 48ch; }

/* ---- Banner / feature rows ---------------------------------------------- */
.banner { display: grid; gap: clamp(1.5rem,4vw,3rem); align-items: center; border-radius: var(--radius-lg); padding: clamp(1.5rem,4vw,3.5rem); }
@media (min-width: 800px) { .banner--split { grid-template-columns: 1fr 1fr; } .banner--split.is-flipped > .banner__media { order: -1; } }
.banner__media img { border-radius: var(--radius); width: 100%; object-fit: cover; box-shadow: var(--shadow); }

/* ---- Breadcrumb ---------------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--ink-soft); }
.crumbs a:hover { color: var(--clay); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: .4rem; opacity: .5; }
.crumbs ul, .crumbs ol { display: contents; list-style: none; }

/* ---- Pagination ---------------------------------------------------------- */
.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 3rem; }
.pager a, .pager span { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; border: 1.5px solid var(--sand); font-weight: 700; }
.pager a:hover { border-color: var(--clay); color: var(--clay); }
.pager .is-current { background: var(--ink); color: var(--bone); border-color: var(--ink); }

/* ---- Cart drawer --------------------------------------------------------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(44,36,28,.45); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 92vw); background: var(--bone); z-index: 70; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem var(--gutter); border-bottom: 1px solid var(--sand); }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--gutter); }
.drawer__foot { padding: var(--gutter); border-top: 1px solid var(--sand); background: var(--paper); }
.line-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; padding-block: 1.1rem; border-bottom: 1px solid var(--sand); }
.line-item img { border-radius: var(--radius-sm); aspect-ratio: 1; object-fit: cover; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--olive-deep); color: var(--bone); margin-top: clamp(3rem,8vw,6rem); }
.site-footer a:hover { color: var(--blush); }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; padding-block: clamp(3rem,6vw,5rem); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-col h4 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blush); margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .6rem; font-size: .95rem; opacity: .9; }
.footer-bottom { border-top: 1px solid rgba(246,239,227,.16); padding-block: 1.5rem; font-size: .85rem; opacity: .75; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.payment-icons { display: flex; gap: .5rem; align-items: center; }
.payment-icons img, .payment-icons svg { height: 24px; width: auto; opacity: .85; }

/* ---- Prose (RTE / page.html content) ------------------------------------ */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose a { color: var(--clay); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius); margin-block: 1.5rem; }
.prose blockquote { border-left: 3px solid var(--clay); padding-left: 1.2rem; font-style: italic; color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.4rem; display: grid; gap: .4rem; }

/* ---- Decorative section divider (organic wave) --------------------------- */
.deco-line { height: 2px; background: repeating-linear-gradient(90deg, var(--sand), var(--sand) 8px, transparent 8px, transparent 16px); border: 0; }

/* ---- Entrance animation -------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); animation: reveal .7s cubic-bezier(.2,.8,.2,1) forwards; }
  .reveal:nth-child(2) { animation-delay: .08s; }
  .reveal:nth-child(3) { animation-delay: .16s; }
  .reveal:nth-child(4) { animation-delay: .24s; }
  @keyframes reveal { to { opacity: 1; transform: none; } }
}

/* ---- Utilities ----------------------------------------------------------- */
.flow-lg > * + * { margin-top: 2.5rem; }
.text-center { text-align: center; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[x-cloak] { display: none !important; }
