/* Additions for the Wagtail build on top of alchemy.css (ported design). */

.brand-on { font-style: italic; font-size: 0.85em; opacity: 0.7; }

/* Brand logos (issue #21) */
.brand-logo { height: 38px; width: auto; display: block; }
.foot-logo { height: 44px; width: auto; margin-bottom: 14px; }

/* Canada flag image swap for the flag emoji (issue #22) */
.ca-flag { height: 1em; width: auto; vertical-align: -0.14em; display: inline-block; border-radius: 2px; }
.why-card .ic .ca-flag { height: 1.5rem; }

/* Scroll-to-top button (issue #26) */
.scroll-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 55;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--ink); color: #fff; font-size: 1.3rem; line-height: 1;
  box-shadow: var(--shadow-soft); opacity: 0; transform: translateY(12px);
  pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.scroll-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--berry); }
@media print { .scroll-top { display: none; } }

/* Product gallery image keeps aspect ratio (issue #16) */
.gallery-main img {
  width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
}

/* Product gallery thumbnails (issue #17) */
.gallery-thumb {
  padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden;
  cursor: pointer; background: none; aspect-ratio: 1/1;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active { border-color: var(--berry); }

/* ---------- Potion Notes (blog) ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.post-card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.post-card-thumb { aspect-ratio: 16/10; background: linear-gradient(150deg, var(--plum), var(--berry)); display: flex; align-items: center; justify-content: center; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-placeholder { color: rgba(255,255,255,0.7); font-family: var(--serif); font-size: 1.2rem; }
.post-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.post-card-body h2 { font-size: 1.35rem; margin: 0; }
.post-card-body h2 a { color: var(--ink); }
.post-card-body p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.post-card-meta { font-size: 0.82rem; color: var(--muted); margin-top: auto; }
.post-tag { display: inline-block; background: var(--frost); color: var(--plum); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-right: 6px; }

.post-header { background: linear-gradient(160deg, #2c1840, #241433); color: #fff; padding: 34px 0 30px; }
.post-header .breadcrumb a, .post-header .breadcrumb { color: rgba(255,255,255,0.75); }
.post-header h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); margin: 10px 0 8px; }
.post-intro { color: rgba(255,255,255,0.85); font-size: 1.15rem; }
.post-meta { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-top: 10px; }
.post-hero { margin: 0 auto; padding-top: 28px; }
.post-hero img { width: 100%; border-radius: var(--radius); }
.post-body { padding: 34px 24px 20px; font-size: 1.08rem; line-height: 1.75; }
.post-body > p, .post-body > ol, .post-body > ul { margin: 0 0 20px; }
.post-heading { font-size: 1.7rem; color: var(--ink); margin: 34px 0 14px; }
.post-figure { margin: 26px 0; }
.post-figure img { width: 100%; border-radius: var(--radius-sm); }
.post-figure figcaption { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 8px; }
.pull-quote { border-left: 3px solid var(--gold); margin: 28px 0; padding: 6px 0 6px 22px; }
.pull-quote p { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--plum); margin: 0; }
.pull-quote cite { display: block; margin-top: 8px; font-style: normal; font-size: 0.9rem; color: var(--muted); }

.recipe-card { background: var(--cream); border: 1px solid var(--frost-deep); border-radius: var(--radius); padding: 24px 26px; margin: 28px 0; }
.recipe-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--frost-deep); padding-bottom: 12px; margin-bottom: 16px; }
.recipe-head h3 { margin: 0; font-size: 1.4rem; color: var(--ink); }
.recipe-serves { color: var(--muted); font-size: 0.9rem; }
.recipe-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 26px; }
.recipe-body h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--berry); margin: 0 0 8px; }
.recipe-shop { margin-top: 18px; }
@media (max-width: 620px) { .recipe-body { grid-template-columns: 1fr; } }

.product-link-blurb { font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.product-link-card { display: flex; align-items: center; gap: 16px; background: var(--paper); border: 1px solid var(--frost-deep); border-radius: var(--radius-sm); padding: 12px 16px; margin: 20px 0; box-shadow: var(--shadow-soft); }
.plc-thumb { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.plc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.plc-body { display: flex; flex-direction: column; flex: 1; }
.plc-eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.plc-name { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.plc-price { font-size: 0.9rem; color: var(--berry); font-weight: 600; }
.plc-cta { color: var(--berry); font-weight: 600; white-space: nowrap; }

.news-message { color: var(--gold-soft); margin-top: 12px; font-weight: 600; }

/* Reviews app: product-page section, form, verified badge */
.verified-badge { font-size: 0.72rem; font-weight: 700; color: #2f8f4e; letter-spacing: 0.02em; margin-left: 6px; white-space: nowrap; }
.reviews-section { background: var(--cream); }
.reviews-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.reviews-head h2 { margin: 0; }
.reviews-avg { display: flex; align-items: center; gap: 10px; }
.reviews-avg-num { font-family: var(--serif); font-size: 1.8rem; color: var(--ink); }
.reviews-avg .stars { color: var(--gold); }
.reviews-count { color: var(--muted); font-size: 0.9rem; }
.reviews-none { color: var(--muted); }
.review-list { display: grid; gap: 18px; margin-bottom: 24px; }
.review-item { background: var(--paper); border-radius: var(--radius-sm); padding: 18px 20px; box-shadow: var(--shadow-soft); }
.review-item-head { display: flex; align-items: center; gap: 4px; }
.review-item-head .stars { color: var(--gold); }
.review-item-title { font-size: 1.05rem; color: var(--ink); margin: 8px 0 4px; }
.review-item-body { margin: 4px 0 8px; }
.review-item-meta { font-size: 0.85rem; color: var(--muted); }
.review-flash { background: rgba(47,143,78,0.12); border: 1px solid rgba(47,143,78,0.4); color: var(--ink); border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; }
.review-form-wrap { background: var(--paper); border-radius: var(--radius-sm); padding: 6px 20px; }
.review-form-toggle { display: inline-block; margin: 12px 0; cursor: pointer; }
.review-form { display: grid; gap: 14px; padding: 8px 0 20px; }
.review-form .field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; color: var(--ink); }
.review-form input, .review-form textarea, .review-form select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--frost-deep); border-radius: 10px; font: inherit; background: var(--paper);
}
.review-hp { position: absolute; left: -9999px; }
.review-form-note { font-size: 0.8rem; color: var(--muted); margin: 0; }
.card-rating { font-size: 0.85rem; color: var(--gold); margin-bottom: 4px; }
.card-rating small { color: var(--muted); }

