/* =========================================================
   ALWAJIEHA — handmade with love
   Craft-maximalist design system
   (sections map 1:1 to future Gutenberg blocks — see README)
   ========================================================= */

/* ---------- tokens ----------
   The values live in theme.json (single source of truth, exposed in the
   editor UI); the mockup's names alias the generated presets so the rest
   of this file stays byte-identical to design4. Fallbacks keep the file
   readable and working outside WordPress. */
:root {
  /* loud, confident palette */
  --red: var(--wp--preset--color--red, #e23a2e);
  --red-deep: var(--wp--preset--color--red-deep, #b81f1f);
  --pink: var(--wp--preset--color--pink, #ff5da2);
  --pink-soft: var(--wp--preset--color--pink-soft, #ffd5e6);
  --pink-stripe: var(--wp--preset--color--pink-stripe, #e986b4);
  --teal: var(--wp--preset--color--teal, #0e8a7d);
  --teal-deep: var(--wp--preset--color--teal-deep, #0a6d63);
  --green: var(--wp--preset--color--green, #7c9d3b);        /* kale green — returns section */
  --green-deep: var(--wp--preset--color--green-deep, #5a7a23);
  --green-soft: var(--wp--preset--color--green-soft, #edf2d7);
  --cream: var(--wp--preset--color--cream, #fff6e9);
  --paper: var(--wp--preset--color--paper, #fffdf6);
  --kraft: var(--wp--preset--color--kraft, #f2c9a1);        /* envelope paper */
  --kraft-deep: var(--wp--preset--color--kraft-deep, #e0ae7e);
  --ink: var(--wp--preset--color--ink, #2b1c14);
  --wa-green: #25d366;
  --wa-bubble: #dcf8c6;

  /* type — Coming Soon (Apache 2.0) for titles, Open Sans for everything else.
     attribution lives on the licenses page; font files ship with the theme */
  --f-display: var(--wp--preset--font-family--display, "Coming Soon", cursive);
  --f-body: var(--wp--preset--font-family--body, "Open Sans", sans-serif);

  /* craft bits — soft paper-cut shadows, no hard outlines */
  --shadow-hard: var(--wp--custom--shadow-hard, 6px 6px 0 rgba(43, 28, 20, .13));
  --shadow-hard-sm: var(--wp--custom--shadow-hard-sm, 3px 3px 0 rgba(43, 28, 20, .13));
  --border-soft: var(--wp--custom--border-soft, 2px solid #f0d9c8);
  --radius-blob: var(--wp--custom--radius-blob, 62% 38% 55% 45% / 48% 60% 40% 52%);

  --header-h: var(--wp--custom--header-h, 64px);
}

/* ---------- cloth patterns (pure CSS fabric) ---------- */
.bg-gingham-red, .is-style-bg-gingham-red {
  background-color: #ffc2be;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(255, 246, 233, .42) 0 18px, transparent 18px 36px),
    repeating-linear-gradient(90deg,
      rgba(255, 246, 233, .42) 0 18px, transparent 18px 36px);
}
.bg-denim, .is-style-bg-denim {
  /* washed jeans fabric — indigo base + diagonal twill ridges */
  background-color: #4a6b9d;
  background-image:
    repeating-linear-gradient(63deg,
      rgba(255, 255, 255, .1) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-27deg,
      rgba(23, 42, 77, .16) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(15, 30, 60, .12));
}
.bg-stripe-pink, .is-style-bg-stripe-pink {
  /* hand-painted pink stripes — who-am-i inspiration */
  background-color: #fdf3ef;
  background-image: repeating-linear-gradient(90deg,
    var(--pink-stripe) 0 34px, transparent 34px 78px);
}
.bg-dots-green, .is-style-bg-dots-green {
  background-color: var(--green);
  background-image: radial-gradient(rgba(255, 246, 233, .35) 3px, transparent 3.5px);
  background-size: 34px 34px;
}
.bg-dots-ink, .is-style-bg-dots-ink {
  /* hand-painted black polka dots — seamless tile (assets/img/dots-black-seamless.png) */
  background-color: #f0ecdf;
  background-image: url("../assets/img/dots-black-seamless.png");
  background-size: 440px auto;
}
.bg-linen-yellow, .is-style-bg-linen-yellow {
  /* pale yellow linen photo (assets/img/linen-yellow.jpg) */
  background-color: #f5e6a0;
  background-image: url("../assets/img/linen-yellow.jpg");
  background-size: 460px auto;
}
.bg-gingham-pink, .is-style-bg-gingham-pink {
  background-color: #f7a8c4;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 253, 246, .5) 0 16px, transparent 16px 32px),
    repeating-linear-gradient(90deg, rgba(255, 253, 246, .5) 0 16px, transparent 16px 32px);
}
.bg-cream, .is-style-bg-cream { background-color: var(--cream); }

/* woven texture laid over any pattern for a fabric feel */
.weave::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg, rgba(0,0,0,.028) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 5px);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-weight: 400;
  letter-spacing: .015em;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.3; margin: 0; }
b, strong { font-weight: 400; }
p { line-height: 1.8; }
::selection { background: var(--pink-soft); color: var(--ink); }

.container { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }

section { position: relative; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
  color: #000;
  box-shadow: 0 4px 14px rgba(43, 28, 20, .1);
}
.site-header .container {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.brand .brand-ar {
  font-size: .8rem;
  color: #000;
  transform: rotate(-4deg);
  border: 2px dashed #000;
  border-radius: 999px;
  padding: .05rem .5rem;
  white-space: nowrap;
}
.main-nav { display: flex; gap: .25rem; }
.main-nav a {
  text-decoration: none;
  font-size: .95rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  transition: .15s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  background: var(--pink-soft);
  transform: rotate(-2deg);
}
.cart-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: var(--red);
  color: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-hard-sm);
  text-decoration: none;
  transition: .15s;
}
.cart-link svg { width: 22px; height: 22px; }
.cart-link:active { translate: 2px 2px; box-shadow: 1px 1px 0 rgba(43,28,20,.13); }
.cart-count {
  position: absolute;
  top: -9px; inset-inline-start: -9px;
  min-width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--ink);
  color: #fff;
  font-size: .75rem;
  border: 2px solid #fff;
  border-radius: 999px;
  padding-inline: 4px;
}
.cart-count[data-zero="true"] { display: none; }

/* mobile nav: collapses into a sewn pocket */
.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  background: var(--pink-soft);
  border: none;
  border-radius: 14px;
  box-shadow: var(--shadow-hard-sm);
  font-size: 1.2rem;
}
@media (max-width: 720px) {
  .nav-toggle { display: grid; place-items: center; }
  .main-nav {
    position: absolute;
    top: calc(var(--header-h) + 8px);
    inset-inline: 1rem;
    flex-direction: column;
    background: var(--paper);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(43, 28, 20, .25);
    padding: .75rem;
    display: none;
  }
  .main-nav.open { display: flex; }
}

/* ---------- buttons (red) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--f-body);
  font-size: 1.05rem;
  text-decoration: none;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: 999px;
  padding: .75rem 1.7rem;
  box-shadow: var(--shadow-hard);
  position: relative;
  transition: .15s;
}
.btn:hover { rotate: -1.5deg; scale: 1.03; background: var(--red-deep); }
.btn:active { translate: 3px 3px; box-shadow: 1px 1px 0 rgba(43,28,20,.13); }
.btn--ghost { background: var(--paper); color: var(--ink); }
.btn--ghost:hover { background: var(--paper); }
.btn--lg { font-size: 1.25rem; padding: .95rem 2.2rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* lace trims between landing-page sections (inspiration/duntel_*) —
   sewn to the hem of the section above, draping over the next one */
.lace {
  --lace-h: 54px;
  position: relative;
  z-index: 5;
  height: var(--lace-h);
  margin-bottom: calc(var(--lace-h) * -.6);
  background-repeat: repeat-x;
  background-size: auto 100%;
  pointer-events: none;
  filter: drop-shadow(0 4px 5px rgba(43, 28, 20, .26));
}
.lace--orange { background-image: url("../assets/img/lace-orange.png"); }
.lace--white  { background-image: url("../assets/img/lace-white.png"); --lace-h: 68px; }
.lace--pink   { background-image: url("../assets/img/lace-pink.png"); --lace-h: 44px; }
.lace--green  {
  /* straight band — a ribbon stitched right across the seam */
  background-image: url("../assets/img/lace-green.png");
  --lace-h: 38px;
  margin-block: calc(var(--lace-h) / -2);
}
@media (max-width: 719px) {
  .lace { --lace-h: 36px; }
  .lace--white { --lace-h: 46px; }
  .lace--pink { --lace-h: 30px; }
  .lace--green { --lace-h: 26px; }
}

/* ---------- sticker treatment for transparent PNGs ---------- */
.sticker {
  filter:
    drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff)
    drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)
    drop-shadow(4px 6px 6px rgba(43, 28, 20, .35));
}
.sticker--peel { transition: rotate .25s, scale .25s; }
.sticker--peel:hover { rotate: 4deg; scale: 1.06; }

/* washi tape */
.tape {
  position: absolute;
  width: 92px; height: 28px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 6px, transparent 6px 12px),
    rgba(255, 93, 162, .75);
  box-shadow: 0 2px 4px rgba(43,28,20,.18);
  opacity: .95;
  clip-path: polygon(2% 0, 98% 4%, 100% 96%, 0 100%);
}
.tape--teal { background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 6px, transparent 6px 12px),
    rgba(14, 138, 125, .7); }

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 2.2rem 0 4.5rem;
  overflow: hidden;
}
.hero .container {
  display: grid;
  gap: 1.4rem;
  justify-items: center;
  text-align: center;
}
.hero-title {
  color: var(--ink);
  font-size: clamp(1.7rem, 5.5vw, 3rem);
}
.hero-sub {
  color: #fff;
  background: var(--teal);
  border-radius: 999px;
  padding: .4rem 1.2rem;
  rotate: 1.5deg;
  font-size: clamp(.9rem, 3vw, 1.1rem);
  margin: 0;
}

/* the portrait + bubbles scene */
.hero-scene {
  position: relative;
  width: min(420px, 88vw);
  margin-top: .8rem;
}
.hero-photo {
  width: 72%;
  margin-inline: auto;
  border-radius: var(--radius-blob);
  border: 6px solid #fff;
  box-shadow: 8px 10px 0 rgba(43, 28, 20, .22);
  rotate: -2deg;
  overflow: hidden;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.bubble {
  position: absolute;
  font-size: clamp(.8rem, 2.6vw, 1rem);
  background: var(--paper);
  padding: .5rem .9rem;
  border-radius: 30px 30px 30px 6px;
  box-shadow: 0 6px 16px rgba(43, 28, 20, .22);
  max-width: 12rem;
  text-align: center;
  animation: bob 4s ease-in-out infinite;
}
.bubble--flip { border-radius: 30px 30px 6px 30px; }
.bubble--red { background: var(--red); color: #fff; }
.bubble--pink { background: var(--pink); color: #fff; }
.bubble--teal { background: var(--teal); color: #fff; }
.b1 { top: -6%; inset-inline-start: -4%; rotate: -6deg; animation-delay: 0s; }
.b2 { top: 12%; inset-inline-end: -6%; rotate: 5deg; animation-delay: .6s; }
.b3 { bottom: 26%; inset-inline-start: -8%; rotate: 4deg; animation-delay: 1.2s; }
.b4 { bottom: -4%; inset-inline-end: -2%; rotate: -4deg; animation-delay: 1.8s; }
.b5 { top: 48%; inset-inline-start: -10%; rotate: -6deg; animation-delay: 2.4s; }
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* floating product stickers in hero */
.hero-float {
  position: absolute;
  width: clamp(70px, 18vw, 110px);
  animation: bob 5s ease-in-out infinite;
}
.hf1 { bottom: 2%; inset-inline-start: -10%; rotate: -12deg; }
.hf2 { top: 38%; inset-inline-end: -12%; rotate: 14deg; animation-delay: 1s; }

/* ---------- marquee ribbon ---------- */
.ribbon {
  background: var(--red);
  color: var(--cream);
  overflow: hidden;
  padding: .6rem 0;
  position: relative;
  z-index: 3;
}
.ribbon-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 22s linear infinite;
  font-size: 1rem;
  white-space: nowrap;
}
.ribbon-track span { display: inline-flex; gap: 2.5rem; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   SHOP PREVIEW + PRODUCT CARDS
   ============================================ */
.section-head { text-align: center; display: grid; gap: .6rem; justify-items: center; margin-bottom: 2rem; }
.section-title {
  font-size: clamp(1.4rem, 4.6vw, 2.3rem);
  position: relative;
  display: inline-block;
  rotate: -1.5deg;
}
.section-title .scribble {
  position: absolute;
  inset-inline: -8%;
  bottom: -14px;
  height: 18px;
  color: var(--red);
}
.shop-preview { padding: 3.5rem 0 4.5rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 720px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
  .product-grid--shop { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 980px) {
  .product-grid--shop { grid-template-columns: repeat(4, 1fr); }
}

.product-card {
  position: relative;
  padding: 1rem .8rem .9rem;
  display: grid;
  gap: .5rem;
  justify-items: center;
  text-align: center;
  transition: rotate .2s;
}
.product-card:nth-child(odd) { rotate: -1.2deg; }
.product-card:nth-child(even) { rotate: 1.2deg; }
.product-card:hover { rotate: 0deg; }
.p-link {
  display: grid;
  gap: .5rem;
  justify-items: center;
  width: 100%;
  text-decoration: none;
}
.product-card .p-img {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: .4rem;
}
.product-card .p-img img {
  max-height: 100%;
  transition: .25s;
}
.product-card:hover .p-img img { rotate: -5deg; scale: 1.07; }
.p-name { font-family: var(--f-body); font-size: .98rem; line-height: 1.4; }
.p-price {
  font-size: .9rem;
  background: var(--pink-soft);
  border-radius: 999px;
  padding: .15rem .75rem;
  rotate: -2deg;
}
.p-add {
  width: 100%;
  font-family: var(--f-body);
  font-size: .9rem;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: .55rem;
  box-shadow: var(--shadow-hard-sm);
  transition: .15s;
}
.p-add:hover { background: var(--red-deep); }
.p-add:active { translate: 2px 2px; box-shadow: none; }

/* shop page filter chips */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2rem; }
.chip {
  font-family: var(--f-body);
  font-size: .9rem;
  background: var(--paper);
  border: none;
  border-radius: 999px;
  padding: .45rem 1.1rem;
  box-shadow: var(--shadow-hard-sm);
  transition: .15s;
}
.chip[aria-pressed="true"] {
  background: var(--red);
  color: #fff;
  translate: 2px 2px;
  box-shadow: none;
  rotate: -2deg;
}

/* ============================================
   REVIEWS — cork board + sticky notes
   ============================================ */
.reviews { padding: 4rem 0 4.5rem; }
.reviews .section-title { color: var(--cream); }
.board {
  /* real cork photo (assets/img/cork-texture.jpg) inside a wooden frame */
  position: relative;
  border: 18px solid transparent;
  border-radius: 8px;
  background:
    url("../assets/img/cork-texture.jpg") padding-box,
    repeating-linear-gradient(100deg,
      rgba(255, 255, 255, .14) 0 2px, transparent 2px 7px,
      rgba(60, 36, 16, .12) 7px 9px, transparent 9px 14px) border-box,
    linear-gradient(170deg, #c8965e, #8f5f30) border-box;
  background-size: 600px auto, auto, auto;
  box-shadow:
    inset 0 0 0 3px rgba(60, 36, 16, .45),
    inset 0 0 46px rgba(43, 28, 20, .4),
    var(--shadow-hard), 0 14px 30px rgba(43, 28, 20, .25);
  padding: 2.2rem 1.1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  justify-items: center;
}
@media (min-width: 720px) {
  .board { grid-template-columns: repeat(3, 1fr); padding: 2.6rem 2rem; }
}

.note {
  position: relative;
  width: min(290px, 100%);
  background: #fdf6c9;
  border-radius: 4px;
  box-shadow: 3px 6px 12px rgba(43, 28, 20, .4);
  padding: 1.7rem .9rem .9rem;
  font-size: .82rem;
}
.note--pink { background: #ffe1ee; }
.note--blue { background: #def0ff; }
.note:nth-child(1) { rotate: -3deg; }
.note:nth-child(2) { rotate: 2.5deg; translate: 0 14px; }
.note:nth-child(3) { rotate: -1.5deg; }

/* real screenshots (Appearance → Love notes) — mixed portrait/landscape
   shots at their natural ratio, laid out masonry-style with CSS columns */
.board--shots {
  display: block;
  columns: 1;
  column-gap: 1.6rem;
}
@media (min-width: 720px) {
  /* two wide columns — the screenshots are text, they need the size */
  .board--shots { columns: 2; }
}
/* our display:block would defeat the UA's [hidden] rule — restate it */
.board--shots .note[hidden] { display: none; }
.note--shot {
  display: block;
  width: min(460px, 100%);
  break-inside: avoid;
  padding: 1.5rem .7rem .7rem;
  margin-inline: auto;
}
.note--shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 2px solid rgba(43, 28, 20, .12);
  background: #fff;
}
.note-zoom { display: block; cursor: zoom-in; }

/* click-to-enlarge lightbox (theme.js opens it; the link is the fallback) */
.note-lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 640px);
}
.note-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 90dvh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  cursor: zoom-out;
}
.note-lightbox::backdrop { background: rgba(43, 28, 20, .82); }
/* rotation cycle works for any number of notes, in any shuffled order */
.board--shots .note:nth-child(3n+1) { rotate: -2.5deg; translate: none; }
.board--shots .note:nth-child(3n+2) { rotate: 2deg; translate: none; }
.board--shots .note:nth-child(3n) { rotate: -1deg; translate: none; }

.pin {
  position: absolute;
  top: 8px; inset-inline-start: 50%;
  translate: -50%;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff8a8a, var(--red-deep));
  box-shadow: 2px 4px 4px rgba(43, 28, 20, .45);
  z-index: 2;
}

/* ============================================
   WHO AM I
   ============================================ */
.who {
  padding: 3.5rem 0 5rem;
  overflow: hidden;
}
.who-title {
  text-align: center;
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  color: var(--ink);
  margin-bottom: 2rem;
}
.who-scene {
  position: relative;
  width: min(980px, 100%);
  margin-inline: auto;
  display: grid;
  gap: 1.4rem;
  justify-items: center;
}
.who-photo {
  position: relative;
  width: min(280px, 62vw);
  z-index: 1;
}
.who-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 48% 52% 50% 50% / 56% 54% 46% 44%;
}
.who-photo svg.scribble-frame {
  position: absolute;
  inset: -7%;
  width: 114%;
  height: 114%;
  color: var(--red-deep);
  pointer-events: none;
}
.who-facts {
  display: grid;
  gap: 1rem;
  width: 100%;
}
.fact {
  font-size: clamp(.82rem, 2.6vw, .95rem);
  color: var(--ink);
  text-align: center;
  line-height: 1.9;
  margin: 0;
  rotate: -1.5deg;
}
.fact:nth-child(even) { rotate: 1.5deg; }
.fact .arrow {
  /* points at the photo: rightwards from the left column, mirrored on the right */
  display: none;
  width: 42px; height: 24px;
  margin-top: .25rem;
  color: var(--red-deep);
}
.arrow--flip { transform: scaleX(-1); }
.who-fact-last { margin-top: 1.6rem; }
@media (min-width: 720px) {
  .who-scene {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 2.5rem;
  }
  .who-facts { gap: 2.4rem; }
  .fact .arrow { display: block; }
  .who-facts--left .fact { text-align: end; }
  .who-facts--left .arrow { margin-inline-start: auto; }
  .who-facts--right .fact { text-align: start; }
}

/* ============================================
   RETURN POLICY — open notebook on polka dots
   ============================================ */
.policy { padding: 3.5rem 0 5rem; color: #000; }
.policy .section-title {
  /* paper label stitched onto the dotted fabric, so the title
     always reads against the busy black-and-white background */
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow-hard-sm), 0 4px 14px rgba(43, 28, 20, .14);
  padding: .8rem 2rem .9rem;
  position: relative;
}
.policy .section-title::before {
  /* stitch line */
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px dashed rgba(184, 31, 31, .5);
  border-radius: 10px;
  pointer-events: none;
}
.policy-book {
  /* the spread (assets/img/notebook.png) is split in two so the pages
     sit side by side on desktop; on mobile everything fits on ONE page */
  width: min(820px, 100%);
  margin-inline: auto;
  display: grid;
  filter: drop-shadow(8px 12px 16px rgba(43, 28, 20, .22));
}
.book-page {
  display: grid;
  align-content: center;
  gap: 1.2em;
  font-family: var(--f-display);
  color: #2b3a5c;                       /* ink */
  -webkit-text-stroke: .3px currentColor;
  font-size: clamp(.85rem, 3.4vw, 1.05rem);
}
@media (min-width: 720px) {
  .policy-book { grid-template-columns: 1fr 1fr; }
  .book-page {
    aspect-ratio: 477 / 697;
    background-image: url("../assets/img/notebook.png");
    background-size: 200% 100%;
    background-repeat: no-repeat;
    font-size: clamp(.85rem, 1.6vw, 1.05rem);
  }
  .book-page--left  { background-position: 0 0; padding: 10% 15% 13% 18%; }
  .book-page--right { background-position: 100% 0; padding: 10% 18% 13% 15%; }
}
@media (max-width: 719px) {
  /* one single page holds the whole policy */
  .policy-book {
    width: min(460px, 100%);
    aspect-ratio: 477 / 697;
    background-image: url("../assets/img/notebook.png");
    background-size: 200% 100%;
    background-position: 0 0;
    background-repeat: no-repeat;
    align-content: center;
    padding: 11% 14% 13% 18%;
    gap: .9em;
  }
  .book-page { gap: .9em; font-size: clamp(.78rem, 3vw, .95rem); }
}
.book-head {
  font-size: 1.35em;
  color: var(--red-deep);
  rotate: -2deg;
  margin: 0;
}
.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1em;
  line-height: 1.6;
}
.book-list li { position: relative; padding-inline-start: 1.1em; rotate: -.6deg; }
.book-list li:nth-child(even) { rotate: .5deg; }
.book-list li::before { content: "—"; position: absolute; inset-inline-start: 0; }
.book-sign {
  margin: 0;
  font-size: 1.15em;
  color: var(--red-deep);
  rotate: -3deg;
  text-align: end;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #fff;
  color: #000;
  padding: 3rem 0 5.5rem;
  text-align: center;
  position: relative;
}
.site-footer::before {
  /* stitched hem */
  content: "";
  position: absolute;
  top: 12px; inset-inline: 0;
  border-top: 3px dashed rgba(0, 0, 0, .3);
}
.site-footer .container { display: grid; gap: 1rem; justify-items: center; }
.site-footer img { height: 34px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; }
.footer-links a { color: #000; text-decoration: none; }
.footer-links a:hover { color: var(--red); }
.footer-heart { font-size: .85rem; color: #000; margin: 0; }

/* ============================================
   SHOP PAGE
   ============================================ */
.page-hero {
  padding: 2.6rem 0 3.4rem;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.7rem, 6vw, 2.7rem);
  color: var(--ink);
}
.page-hero p {
  color: var(--ink);
  margin: .6rem 0 0;
}
.shop-body { padding: 2.8rem 0 5rem; }

/* ============================================
   PRODUCT DETAILS PAGE
   ============================================ */
.product-page { padding: 2.2rem 0 4.5rem; }
.crumbs {
  font-size: .85rem;
  margin-bottom: 1.6rem;
}
.crumbs a { color: var(--red); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { opacity: .55; }

.pd-grid { display: grid; gap: 2rem; }
@media (min-width: 880px) {
  .pd-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* gallery */
.pd-gallery { display: grid; gap: .9rem; }
.pd-main {
  background: var(--paper);
  border-radius: 24px;
  box-shadow: var(--shadow-hard), 0 2px 10px rgba(43, 28, 20, .08);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 2rem;
  overflow: hidden;
  position: relative;
}
.pd-main.bg-gingham-red, .pd-main.bg-stripe-pink { box-shadow: var(--shadow-hard); }
.pd-main img {
  max-height: 100%;
  transition: transform .35s;
}
.pd-main[data-view="detail"] img { transform: scale(1.9) rotate(-3deg); }
.pd-main[data-view="back"] img { transform: scaleX(-1); }
.pd-thumbs { display: flex; gap: .7rem; justify-content: center; }
.pd-thumb {
  width: 84px;
  background: var(--paper);
  border: 3px solid transparent;
  border-radius: 16px;
  box-shadow: var(--shadow-hard-sm);
  padding: .5rem .4rem .35rem;
  display: grid;
  gap: .2rem;
  justify-items: center;
  font-family: var(--f-body);
  font-size: .62rem;
  color: var(--ink);
  transition: .15s;
}
.pd-thumb img { height: 44px; object-fit: contain; }
.pd-thumb[aria-pressed="true"] { border-color: var(--red); rotate: -2deg; }
.pd-thumb[data-view="detail"] img { transform: scale(1.8); }
.pd-thumb[data-view="back"] img { transform: scaleX(-1); }
.pd-thumb { overflow: hidden; }

/* info column */
.pd-info { display: grid; gap: 1.1rem; align-content: start; }
.pd-info h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); rotate: -1deg; }
.pd-price-row { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.pd-price {
  font-family: var(--f-display);
  font-size: 1.4rem;
  color: var(--red);
}
.pd-tag {
  font-size: .78rem;
  background: var(--pink-soft);
  border-radius: 999px;
  padding: .2rem .8rem;
  rotate: -2deg;
}
.pd-desc {
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow-hard-sm);
  padding: 1.1rem 1.2rem;
  margin: 0;
  font-size: .95rem;
}

/* handmade disclaimer — every piece differs from the photo */
.pd-handmade {
  background: var(--pink-soft);
  border: 2px dashed var(--red);
  border-radius: 18px;
  padding: 1rem 1.2rem;
  color: #000;
  display: grid;
  gap: .4rem;
}
.pd-handmade h2 { font-size: 1.05rem; }
.pd-handmade p { margin: 0; font-size: .92rem; line-height: 1.8; }

/* size chart: measuring-tape table */
.pd-sizes {
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow-hard-sm);
  padding: 1.1rem 1.2rem 1.3rem;
}
.pd-sizes h2 {
  font-size: 1rem;
  margin-bottom: .7rem;
  color: var(--red-deep);
}
.size-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.size-table td { padding: .5rem .2rem; }
.size-table tr + tr td { border-top: 2px dotted rgba(43, 28, 20, .2); }
.size-table td:last-child { text-align: end; color: var(--red-deep); }
.pd-sizes .hint { font-size: .75rem; opacity: .65; display: block; margin-top: .5rem; }

.pd-buy { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.pd-buy .qty {
  background: var(--paper);
  border-radius: 999px;
  box-shadow: var(--shadow-hard-sm);
  padding: .3rem .5rem;
}

/* recommended */
.pd-reco { margin-top: 3.5rem; }
.pd-reco .section-head { margin-bottom: 1.6rem; }

/* ============================================
   CART PAGE
   ============================================ */
.cart-body { padding: 2.5rem 0 5rem; }
.cart-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) {
  .cart-grid { grid-template-columns: 1.1fr .9fr; align-items: start; }
}

.basket-scene {
  position: relative;
  width: min(440px, 100%);
  margin-inline: auto;
  aspect-ratio: 1 / .95;
}
.basket-scene .basket-img {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  width: 100%;
  filter: drop-shadow(6px 10px 0 rgba(43, 28, 20, .18));
}
.basket-item {
  position: absolute;
  width: 27%;
  z-index: 2;
  animation: dropIn .5s cubic-bezier(.2, 1.4, .4, 1) backwards;
}
.basket-item img { width: 100%; }
@keyframes dropIn {
  from { translate: 0 -60px; opacity: 0; rotate: 0deg; }
}
.price-tag {
  position: absolute;
  bottom: -12px;
  inset-inline-end: -18px;
  background: var(--paper);
  color: var(--red-deep);
  border-radius: 6px 12px 12px 6px;
  font-size: .68rem;
  font-family: var(--f-body);
  padding: .15rem .5rem .15rem .4rem;
  box-shadow: 2px 2px 0 rgba(43,28,20,.22);
  rotate: 8deg;
  white-space: nowrap;
}
.price-tag::before {
  /* tag hole */
  content: "";
  position: absolute;
  top: 50%; inset-inline-start: 3px;
  translate: 0 -50%;
  width: 5px; height: 5px;
  background: var(--pink-soft);
  border-radius: 50%;
}
.basket-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: .8rem;
  font-size: 1.1rem;
  z-index: 3;
}

/* quantity editor list */
.cart-lines { display: grid; gap: .7rem; margin-top: 1.2rem; }
.cart-line {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow-hard-sm);
  padding: .5rem .7rem;
}
.cart-line img { width: 52px; height: 52px; object-fit: contain; }
.cart-line .l-name { flex: 1; font-size: .88rem; }
.cart-line small { color: var(--red-deep); }
.qty {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.qty button {
  width: 30px; height: 30px;
  border: none;
  border-radius: 10px;
  background: var(--pink-soft);
  font-size: 1rem;
  line-height: 1;
}
.qty button:active { translate: 1px 1px; }
.qty .q { min-width: 1.4ch; text-align: center; }
.l-remove {
  background: none;
  border: none;
  font-size: 1.05rem;
  opacity: .6;
}
.l-remove:hover { opacity: 1; }

/* delivery zone picker */
.zone-picker {
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow-hard), 0 2px 10px rgba(43, 28, 20, .08);
  padding: 1.2rem;
  display: grid;
  gap: .6rem;
  margin-top: 1.6rem;
}
.zone-picker label { font-size: 1rem; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "▾";
  position: absolute;
  inset-inline-end: 14px;
  top: 50%; translate: 0 -50%;
  pointer-events: none;
  font-size: 1.1rem;
}
.zone-picker select, .order-form input, .order-form textarea {
  width: 100%;
  appearance: none;
  font-family: var(--f-body);
  letter-spacing: .02em;
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: var(--border-soft);
  border-radius: 12px;
  padding: .7rem .9rem;
}
.zone-picker select:focus, .order-form input:focus, .order-form textarea:focus {
  outline: 3px solid var(--pink);
  outline-offset: 1px;
}
.order-form ::placeholder { opacity: .5; }

/* paper receipt */
.receipt {
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  box-shadow: 4px 8px 18px rgba(43, 28, 20, .25);
  padding: 1.6rem 1.3rem 2.2rem;
  position: relative;
  margin-top: 1.6rem;
  --zz: 14px;
  clip-path: polygon(
    0 var(--zz), 4% 0, 8% var(--zz), 12% 0, 16% var(--zz), 20% 0, 24% var(--zz), 28% 0,
    32% var(--zz), 36% 0, 40% var(--zz), 44% 0, 48% var(--zz), 52% 0, 56% var(--zz), 60% 0,
    64% var(--zz), 68% 0, 72% var(--zz), 76% 0, 80% var(--zz), 84% 0, 88% var(--zz), 92% 0,
    96% var(--zz), 100% 0,
    100% calc(100% - var(--zz)), 96% 100%, 92% calc(100% - var(--zz)), 88% 100%,
    84% calc(100% - var(--zz)), 80% 100%, 76% calc(100% - var(--zz)), 72% 100%,
    68% calc(100% - var(--zz)), 64% 100%, 60% calc(100% - var(--zz)), 56% 100%,
    52% calc(100% - var(--zz)), 48% 100%, 44% calc(100% - var(--zz)), 40% 100%,
    36% calc(100% - var(--zz)), 32% 100%, 28% calc(100% - var(--zz)), 24% 100%,
    20% calc(100% - var(--zz)), 16% 100%, 12% calc(100% - var(--zz)), 8% 100%,
    4% calc(100% - var(--zz)), 0 100%
  );
}
.receipt h3 {
  text-align: center;
  font-size: 1.1rem;
  border-bottom: 2px dashed rgba(43, 28, 20, .3);
  padding-bottom: .7rem;
  margin-bottom: .9rem;
}
.receipt-rows { display: grid; gap: .45rem; font-size: .92rem; }
.receipt-row { display: flex; justify-content: space-between; gap: 1rem; }
.receipt-row .dots {
  flex: 1;
  border-bottom: 2px dotted rgba(43, 28, 20, .35);
  translate: 0 -4px;
}
.receipt-row--total {
  font-family: var(--f-display);
  font-size: 1.05rem;
  border-top: 2px dashed rgba(43, 28, 20, .3);
  padding-top: .7rem;
  margin-top: .5rem;
}
.receipt-row--free { color: var(--teal-deep); }
.receipt-stamp {
  margin: 1.1rem auto 0;
  width: fit-content;
  font-size: .75rem;
  color: var(--red-deep);
  border: 2px solid var(--red-deep);
  border-radius: 999px;
  padding: .25rem .9rem;
  rotate: -6deg;
  opacity: .8;
}

/* return-policy notice + acknowledgment (last step before ordering) */
.policy-ack {
  background: var(--pink-soft);
  border: 2px dashed var(--red);
  border-radius: 18px;
  padding: 1rem 1.2rem 1.1rem;
  display: grid;
  gap: .55rem;
  font-size: .9rem;
  color: #000;
}
.policy-ack h4 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.02rem;
  color: var(--red-deep);
  margin: 0;
  rotate: -1deg;
}
.policy-ack ul {
  margin: 0;
  padding-inline-start: 1.15rem;
  display: grid;
  gap: .3rem;
  line-height: 1.7;
}
.ack-check {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-top: .35rem;
  padding-top: .75rem;
  border-top: 2px dashed rgba(184, 31, 31, .35);
  cursor: pointer;
  line-height: 1.55;
}
.ack-check input {
  width: 21px;
  height: 21px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--red);
  cursor: pointer;
}

/* order form */
.order-form {
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow-hard), 0 2px 10px rgba(43, 28, 20, .08);
  padding: 1.4rem 1.2rem;
  margin-top: 1.6rem;
  display: grid;
  gap: .9rem;
}
.order-form h3 { font-size: 1.05rem; rotate: -1deg; }
.order-form .field { display: grid; gap: .35rem; }
.order-form label { font-size: .88rem; }
.order-form .hint, .zone-picker .hint { font-size: .75rem; opacity: .65; font-family: var(--f-body); }
.form-error {
  display: none;
  background: var(--pink-soft);
  border-radius: 12px;
  padding: .6rem .9rem;
  color: var(--red-deep);
  font-size: .88rem;
}
.form-error.show { display: block; }

/* ============================================
   THANK YOU PAGE — envelope + note
   ============================================ */
.thanks-wrap {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 3.5rem 0 4.5rem;
}
.mail-scene {
  width: min(540px, 100%);
  display: grid;
  justify-items: center;
}

/* kraft envelope, wrapped in twine */
.envelope {
  position: relative;
  width: 100%;
  aspect-ratio: 8 / 5;
  background:
    repeating-linear-gradient(-48deg, rgba(255,255,255,.06) 0 3px, transparent 3px 7px),
    var(--kraft);
  border-radius: 12px;
  box-shadow: var(--shadow-hard), 0 10px 30px rgba(43, 28, 20, .22);
  rotate: -2deg;
  z-index: 2;
}
.envelope .flap {
  /* the sealed flap crease */
  position: absolute;
  inset: 0 0 auto 0;
  height: 58%;
  background: linear-gradient(rgba(43, 28, 20, .07), transparent 80%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 12px 12px 0 0;
}
.twine-h, .twine-v {
  position: absolute;
  background:
    repeating-linear-gradient(90deg, var(--red-deep) 0 7px, transparent 7px 13px);
  opacity: .85;
}
.twine-h { inset-inline: -6px; top: 50%; height: 3px; }
.twine-v { inset-block: -6px; left: 50%; width: 3px;
  background:
    repeating-linear-gradient(0deg, var(--red-deep) 0 7px, transparent 7px 13px); }
.twine-bow {
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -50%;
  width: 74px; height: 54px;
  color: var(--red-deep);
  filter: drop-shadow(2px 3px 2px rgba(43, 28, 20, .25));
}
.env-stamp {
  position: absolute;
  top: 10px; inset-inline-end: 12px;
  width: 58px; height: 70px;
  background: var(--pink-soft);
  display: grid;
  place-content: center;
  font-family: var(--f-display);
  font-size: 1.1rem;
  color: var(--red);
  rotate: 5deg;
  /* stamp perforation */
  mask: radial-gradient(5px, transparent 97%, #000) -5px -5px / 16px 16px;
}
.env-postmark {
  position: absolute;
  top: 16px; inset-inline-end: 78px;
  width: 64px; height: 64px;
  border: 2px solid rgba(184, 31, 31, .55);
  border-radius: 50%;
  rotate: -12deg;
  display: grid;
  place-content: center;
  text-align: center;
  font-size: .5rem;
  line-height: 1.5;
  color: rgba(184, 31, 31, .75);
  font-family: var(--f-body);
}
.env-label {
  position: absolute;
  font-size: .62rem;
  background: var(--paper);
  color: var(--red-deep);
  border-radius: 999px;
  padding: .18rem .6rem;
  box-shadow: 1px 2px 3px rgba(43, 28, 20, .2);
}
.env-label--fragile { top: 16px; inset-inline-start: 14px; rotate: -6deg; }
.env-label--love { bottom: 14px; inset-inline-start: 18px; rotate: 4deg; }
.env-addr {
  position: absolute;
  bottom: 12px; inset-inline-end: 14px;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: 1px 2px 3px rgba(43, 28, 20, .2);
  padding: .45rem .7rem;
  font-size: .62rem;
  line-height: 1.7;
  rotate: -2deg;
  text-align: start;
}
.env-addr b { color: var(--red); font-weight: 400; }

/* the note sliding out from under the envelope */
.thanks-note {
  position: relative;
  width: 88%;
  margin-top: -1.6rem;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(43, 28, 20, .22);
  padding: 2.4rem 1.5rem 1.8rem;
  text-align: center;
  display: grid;
  gap: .9rem;
  justify-items: center;
  rotate: 1.5deg;
  z-index: 1;
}
.thanks-note .tape { top: -14px; inset-inline-start: 50%; translate: -50%; rotate: -2deg; }
.thanks-title { font-size: clamp(1.4rem, 5vw, 1.9rem); color: var(--red); }
.thanks-msg {
  font-size: clamp(.95rem, 3.4vw, 1.05rem);
  line-height: 2.1;
  margin: 0;
}
.thanks-msg mark {
  background: var(--pink-soft);
  border-radius: 6px;
  padding: 0 .35rem;
}
.thanks-sign { color: var(--red-deep); rotate: -2deg; }
.order-ref {
  font-size: .85rem;
  background: var(--cream);
  border: 2px dashed var(--red);
  color: var(--red-deep);
  border-radius: 999px;
  padding: .3rem 1rem;
}


/* ---------- licenses page ---------- */
.licenses-body { padding: 2.8rem 0 5rem; }
.licenses-body .container { max-width: 720px; display: grid; gap: 1.2rem; }
.license-card {
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow-hard-sm);
  padding: 1.2rem 1.4rem;
}
.license-card h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.license-card p { margin: 0; font-size: .95rem; }
.license-card a { color: var(--red); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  inset-inline-start: 50%;
  translate: -50% 0;
  z-index: 99;
  background: var(--red);
  color: #fff;
  font-family: var(--f-body);
  font-size: 1rem;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(43, 28, 20, .4);
  padding: .7rem 1.6rem;
  opacity: 0;
  pointer-events: none;
  transition: .3s;
}
.toast.show { opacity: 1; translate: -50% -10px; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; translate: 0 30px; transition: opacity .6s, translate .6s; }
.reveal.in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; translate: 0; }
  html { scroll-behavior: auto; }
}
