/* Howdy Gummies: brand base layer.
   Everything reads theme tokens (--clr-*, --ff-*) set in layouts/theme.liquid from config/settings_data.json.
   Section-specific rules live in each section's own asset file. */

html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body {
  background: var(--clr-cream, #FBF6EA);
  color: var(--clr-body, #2B1D16);
  font-family: var(--ff-mono);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 767px) { body { font-size: 14px; } }
img { max-width: 100%; }
a { color: inherit; }

/* ── Rich text defaults: Fraunces display headings, Plex Mono body ── */
.rte h1, .rte h2, .rte h3, .rte h4, .rte h5 {
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  font-variation-settings: "opsz" 144;
  margin: 0;
}
.rte h6 {
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}
.rte p { margin: 0; }
.rte p + p { margin-top: 0.8em; }
.rte em { font-style: italic; }
.rte a { text-decoration: underline; text-underline-offset: 3px; }
.rte ul { list-style: disc; padding-left: 1.2em; }
.rte ul li { list-style: disc; }

/* Mono caption utility used across sections */
.mono-caps {
  font-family: var(--ff-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

/* ── Eyebrow with hairlines either side ── */
.eyebrow-lines { display: flex; align-items: center; gap: 16px; }
.eyebrow-lines::before, .eyebrow-lines::after { content: ""; height: 1px; flex: 1; background: currentColor; opacity: 0.5; }

/* ── Stars ── */
.stars { position: relative; display: inline-block; line-height: 0; vertical-align: middle; }
.stars__track, .stars__fill { display: inline-flex; gap: 2px; white-space: nowrap; }
.stars__track { color: var(--star-empty, rgba(43, 29, 22, 0.18)); }
.stars__fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--star-color, currentColor); }
.stars svg { width: var(--star-size, 14px); height: var(--star-size, 14px); fill: currentColor; flex-shrink: 0; }

/* ── Pills + tags ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  border-radius: 999px;
  font-family: var(--ff-mono); font-weight: 500; font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  border: 0;
  transition: opacity .15s ease, transform .1s ease;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }
.btn--filled { background: var(--clr-rust); color: var(--clr-cream); }
.btn--outline { background: transparent; color: currentColor; border: 1.5px solid currentColor; }
.btn--text { background: transparent; color: currentColor; padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: 4px; }
.tag-butter {
  display: inline-block; padding: 4px 10px; border-radius: 6px;
  background: var(--clr-butter); color: var(--clr-espresso);
  font: 600 11px/1.2 var(--ff-mono); letter-spacing: 0.08em; text-transform: uppercase;
}

/* ── Canonical image block wrapper ── */
.media-wrap { position: relative; overflow: hidden; display: block; width: 100%; }
.media-wrap > img { display: block; width: 100%; height: 100%; }
.media-wrap__overlay { position: absolute; inset: 0; pointer-events: none; }
.media-wrap__placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 160px;
  color: var(--clr-muted);
  background: repeating-linear-gradient(45deg, var(--clr-sand) 0 14px, var(--clr-paper) 14px 28px);
  font: 500 11px var(--ff-mono); letter-spacing: 0.12em; text-transform: uppercase;
}
.media-wrap__placeholder svg { width: 40px; height: 40px; opacity: 0.6; }

/* ── Product card ── */
.pcard {
  --pcard-bg: var(--clr-paper);
  --pcard-border: var(--clr-line);
  --pcard-accent: var(--clr-rust);
  --pcard-btn-bg: var(--clr-rust);
  --pcard-btn-text: var(--clr-cream);
  --pcard-tag-bg: var(--clr-butter);
  --pcard-text: var(--clr-espresso);
  --pcard-muted: var(--clr-muted);
  display: flex; flex-direction: column;
  background: var(--pcard-bg);
  border: 1px solid var(--pcard-border);
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  color: var(--pcard-text);
  height: 100%;
}
.pcard__media { position: relative; display: block; aspect-ratio: 1 / 0.95; overflow: hidden; background: var(--clr-sand); }
.pcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform .6s ease; }
.pcard__img--alt { opacity: 0; }
.pcard--swap:hover .pcard__img--alt { opacity: 1; }
.pcard:hover .pcard__img { transform: scale(1.03); }
.pcard__ph { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, var(--clr-sand) 0 14px, var(--clr-paper) 14px 28px); }
.pcard__save {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  padding: 4px 10px; border-radius: 6px;
  background: var(--pcard-tag-bg); color: var(--clr-espresso);
  font: 600 11px/1.3 var(--ff-mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.pcard__body { display: flex; flex-direction: column; align-items: center; flex: 1; padding: 18px 18px 18px; }
.pcard__title { margin: 0; font-family: var(--ff-display); font-weight: 700; font-size: 24px; line-height: 1.1; letter-spacing: 0.02em; text-transform: uppercase; }
.pcard__title a { color: inherit; text-decoration: none; }
.pcard__kicker { margin: 6px 0 0; font: 400 12px var(--ff-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--pcard-muted); }
.pcard__rating { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font: 400 11.5px var(--ff-mono); color: var(--pcard-text); text-decoration: none; --star-color: var(--clr-espresso); }
.pcard__rating:hover span { text-decoration: underline; }
.pcard__price { margin-top: 8px; font: 600 16px var(--ff-mono); display: flex; gap: 8px; justify-content: center; align-items: baseline; }
.pcard__price s { color: var(--pcard-muted); font-weight: 400; }
.pcard__price b.is-sale { color: var(--pcard-accent); }
.pcard__atc {
  margin-top: auto; width: 100%; height: 44px; border: 0; border-radius: 999px;
  background: var(--pcard-btn-bg); color: var(--pcard-btn-text);
  font: 500 12px var(--ff-mono); letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; transition: opacity .15s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.pcard__price + .pcard__atc { margin-top: 14px; }
.pcard__atc:hover { opacity: 0.9; }
.pcard__atc.is-disabled { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 767px) {
  .pcard__body { padding: 14px 12px; }
  .pcard__title { font-size: 18px; }
  .pcard__kicker { font-size: 10.5px; letter-spacing: 0.08em; }
  .pcard__atc { height: 40px; font-size: 11px; letter-spacing: 0.08em; }
  .pcard__save { top: 8px; right: 8px; font-size: 10px; padding: 3px 7px; }
}

/* ── Horizontal scroll rail (UGC, related products) ── */
.rail { display: grid; grid-auto-flow: column; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-arrow {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: currentColor; border: 1px solid currentColor;
  cursor: pointer; transition: background .15s ease, color .15s ease, opacity .15s ease;
}
.rail-arrow:hover { background: var(--clr-espresso); color: var(--clr-cream); border-color: var(--clr-espresso); }
.rail-arrow:disabled { opacity: 0.3; cursor: default; }
.rail-arrow svg { width: 18px; height: 18px; }

/* Fluid's floating cart/chat launchers sit above the sticky mobile buy bar */
@media (max-width: 991px) { body.has-sticky-buy .fluid-widget-launcher { bottom: 84px !important; } }

/* ── Touch targets: at least 44px tall hit areas on touch-sized screens, without changing layout ── */
@media (max-width: 991px) {
  .pcard__title a, .pcard__rating, .ph__rev a, .ph__more, .rv__more, .ph__plan-more, .ph__crumbs a, .ph__note a,
  .pc__body a:not(.btn), .pc__intro a, .ab__msg a, .site-logo, .nav__cart-compact, .ph__up-name, .ug__who b { position: relative; }
  .pcard__title a::after, .pcard__rating::after, .ph__rev a::after, .ph__more::after, .rv__more::after, .ph__plan-more::after,
  .ph__crumbs a::after, .ph__note a::after, .pc__body a:not(.btn)::after, .ab__msg a::after, .site-logo::after,
  .nav__cart-compact::after, .ph__up-name::after {
    content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; transform: translateY(-50%);
  }
  .ft__links .ft__link a { display: inline-flex; align-items: center; min-height: 44px; }
  .ft__links { gap: 0 !important; }
  .rv__helpful button { min-height: 44px; min-width: 52px; justify-content: center; }
  .ph__up-tab { min-height: 44px; }
}

@media (max-width: 767px) {
  .pcard__rating { gap: 4px; font-size: 10.5px; white-space: nowrap; }
  .pcard__rating .stars svg { width: 10px; height: 10px; }
  .pcard__rating .stars__track, .pcard__rating .stars__fill { gap: 1px; }
}