/* Reviews carousel (issue #25) */
.review-carousel { position: relative; display: flex; align-items: center; gap: 8px; }
.review-track {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 6px 2px 14px; -webkit-overflow-scrolling: touch;
}
.review-track::-webkit-scrollbar { height: 6px; }
.review-track::-webkit-scrollbar-thumb { background: var(--frost-deep); border-radius: 999px; }
.review-track .review {
  scroll-snap-align: start; flex: 0 0 clamp(260px, 30%, 360px);
}
.carousel-nav {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--frost-deep);
  background: var(--paper); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-soft); transition: background 0.15s ease;
}
.carousel-nav:hover { background: var(--cream); }
@media (max-width: 620px) { .carousel-nav { display: none; } }

/* Editor-inserted images in content (issue #24) */
.content-narrow .richtext-image { max-width: 100%; height: auto; border-radius: 12px; margin: 18px 0; }
.content-narrow .richtext-image.left { float: left; margin-right: 20px; max-width: 45%; }
.content-narrow .richtext-image.right { float: right; margin-left: 20px; max-width: 45%; }
.content-figure { margin: 24px 0; }
.content-figure img { width: 100%; border-radius: 14px; }
.content-figure figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* Editor-uploaded photos slot into the placeholder frames */
.hero-visual img,
.offer-visual img,
.story-photo img,
.flavour .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.flavour .thumb.has-image { padding: 0; }

/* Announcement bar + trustbar content is rich text — keep paragraphs inline */
.announce p, .trustbar span p { margin: 0; display: inline; }

/* With the real Inter loaded the four items need a slightly tighter gap to
   hold one line at the 1140px wrap width */
.trustbar .wrap { gap: clamp(14px, 1.8vw, 26px); }

/* Placeholder frames: first line reads as a title, like the static design */
.offer-visual > div::first-line, .hero-visual .ph::first-line, .story-photo::first-line {
  font-weight: 600;
}

/* CTA band variants */
.eyebrow--gold { color: var(--gold-soft); }
.cta-tight { padding: 60px 0; }
.cta-tight-head { margin-bottom: 36px; }
.cta-tight-heading { color: var(--ink); font-size: clamp(2rem, 4vw, 2.9rem); }
.cta-tight-buttons, .cta-band-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

.story-main { margin: 0; }

/* Story sign-off (Our Story) */
.story-signoff { font-family: var(--serif); font-size: 1.3rem; color: var(--berry); font-style: italic; margin-top: 24px; }

