/*
  First Thing static site additions. Colours are from Brand.md only:
  #40280C deep brown text, #C48D3F golden brown as a border (never as text).
*/
.ft-form-status {
  margin: 0.75rem 0 0;
  padding: 0.35rem 0 0.35rem 0.75rem;
  border-left: 3px solid #C48D3F;
  color: #40280C;
  font-size: 0.95rem;
  line-height: 1.4;
  flex-basis: 100%;
}
.ft-form-status--error {
  font-weight: 600;
}
.ft-renewal-terms {
  margin: 0.75rem 0 0;
  color: #40280C;
  font-size: 0.9rem;
  line-height: 1.45;
}
.ft-renewal-terms a {
  color: inherit;
  text-decoration: underline;
}
/* The pre-order "ships by" notice (tools/build.py, only while Tools/shop_products.json
   ships_by holds a date). Deep brown on the page's own off-white, Brand.md. */
.ft-ships-by {
  margin: 0 0 0.75rem;
  color: #40280C;
  font-size: 1rem;
  line-height: 1.4;
}
.ft-ships-by--center {
  text-align: center;
  margin: 0.5rem 1rem 1.25rem;
}
.ft-stub h1 {
  margin-bottom: 1rem;
}
.ft-stub p {
  margin: 0 0 0.75rem;
}

/* Option buttons (pack size, flavor). The ported Shopify markup draws a diagonal
   "sold out" line on every button; show it only on an option that is really
   sold out. variant-picker.js keeps data-option-available current from stock. */
.variant-option__button-label:not(:has([data-option-available="false"])) .variant-option__strikethrough {
  display: none;
}

/* Subscribe and save on the flavor pages (his ask 2026-11-15). The button sits
   with the pack sizes; the panel and the renewal terms are written by
   tools/build.py and shown by variant-picker.js only while it is picked. */
.variant-option--equal-width-buttons:has([data-ft-subscribe]) {
  --variant-ch: 9.5em !important;
}
.ft-subscribe {
  margin-block-start: 14px;
  padding: 14px 16px;
  border: 1.5px solid #40280C;
  border-radius: 12px;
  background: rgba(243, 184, 46, 0.14);
}
.ft-subscribe p {
  margin: 0 0 8px;
}
.ft-subscribe__save {
  font-weight: 600;
}
.ft-subscribe__flavors {
  border: 0;
  margin: 10px 0 8px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.ft-subscribe__flavors legend {
  font-weight: 600;
  margin-block-end: 6px;
  padding: 0;
}
.ft-subscribe__choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(64, 40, 12, 0.35);
  border-radius: 10px;
  background: #fffef4;
  cursor: pointer;
}
.ft-subscribe__choice:has(input:checked) {
  border-color: #40280C;
  box-shadow: inset 0 0 0 1px #40280C;
}
.ft-subscribe__choice input {
  accent-color: #40280C;
  margin: 0;
}
.ft-subscribe__fine {
  font-size: 0.9em;
  opacity: 0.8;
  margin-block-end: 0 !important;
}
.ft-subscribe__terms {
  margin-block-start: 12px;
  font-size: 0.9em;
}
@media (max-width: 749px) {
  .variant-option__button-label--subscribe {
    grid-column: 1 / -1;
  }
}
/* Phones (Christian 2026-11-16: "if a picture is going to take up an entire screen, the
   picture's too big"): the product photo sits in a square no taller than about half the
   screen, the whole photo shown, never cropped. */
@media (max-width: 749px) {
  media-gallery slideshow-slide .product-media { aspect-ratio: 1 / 1 !important; height: auto !important; max-height: 52dvh; margin-inline: auto; }
  media-gallery slideshow-slide .product-media__image { object-fit: contain !important; width: 100%; height: 100%; }
}
/* Phones: the ticker moves faster (Christian 2026-11-16, "the ticker needs to move faster
   on mobile"). The theme gives a phone the same loop time over a third of the distance,
   about 42 px a second against desktop's 70; 9s a loop is about 85. */
@media (max-width: 749px) {
  marquee-component .marquee__wrapper { animation-duration: 9s !important; }
}
/* Phones: the breakfast audit's three numbers sit side by side so the whole result card
   fits one screen after "Run the audit" (Christian 2026-11-16). */
