/* =====================================================================
   Leyla's Cookies — public site styles
   Colours are CSS variables set from Admin > Appearance.
   Signature motif: a line of piped icing "beads" (as on the logo).
   ===================================================================== */
:root {
  --bg:#FBF7F8; --surface:#FFFFFF; --text:#3B2621; --muted:#76605A; --primary:#B23A5B; --primary-text:#FFFFFF;
  --accent:#9DB89A; --biscuit:#E2B67F; --header-bg:#FFFFFF; --footer-bg:#3B2621; --footer-text:#F6EDEA;
  --line: rgba(59,38,33,.12);
  --tint: #F8ECEF;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}
@supports (color: color-mix(in srgb, red, blue)) {
  :root { --line: color-mix(in srgb, var(--text) 12%, transparent); --tint: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; background:var(--bg); color:var(--text); font:400 17px/1.6 var(--sans); }
img { max-width:100%; height:auto; display:block; }
a { color:var(--primary); text-underline-offset:3px; }
a:hover { text-decoration-thickness:2px; }
h1, h2, h3 { font-family:var(--serif); font-weight:400; line-height:1.15; margin:0 0 .5em; color:var(--text); }
h1 { font-size:clamp(2.1rem, 4.6vw, 3.5rem); letter-spacing:-.01em; }
h2 { font-size:clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size:1.2rem; }
p { margin:0 0 1em; }
.wrap { width:min(var(--wrap), calc(100% - 40px)); margin-inline:auto; }
.muted { color:var(--muted); }
.small { font-size:.88rem; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip { position:absolute; left:-999px; top:8px; background:var(--surface); padding:8px 14px; z-index:100; }
.skip:focus { left:8px; }
:focus-visible { outline:3px solid var(--primary); outline-offset:3px; border-radius:6px; }
.ico { flex:none; vertical-align:middle; }
@media (prefers-reduced-motion: reduce) { * { transition:none !important; animation:none !important; } }

/* Piped-bead line (signature motif) */
.beads { height:10px; background-image:radial-gradient(circle, var(--primary) 2.6px, transparent 3.2px); background-size:16px 10px; background-repeat:repeat-x; background-position:center; opacity:.85; }
.beads-foot { background-image:radial-gradient(circle, var(--biscuit) 2.6px, transparent 3.2px); }

/* Header */
.topbar { background:var(--primary); color:var(--primary-text); text-align:center; font-size:.92rem; padding:8px 16px; font-weight:500; }
.site-head { background:var(--header-bg); position:sticky; top:0; z-index:40; }
.head-row { display:flex; align-items:center; gap:24px; min-height:80px; }
.brand img { width:auto; height:52px; }
.site-nav { margin-left:auto; display:flex; align-items:center; gap:4px; }
.site-nav a { color:var(--text); text-decoration:none; padding:9px 12px; border-radius:999px; font-weight:500; display:inline-flex; align-items:center; gap:6px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background:var(--tint); color:var(--primary); }
.nav-cart { background:var(--primary); color:var(--primary-text) !important; position:relative; }
.nav-cart:hover { background:color-mix(in srgb, var(--primary) 85%, black) !important; }
.cart-count { background:var(--surface); color:var(--primary); border-radius:999px; font-size:.75rem; min-width:21px; height:21px; display:inline-grid; place-items:center; padding:0 5px; }
.nav-toggle { display:none; margin-left:auto; background:none; border:0; color:var(--text); padding:8px; cursor:pointer; }
.closed-bar { margin-top:16px; background:#FFF4E5; border:1px solid #F0D2A8; color:#6B4614; padding:12px 16px; border-radius:12px; display:flex; gap:10px; align-items:center; }
@media (max-width: 900px) {
  .nav-toggle { display:block; }
  .site-nav { display:none; position:absolute; left:0; right:0; top:100%; background:var(--header-bg); flex-direction:column; align-items:stretch; padding:10px 20px 20px; box-shadow:0 14px 24px color-mix(in srgb, var(--text) 10%, transparent); }
  .site-nav.open { display:flex; }
  .site-nav a { padding:12px 14px; }
  .brand img { height:44px; }
}

/* Buttons and forms */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:13px 26px; border-radius:999px; border:2px solid var(--primary); background:var(--primary); color:var(--primary-text); font:600 1rem var(--sans); text-decoration:none; cursor:pointer; transition:background .15s, transform .15s; }
.btn:hover { background:color-mix(in srgb, var(--primary) 85%, black); }
.btn:active { transform:translateY(1px); }
.btn-ghost { background:transparent; color:var(--primary); }
.btn-ghost:hover { background:var(--tint); }
.btn-small { padding:8px 16px; font-size:.9rem; }
.btn-block { width:100%; }
.btn[disabled] { opacity:.5; cursor:not-allowed; }
.linkbtn { background:none; border:0; color:var(--primary); text-decoration:underline; cursor:pointer; font:inherit; padding:0; }
label { display:block; font-weight:600; font-size:.95rem; margin-bottom:6px; }
.field { margin-bottom:18px; }
.hint { display:block; font-weight:400; color:var(--muted); font-size:.86rem; margin-top:4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], select, textarea {
  width:100%; padding:12px 14px; border:1.5px solid color-mix(in srgb, var(--text) 20%, transparent); border-radius:10px; background:var(--surface); color:var(--text); font:inherit; }
input:focus, select:focus, textarea:focus { border-color:var(--primary); outline:none; box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea { min-height:110px; resize:vertical; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:640px) { .row2 { grid-template-columns:1fr; } }
.check { display:flex; gap:12px; align-items:flex-start; font-weight:500; }
.check input { width:22px; height:22px; margin-top:2px; accent-color:var(--primary); flex:none; }
.err { color:#A3242F; font-weight:600; font-size:.9rem; margin-top:6px; }
.field.has-err input, .field.has-err textarea, .field.has-err select { border-color:#A3242F; }

/* Flash messages */
.flash-wrap { margin-top:18px; }
.flash { padding:13px 18px; border-radius:12px; margin-bottom:10px; font-weight:500; }
.flash-ok { background:color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.flash-err { background:#FCE8EA; color:#7A1621; }
.notice { background:var(--tint); border-left:4px solid var(--primary); padding:16px 18px; border-radius:0 12px 12px 0; margin:0 0 20px; }
.notice-warn { background:#FFF4E5; border-color:#D9902B; }

/* Home — hero */
.hero { padding:56px 0 40px; }
.hero-grid { display:grid; grid-template-columns:1.05fr .95fr; gap:40px; align-items:center; }
.hero h1 { max-width:14ch; }
.hero p.lead { font-size:1.2rem; color:var(--muted); max-width:42ch; }
.hero-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:26px; }
.hero-art img { width:100%; max-width:560px; margin-inline:auto; }
.hero-art.photo img { border-radius:28px; aspect-ratio:1; object-fit:cover; }
@media (max-width:860px) { .hero-grid { grid-template-columns:1fr; } .hero { padding-top:32px; } .hero-art img { max-width:420px; } }

/* Home — steps (a real sequence) */
.steps { background:var(--surface); padding:56px 0; }
.steps ol { list-style:none; padding:0; margin:28px 0 0; display:grid; grid-template-columns:repeat(4, 1fr); gap:28px; counter-reset:step; }
.steps li { counter-increment:step; }
.steps li::before { content:counter(step); display:grid; place-items:center; width:46px; height:46px; border-radius:50%; background:var(--primary); color:var(--primary-text); font-family:var(--serif); font-size:1.3rem; margin-bottom:14px; box-shadow:0 0 0 5px var(--surface), 0 0 0 7px var(--biscuit); }
.steps h3 { margin-bottom:6px; }
.steps p { color:var(--muted); margin:0; }
@media (max-width:860px) { .steps ol { grid-template-columns:1fr 1fr; } }
@media (max-width:520px) { .steps ol { grid-template-columns:1fr; } }

/* Section headings */
.sec { padding:60px 0; }
.sec-head { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:26px; flex-wrap:wrap; }
.sec-head h2 { margin:0; }
.sec-head p { margin:6px 0 0; color:var(--muted); max-width:56ch; }

/* Category tiles */
.cat-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:20px; }
.cat-tile { position:relative; display:block; border-radius:22px; overflow:hidden; aspect-ratio:4/3; text-decoration:none; color:#fff; background:var(--biscuit); }
.cat-tile img { width:100%; height:100%; object-fit:cover; transition:transform .4s; }
.cat-tile:hover img { transform:scale(1.04); }
.cat-tile span { position:absolute; left:14px; bottom:14px; background:var(--surface); color:var(--text); font-family:var(--serif); font-size:1.15rem; padding:8px 16px; border-radius:999px; }
@media (max-width:860px) { .cat-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:480px) { .cat-grid { grid-template-columns:1fr; } }

/* Product cards */
.p-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:22px; }
.pcard a { display:block; text-decoration:none; color:var(--text); }
.pcard-img { position:relative; border-radius:18px; overflow:hidden; aspect-ratio:1; background:var(--tint); }
.pcard-img img { width:100%; height:100%; object-fit:cover; transition:transform .4s; }
.pcard a:hover .pcard-img img { transform:scale(1.04); }
.pcard-body { padding:12px 4px 0; }
.pcard h3 { font-size:1.12rem; margin:0 0 4px; }
.price { margin:0; }
.price s { color:var(--muted); }
.low { color:#9A4D00; font-size:.88rem; font-weight:600; margin:4px 0 0; }
.tag { position:absolute; top:12px; left:12px; padding:4px 12px; border-radius:999px; font-size:.82rem; font-weight:700; }
.tag-sale { background:var(--primary); color:var(--primary-text); }
.tag-out { background:var(--text); color:var(--surface); }

/* Story */
.story { background:var(--surface); }
.story-grid { display:grid; grid-template-columns:200px 1fr; gap:44px; align-items:center; max-width:900px; margin-inline:auto; }
.story-grid img { width:200px; }
.story p { font-size:1.08rem; }
@media (max-width:700px) { .story-grid { grid-template-columns:1fr; } .story-grid img { width:120px; } }

/* Info strip */
.strip { display:grid; grid-template-columns:repeat(4, 1fr); gap:20px; }
.strip div { display:flex; gap:12px; align-items:flex-start; }
.strip .ico { color:var(--primary); margin-top:2px; }
.strip p { margin:0; font-size:.95rem; color:var(--muted); }
.strip strong { display:block; color:var(--text); }
@media (max-width:860px) { .strip { grid-template-columns:1fr 1fr; } }
@media (max-width:480px) { .strip { grid-template-columns:1fr; } }

/* Shop */
.page-head { padding:40px 0 10px; }
.cat-pills { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0 30px; }
.cat-pills a { padding:8px 16px; border-radius:999px; border:1.5px solid var(--line); text-decoration:none; color:var(--text); font-weight:500; background:var(--surface); }
.cat-pills a[aria-current="page"] { background:var(--text); color:var(--surface); border-color:var(--text); }

/* Product page */
.product { display:grid; grid-template-columns:1fr 1fr; gap:48px; padding:40px 0 60px; align-items:start; }
.product-img { border-radius:26px; overflow:hidden; background:var(--tint); aspect-ratio:1; }
.product-img img { width:100%; height:100%; object-fit:cover; }
.product .price { font-size:1.5rem; margin:6px 0 18px; }
.qty { display:flex; align-items:center; gap:0; border:1.5px solid color-mix(in srgb, var(--text) 20%, transparent); border-radius:999px; width:max-content; }
.qty button { background:none; border:0; width:44px; height:44px; font-size:1.3rem; cursor:pointer; color:var(--text); }
.qty input { width:64px; border:0; text-align:center; padding:8px 0; background:transparent; -moz-appearance:textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance:none; }
.breaks { border:1.5px dashed var(--biscuit); border-radius:14px; padding:14px 18px; margin:22px 0; font-size:.94rem; }
.breaks ul { margin:6px 0 0; padding-left:18px; }
@media (max-width:820px) { .product { grid-template-columns:1fr; gap:26px; } }

/* Basket + checkout */
.two-col { display:grid; grid-template-columns:1fr 380px; gap:36px; align-items:start; padding:30px 0 70px; }
@media (max-width:920px) { .two-col { grid-template-columns:1fr; } }
.panel { background:var(--surface); border-radius:20px; padding:24px; border:1px solid var(--line); }
.summary { position:sticky; top:100px; }
.summary dl { display:grid; grid-template-columns:1fr auto; gap:8px 12px; margin:0; }
.summary dt { color:var(--muted); }
.summary dd { margin:0; text-align:right; }
.summary .total { font-weight:700; font-size:1.2rem; border-top:1px solid var(--line); padding-top:12px; margin-top:4px; color:var(--text); }
.line { display:grid; grid-template-columns:84px 1fr auto; gap:16px; padding:18px 0; border-bottom:1px solid var(--line); }
.line img { width:84px; height:84px; object-fit:cover; border-radius:12px; }
.line h3 { font-size:1.05rem; margin:0 0 4px; }
.line textarea { min-height:70px; margin-top:8px; font-size:.95rem; }
.line-actions { display:flex; gap:10px; align-items:center; margin-top:10px; flex-wrap:wrap; }
.nudge { background:color-mix(in srgb, var(--accent) 20%, var(--surface)); padding:12px 16px; border-radius:12px; margin:16px 0 0; font-weight:500; }
.steps-check { display:flex; gap:8px; margin-bottom:20px; flex-wrap:wrap; }
fieldset { border:0; padding:0; margin:0 0 28px; }
legend { font-family:var(--serif); font-size:1.35rem; margin-bottom:12px; }
.svc { display:flex; gap:12px; align-items:flex-start; border:1.5px solid var(--line); border-radius:14px; padding:14px 16px; margin-bottom:10px; cursor:pointer; font-weight:400; background:var(--surface); }
.svc:has(input:checked) { border-color:var(--primary); background:var(--tint); }
.svc input { accent-color:var(--primary); width:20px; height:20px; margin-top:3px; }
.svc strong { display:block; }
.proof { background:var(--surface); border:2px solid var(--primary); border-radius:14px; padding:16px 18px; margin-bottom:16px; }
.proof p { font-family:var(--serif); font-size:1.25rem; margin:4px 0 12px; white-space:pre-wrap; }
.proof h3 { font-family:var(--sans); font-size:.95rem; font-weight:600; margin:0; color:var(--muted); }
.date-list { display:flex; flex-wrap:wrap; gap:8px; }
.box-line { font-size:.92rem; color:var(--muted); }

/* Track / account */
.status-steps { list-style:none; padding:0; margin:20px 0; display:flex; flex-wrap:wrap; gap:0; }
.status-steps li { flex:1 1 120px; padding:12px 8px 0; border-top:5px solid var(--line); font-size:.92rem; color:var(--muted); }
.status-steps li.done { border-color:var(--primary); color:var(--text); font-weight:600; }
.narrow { max-width:620px; margin-inline:auto; padding:40px 0 70px; }
table.simple { width:100%; border-collapse:collapse; font-size:.95rem; }
table.simple th, table.simple td { text-align:left; padding:10px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
.prose { max-width:70ch; }
.prose h2 { margin-top:1.4em; }
.draft-note { background:#FFF4E5; padding:8px 12px; border-radius:8px; font-size:.9rem; }

/* Footer */
.site-foot { background:var(--footer-bg); color:var(--footer-text); margin-top:40px; }
.site-foot a { color:var(--footer-text); }
.foot-grid { display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr; gap:36px; padding:46px 0 30px; }
.foot-grid h2 { font-family:var(--sans); font-weight:700; font-size:1rem; color:var(--footer-text); margin:0 0 12px; }
.foot-grid ul { list-style:none; padding:0; margin:0; }
.foot-grid li { margin-bottom:8px; }
.foot-brand img { height:52px; width:auto; margin-bottom:14px; }
.foot-brand p { opacity:.85; font-size:.95rem; max-width:36ch; }
.foot-contact li { display:flex; gap:8px; align-items:center; }
.socials { display:flex; gap:12px; }
.foot-base { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:18px 0 26px; border-top:1px solid color-mix(in srgb, var(--footer-text) 18%, transparent); font-size:.85rem; opacity:.8; }
@media (max-width:860px) { .foot-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:520px) { .foot-grid { grid-template-columns:1fr; } }

/* Checkout calendar */
.cal { border:1.5px solid var(--line); border-radius:16px; padding:14px; background:var(--surface); max-width:400px; }
.cal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.cal-nav { background:var(--tint); border:0; width:36px; height:36px; border-radius:50%; font-size:1.3rem; cursor:pointer; color:var(--text); }
.cal-nav[disabled] { opacity:.3; cursor:default; }
.cal-grid { display:grid; grid-template-columns:repeat(7, 1fr); gap:4px; text-align:center; }
.cal-grid > span:not(.cal-off) { font-size:.78rem; color:var(--muted); font-weight:600; padding:4px 0; }
.cal-day, .cal-off { aspect-ratio:1; display:grid; place-items:center; border-radius:50%; font:500 .95rem var(--sans); }
.cal-day { border:1.5px solid color-mix(in srgb, var(--primary) 35%, transparent); background:var(--surface); color:var(--text); cursor:pointer; }
.cal-day:hover { background:var(--tint); }
.cal-day.sel { background:var(--primary); color:var(--primary-text); border-color:var(--primary); }
.cal-off { color:color-mix(in srgb, var(--text) 28%, transparent); }
#date-chosen { margin-top:10px; font-size:1.05rem; }

/* Personalised card add-on in the basket */
.card-line { display:flex; gap:12px; align-items:center; margin-top:12px; padding:10px 12px; border:1.5px dashed var(--biscuit); border-radius:12px; font-size:.95rem; }
.card-add-ico { color:var(--primary); }
.card-thumb { flex:none; }