/* Page-level helpers */
.content--cream { background: var(--cream); }
.page-head-buttons { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.form-card-heading { font-size: 1.5rem; color: var(--ink); margin-bottom: 6px; }
.form-card-intro { color: var(--muted); margin-top: 0; font-size: 0.94rem; }

/* Gift-box swatch (bundles) — deep plum→gold, matches the brand */
.f-grimoire { background: linear-gradient(150deg, #43275c, #c9a24c); }

/* Neutral brand swatches for new flavours (issue #35) */
.f-berry  { background: linear-gradient(150deg, #8e2f52, #b83d6e); }
.f-plum   { background: linear-gradient(150deg, #241433, #43275c); }
.f-gold   { background: linear-gradient(150deg, #b8912f, #e3c987); }
.f-frost  { background: linear-gradient(150deg, #7fa8bd, #cfe6f0); }

/* Shop index filter bar */
.shop-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 34px; }
.shop-filters a {
  padding: 8px 16px; border-radius: 999px; font-size: 0.88rem;
  border: 1px solid var(--frost-deep); color: var(--muted); background: var(--paper);
  transition: all 0.15s ease;
}
.shop-filters a:hover { border-color: var(--berry); color: var(--berry); }
.shop-filters a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Stock badges on cards + buy box */
.stock-badge { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }
.stock-badge.low { color: var(--berry); }
.stock-badge.out { color: var(--berry); }
.flavour .thumb .stock-flag {
  position: absolute; top: 10px; left: 10px; background: rgba(36,20,51,0.82); color: #fff;
  font-size: 0.72rem; padding: 4px 9px; border-radius: 999px; letter-spacing: 0.03em;
}
.flavour .thumb { position: relative; }

/* Bundle nudge box on product pages */
.bundle-nudge {
  background: rgba(201,162,76,0.12); border: 1px solid rgba(201,162,76,0.4);
  border-radius: 12px; padding: 12px 16px; font-size: 0.9rem; color: var(--ink); margin: 0 0 22px;
}
.bundle-nudge a { color: var(--berry); font-weight: 600; }

/* Build-your-own bundle picker */
.byo-picker { margin: 30px 0; }
.byo-status { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); text-align: center; margin-bottom: 18px; }
.byo-status b { color: var(--berry); }
.byo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.byo-opt {
  border: 2px solid var(--frost-deep); border-radius: var(--radius-sm); padding: 0; overflow: hidden;
  cursor: pointer; background: var(--paper); text-align: left; transition: border-color 0.15s ease;
}
.byo-opt:disabled { opacity: 0.4; cursor: not-allowed; }
.byo-opt.picked { border-color: var(--berry); }
.byo-opt .sw { position: relative; height: 84px; color: #fff; display: flex; align-items: flex-end; padding: 8px 10px; font-size: 0.9rem; overflow: hidden; }
.byo-opt .sw img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.byo-opt .sw .sw-name { position: relative; z-index: 1; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.byo-opt .sw:has(img)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 60%); }

/* Cart thumbnails hold a real product image when one exists (issue #34) */
.dl-thumb img, .cl-thumb img, .cu-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.cl-thumb-link { display: block; }
.byo-opt .lbl { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 0.9rem; }
.byo-opt .count { background: var(--berry); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.byo-opt .stepper { display: flex; gap: 6px; align-items: center; }
.byo-opt .stepper button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--frost-deep); background: var(--cream); font-size: 1rem; line-height: 1; cursor: pointer; }
.pdetail ol, .pdetail ul { text-align: left; }

/* Disabled add-to-cart (BYO not yet full) */
.btn.is-disabled { opacity: 0.45; pointer-events: none; }
.gallery-main.has-image { padding: 0; }
.format-opt.unavailable { opacity: 0.5; cursor: not-allowed; }

/* Announced add-to-cart error (issue #87) */
.cart-error {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: #fdecef;
  border: 1px solid #e6a6b5;
  color: #8a1f3b;
  font-size: 0.9rem;
}

/* ---------- Cart icon + badge in header (issue #32) ---------- */
.cart-link { position: relative; display: inline-flex; align-items: center; color: var(--ink); padding: 4px; transition: color 0.15s ease, transform 0.15s ease; }
.cart-link:hover { color: var(--berry); transform: translateY(-1px); }
.cart-icon { display: block; }
.cart-count {
  position: absolute; top: -4px; right: -6px;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--berry); color: #fff; font-size: 0.7rem; font-weight: 700;
  border: 2px solid var(--cream);
}
.cart-count:not(.has-items) { display: none; }

/* ---------- Cart drawer ---------- */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(36,20,51,0.5); opacity: 0;
  pointer-events: none; transition: opacity 0.2s ease; z-index: 60;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw);
  background: var(--paper); box-shadow: var(--shadow); z-index: 61;
  transform: translateX(100%); transition: transform 0.25s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--frost-deep); }
.drawer-head h2 { margin: 0; font-size: 1.4rem; }
.drawer-close { background: none; border: none; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--muted); }
.drawer-empty { padding: 40px 22px; text-align: center; }
.drawer-lines { flex: 1; overflow-y: auto; padding: 8px 22px; }
.drawer-line { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--frost); align-items: start; }
.dl-thumb { width: 54px; height: 54px; border-radius: 10px; flex-shrink: 0; }
.dl-name { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.dl-detail { font-size: 0.82rem; color: var(--muted); }
.dl-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.dl-price { font-weight: 600; }
.dl-remove { grid-column: 2 / 4; justify-self: end; background: none; border: none; color: var(--muted); font-size: 0.78rem; cursor: pointer; text-decoration: underline; padding: 0; margin-top: 4px; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--frost-deep); }
.drawer-subtotal { display: flex; justify-content: space-between; font-size: 1.05rem; margin-bottom: 4px; }
.drawer-note { font-size: 0.8rem; color: var(--muted); margin: 0 0 12px; }
.drawer-checkout { display: block; text-align: center; }
.qty--sm { transform: scale(0.85); transform-origin: left; }

/* ---------- Cart page ---------- */
.cart-alert { background: rgba(184,61,110,0.1); border: 1px solid rgba(184,61,110,0.4); border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; color: var(--ink); }
.cart-empty { text-align: center; padding: 40px 0; }
.cart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--frost-deep); }
.cl-thumb { width: 72px; height: 72px; border-radius: 12px; }
.cl-name a { font-weight: 600; color: var(--ink); }
.cl-detail { font-size: 0.86rem; color: var(--muted); }
.cl-remove { background: none; border: none; color: var(--muted); font-size: 0.8rem; cursor: pointer; text-decoration: underline; padding: 0; margin-top: 6px; }
.cl-price { font-weight: 600; min-width: 60px; text-align: right; }
.cart-upsell { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 16px; margin-top: 18px; background: var(--cream); border-radius: 12px; }
.cu-thumb { width: 48px; height: 48px; border-radius: 10px; }
.cu-body { display: flex; flex-direction: column; font-size: 0.9rem; }
.cu-body span { color: var(--muted); }
.btn--sm { padding: 8px 16px; font-size: 0.85rem; }
.cart-summary { background: var(--cream); border-radius: var(--radius); padding: 26px; position: sticky; top: 20px; }
.ship-bar { margin-bottom: 18px; }
.ship-bar p { font-size: 0.88rem; margin: 0 0 8px; }
.ship-bar-track { height: 8px; background: var(--frost-deep); border-radius: 999px; overflow: hidden; }
.ship-bar-fill { height: 100%; background: linear-gradient(90deg, var(--berry), var(--gold)); transition: width 0.3s ease; }
.ship-bar--won p { color: var(--berry); }
.summary-row { display: flex; justify-content: space-between; font-size: 1.1rem; padding: 12px 0; border-top: 1px solid var(--frost-deep); }
.summary-note { font-size: 0.8rem; color: var(--muted); margin: 4px 0 16px; }
.checkout-form { margin-top: 8px; }
.checkout-btn { width: 100%; margin-top: 8px; }