@media (max-width: 749px) {
  .ftbars-audit .card-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; text-align: center; padding: 1rem 0; margin-top: 1rem; }
  .ftbars-audit .stat { grid-template-columns: 1fr; gap: 0.25rem; justify-items: center; }
  .ftbars-audit .stat-num { font-size: 1.9rem; }
  .ftbars-audit .stat-lab { font-size: 0.8rem; line-height: 1.25; }
}
/* Product pages: the full Nutrition Facts table folds behind one tap (Christian
   2026-11-16, "we need to get to the bottom of the product pages faster"). */
.nutri-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nutri-more > summary::-webkit-details-marker { display: none; }
.nutri-more > summary::after { content: "+"; font-size: 1.5rem; line-height: 1; font-weight: 400; }
.nutri-more[open] > summary::after { content: "\2212"; }
.nutri-more > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }
.nutri-more[open] > summary { margin-bottom: 0.75rem; }
/* Desktop (Christian 2026-11-16: "some of the things are very zoomed in, like the product
   pictures and the macros. It's an eyesore"): the product photo stays inside about three
   quarters of the screen height, shown whole, off the page edge; the macro figures come
   down to about half the size, on the product pages and the homepage alike. */
@media (min-width: 750px) {
  media-gallery slideshow-slide .product-media { max-height: 74vh; aspect-ratio: 4 / 5 !important; height: auto !important; width: auto; margin-inline: auto; }
  media-gallery slideshow-slide .product-media__image { object-fit: contain !important; }
  media-gallery { padding-inline: clamp(12px, 2vw, 32px); }
  .ftbars-numbers .num-big { font-size: clamp(2.6rem, 4.4vw, 4.25rem) !important; }
  .ftbars-numbers .numbers { padding-block: clamp(1.5rem, 3vw, 2.5rem) !important; }
}

/* Mobile menu close button: its ring sat flush in the top-left corner and looked clipped (his note 2026-11-17). Nudged in. */
.menu-drawer__close-button{margin:8px 0 0 8px}

/* Add to cart on the first phone screen (his goal 2026-11-21: fewer taps). The photo was 390px tall on a 390px-wide phone and pushed the button below the fold; now under a third of the screen, same 4:5 frame the desktop uses. */
@media (max-width: 749px) {
  .product-information__media media-gallery slideshow-slide .product-media { max-height: min(28vh, 280px); aspect-ratio: 4 / 5 !important; height: auto !important; width: auto; margin-inline: auto; }
  .product-information__media media-gallery slideshow-slide .product-media__image { object-fit: contain !important; }
}
/* 2026-11-23 (his pick: "tighten and fit"): 28vh measured against the full screen, so with
   Safari's bars showing on load (a 390 x 664 page on an iPhone 13-15) Add to cart sat 3 px
   below the edge. Less empty space above the photo (28 to 10 px) and above the title (20 to
   10 px), and the photo sized to the page height Safari actually shows (svh), so Add to cart
   fits: everything but the photo comes to about 453 px, plus 8 px clear. Browsers without
   svh keep the 28vh line above. The iPhone SE (548 px page) still scrolls. */
@media (max-width: 749px) {
  .product-information__media media-gallery { padding-block-start: 10px !important; }
  .product-details > .group-block:first-child { padding-block-start: 10px !important; }
  .product-information__media media-gallery slideshow-slide .product-media { max-height: clamp(150px, calc(100svh - 461px), 280px); }
}

/* Shop page on a phone (his goal 2026-11-21): no layout toggle, two products across. The toggle chose between one and two across; it is gone and two stays, whatever a past visit stored. */
@media (max-width: 749px) {
  .column-options-wrapper { display: none !important; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Shop page on desktop (his ask 2026-11-30: "I want all 3 products fitting left to
   right ... I can see all 3 products in one page"; the photos were too tall to see
   whole). Three across, and each card's photo no taller than the screen leaves room
   for, so the whole row shows without scrolling. */
@media (min-width: 750px) {
  .product-grid.product-grid--grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .column-options-wrapper { display: none !important; }
  .product-grid .card-gallery, .product-grid .card-gallery slideshow-component,
  .product-grid .card-gallery slideshow-container, .product-grid .card-gallery slideshow-slide { height: auto !important; aspect-ratio: auto !important; }
  .product-grid .product-media { aspect-ratio: 4 / 5 !important; height: auto !important; max-height: calc(100svh - 360px); width: auto; margin-inline: 0; }
  .product-grid .product-media__image { object-fit: contain !important; object-position: left center !important; width: 100%; height: 100%; }
}