/* ---------- Order confirmation ---------- */
.order-card { border: 1px solid var(--frost-deep); border-radius: var(--radius); overflow: hidden; }
.order-card-head { display: flex; justify-content: space-between; background: var(--ink); color: #fff; padding: 14px 20px; font-weight: 600; }
.order-status { color: var(--gold-soft); }
.order-lines { padding: 8px 20px; }
.order-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--frost); }
.order-totals { padding: 14px 20px; background: var(--cream); }
.order-totals > div { display: flex; justify-content: space-between; padding: 4px 0; }
.order-total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--frost-deep); margin-top: 6px; padding-top: 10px !important; }

@media (max-width: 760px) {
  .cart-grid { grid-template-columns: 1fr; }
}

/* Form error states (Wagtail forms) */
.field .errorlist { color: var(--berry); list-style: none; padding: 0; margin: 4px 0 0; font-size: 0.85rem; }

/* =========================================================================
   Markets — "Find Us" photo gallery + lightbox
   ========================================================================= */
.market-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.market-shot { margin: 0; }
.market-shot-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: var(--frost, #f3ecff);
  border-radius: var(--radius-sm, 12px);
  overflow: hidden;
  line-height: 0;
}
.market-shot-btn img {
  width: 100%;
  height: 100%;
  aspect-ratio: 7 / 5;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.market-shot-btn:hover img { transform: scale(1.04); }
.market-shot figcaption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted, #6b6275);
  line-height: 1.4;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 10, 30, 0.9);
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: min(100%, 1100px);
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }

/* =========================================================================
   Issues #51–#58: sale + sold-out cards, blog polish, share buttons
   ========================================================================= */

/* Sold-out cards: dimmed photo + badge (#57) */
.flavour.sold-out .thumb img { filter: grayscale(0.85); opacity: 0.55; }
.flavour.sold-out .thumb { opacity: 0.9; }
.flavour .thumb .stock-flag.out { background: var(--berry); font-weight: 700; }
.flavour .thumb .stock-flag.sale {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--ink);
  font-weight: 700;
}

/* Sale strikethrough pricing (#58) */
.price s, .ft-price s { color: var(--muted); font-weight: 400; opacity: 0.75; }

/* Blog images keep their aspect ratio (#54) */
.post-hero img, .post-figure img, .post-body img { height: auto; max-width: 100%; }
.post-hero figcaption {
  text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 8px;
}

/* Rich-text headings inside the post body (#52) */
.post-body h2 { font-size: 1.7rem; color: var(--ink); margin: 34px 0 14px; }
.post-body h3 { font-size: 1.35rem; color: var(--ink); margin: 28px 0 10px; }
.post-body h4 { font-size: 1.1rem; color: var(--plum); margin: 24px 0 8px; }
.post-body hr { border: 0; border-top: 1px solid var(--frost-deep); margin: 32px 0; }
.post-body blockquote {
  border-left: 3px solid var(--gold); margin: 24px 0; padding: 4px 0 4px 20px;
  color: var(--plum); font-style: italic;
}

/* Two-column block (#52) */
.post-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 24px 0; }
@media (max-width: 620px) { .post-columns { grid-template-columns: 1fr; } }

/* Author signature (#55) */
.post-signature {
  font-family: var(--serif); font-style: italic; font-size: 1.15rem;
  color: var(--plum); margin: 34px 0 0;
}

/* Share buttons (#53) */
.post-share {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 22px 24px 10px; border-top: 1px solid var(--frost-deep); margin-top: 26px;
}
.post-share-label { font-weight: 600; color: var(--ink); font-size: 0.9rem; margin-right: 4px; }
.share-btn {
  display: inline-block; font-size: 0.85rem; font-weight: 500; color: var(--ink);
  background: var(--paper); border: 1px solid var(--frost-deep); border-radius: 999px;
  padding: 7px 16px; cursor: pointer; transition: all 0.15s ease;
}
.share-btn:hover { border-color: var(--berry); color: var(--berry); }

/* Sold-out banner across product images (flavour gallery + BYO picker) */
.gallery-main { position: relative; overflow: hidden; }
.soldout-banner {
  position: absolute;
  top: 50%;
  left: -8%;
  right: -8%;
  transform: translateY(-50%) rotate(-7deg);
  background: var(--berry);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: clamp(0.8rem, 2.6vw, 1.3rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 0;
  z-index: 2;
  pointer-events: none;
}
.byo-opt .soldout-banner { font-size: 0.72rem; padding: 5px 0; letter-spacing: 0.14em; }
.gallery-main.is-out img { filter: grayscale(0.85); opacity: 0.6; }
.byo-opt.is-out .sw img { filter: grayscale(0.85); opacity: 0.55; }
.byo-opt.is-out .sw { background: var(--frost); color: var(--muted); }
.byo-opt.is-out .sw-name { opacity: 0.75; }
.byo-out-label { color: var(--berry); font-size: 0.82rem; font-weight: 600; }

/* Card thumbs clip the sold-out ribbon like the picker tiles do */
.flavour .thumb { overflow: hidden; }

/* Signature block after grouped post body (#67) */
.post-body--signoff { padding-top: 0; }

/* Sale badge on the product page's main image (#70) */
.product-sale-flag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(36, 20, 51, 0.55);
  pointer-events: none;
}
