@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Roboto:wght@400;500;700;800;900&display=swap');

/* ==========================================================================
   LEGIT × LOOP BUNDLES — branded stylesheet
   --------------------------------------------------------------------------
   INSTALL — Loop admin → Bundles → Settings/Appearance → CUSTOM CSS.
   Select all, DELETE the existing `:root{...}` block, paste this whole file.

   NOT A THEME ASSET — don't retry that. The bundle widget's CSS is served by
   the Loop app, not the theme (this theme contains zero Loop code). The
   per-store file `bundle-<shop>-<hash>.css` in DevTools IS the compiled output
   of that Custom CSS field, so pasting there is the only surface you control,
   AND it guarantees this loads AFTER Loop's base stylesheet — which everything
   below depends on (see the source-order note further down).
   Tried and reverted 2026-07-17: linking this as a theme asset from
   layout/theme.liquid (end of <body>, gated on the /a/loop_subscriptions proxy
   path) broke the page's styling outright.

   There is NO ~2000-line cap on the Custom CSS box. That was a false alarm on
   2026-07-17 — the admin editor only shows a window into the file; the whole
   thing is saved and applied. Paste the full file, however long it gets.

   Keep the @import on line 1 — CSS requires @import before any other rule, and
   this theme only loads Roboto / Permanent Marker on the PDP, not this page.

   Loop's `.loop-*` rules are UNLAYERED (outside @layer), so at equal specificity
   source order wins; !important is used ONLY where Loop itself uses !important,
   or where Loop's JS writes inline styles. Each such case is commented.

   Layout model (matches Loop's "MODERN" template, which this store uses):
     >= 1024px : product grid (65%) + STICKY "YOUR STACK" sidebar (35%)
     <  1024px : product grid (1-2 up) + FIXED bottom bar
   ========================================================================== */


/* ==========================================================================
   1. LEGIT BRAND TOKENS
   ========================================================================== */
:root {
  --lg-bg: #ffffff;
  --lg-ink: #1c1d20;
  /* body text                     */
  --lg-stage: #17181a;
  /* dark surface / headings       */
  --lg-accent: #f0483e;
  /* coral — CTA, active, on-sale  */
  --lg-amber: #fcb525;
  --lg-green: #acd588;
  --lg-teal: #48c1bb;
  --lg-tick: #6c8c39;
  /* deeper "saved" green          */
  --lg-muted: #8a8d92;
  --lg-line: #e8e8ea;
  /* hairline                      */
  --lg-track: #ededed;
  /* meter track                   */
  --lg-tile: #fafafa;
  /* image tile / subtle fill      */
  --lg-body: #3a3a40;
  /* secondary copy                */
  --lg-disabled: #b9bcc0;
  --lg-scroll: #c9cacd;
  /* visible scrollbar thumb       */

  /* the signature 5-stop brand gradient */
  --lg-grad: linear-gradient(90deg, #f0483e, #fcb525, #acd588, #48c1bb, #f0483e);

  --lg-radius-btn: 9px;
  --lg-radius-card: 14px;
  --lg-radius-panel: 16px;
  --lg-radius-img: 11px;

  --lg-shadow: 0 2px 10px rgba(0, 0, 0, .05);
  --lg-shadow-lift: 0 10px 24px rgba(0, 0, 0, .10);
  --lg-ease: cubic-bezier(.2, .7, .3, 1);
}


/* ==========================================================================
   2. REMAP LOOP'S THEMEABLE VARIABLES → LEGIT
   Every variable below is one Loop actually CONSUMES. Values it never reads
   are intentionally omitted.
   ========================================================================== */
:root {
  /* --- general / page ------------------------------------------------- */
  --loop-bundle-bg-color: transparent;
  /* let the theme page bg show */
  --loop-bundle-bg-padding-top: 0px;
  --loop-bundle-bg-padding-bottom: 40px;
  --loop-bundle-heading-color: var(--lg-stage);
  --loop-bundle-body-color: var(--lg-body);
  --loop-bundle-name-color: var(--lg-stage);
  --loop-card-body-text-color: var(--lg-ink);
  --loop-bundle-view-border-color: var(--lg-line);
  --loop-bundle-checkbox-selected-color: var(--lg-accent);
  /* was PURPLE #9810fa */
  --loop-bundle-show-more-less-text-color: var(--lg-accent);
  --loop-bundle-discount-text-color: var(--lg-tick);

  /* --- bundle image --------------------------------------------------- */
  --loop-bundle-image-width: 100%;
  --loop-bundle-image-height: 220px;
  --loop-bundle-image-border-radius: var(--lg-radius-img);
  --loop-bundle-image-bg-color: var(--lg-tile);

  /* --- size / frequency / filter buttons ------------------------------ */
  --loop-bundle-box-size-selector-display: flex;
  --loop-bundle-frequency-size-selector-display: flex;
  --loop-bundle-outline-button-border-radius: var(--lg-radius-btn);
  --loop-bundle-outline-button-text-color: var(--lg-stage);
  --loop-bundle-selected-button-bg-color: var(--lg-stage);
  --loop-bundle-selected-button-text-color: #ffffff;
  --loop-bundle-selected-button-border-radius: var(--lg-radius-btn);

  /* --- product card --------------------------------------------------- */
  --loop-bundle-product_price_display: flex;
  --loop-product-card-bg-color: #ffffff;
  --loop-product-card-border-color: var(--lg-line);
  --loop-product-card-border-size: 1.5px;
  --loop-product-card-border-radius: var(--lg-radius-card);
  --loop-product-card-image-height: 190px;
  --loop-product-card-title-color: var(--lg-stage);
  --loop-product-card-discounted-price-color: var(--lg-stage);
  --loop-product-card-product-price-color: var(--lg-muted);
  --loop-product-card-header-border-color: transparent;
  --loop-card-header-footer-border-color: transparent;

  --loop-product-card-add-product-button-bg-color: var(--lg-accent);
  --loop-product-card-add-product-button-text-color: #ffffff;
  --loop-product-card-add-product-button-border-color: transparent;
  --loop-product-card-add-product-button-border-radius: var(--lg-radius-btn);

  /* grid: 3-up beside the sidebar, 2-up tablet, 2-up mobile (toggle to 1 anytime) */
  --loop-bundle-number-of-cards-desktop-view: 3;
  --loop-bundle-number-of-cards-laptop-view: 3;
  --loop-bundle-number-of-cards-tablet-view: 2;
  --loop-bundle-number-of-cards-mobile-view: 2;

  /* --- quantity stepper (rendered as a bordered pill, see §6.5) -------- */
  --loop-product-card-input-button-bg-color: transparent;
  --loop-product-card-input-button-text-color: var(--lg-stage);
  --loop-bundle-input-bg-color: transparent;
  --loop-bundle-input-text-color: var(--lg-stage);
  --loop-bundle-input-border-color: transparent;
  --loop-bundle-input-left-border-size: 0px;
  --loop-bundle-input-right-border-size: 0px;
  --loop-bundle-input-button-border-color: transparent;
  --loop-bundle-input-button-border-radius: 0%;
  --loop-bundle-input-button-border-top-radius: 0px;
  --loop-bundle-input-button-border-bottom-radius: 0px;

  /* --- "YOUR STACK" panel / footer ------------------------------------ */
  --loop-bundle-footer-bg-color: #ffffff;
  --loop-selected-product-card-bg-color: #ffffff;
  --loop-selected-product-card-border-color: var(--lg-line);
  --loop-selected-product-card-border-radius: var(--lg-radius-btn);
  --loop-bundle-display-saved-label: block;
  --loop-bundle-total-label-color: var(--lg-stage);
  --loop-bundle-saved-label-color: var(--lg-tick);

  /* --- progress bar --------------------------------------------------- */
  --loop-bundle-progress-bar-bg-color: var(--lg-accent);
  --loop-bundle-progress-bar-container-bg-color: var(--lg-track);
  --loop-bundle-progress-bar-container-border-color: transparent;
  --loop-bundle-progress-bar-label-color: #ffffff;
  --loop-bundle-new-progress-bar-container-bg-color: var(--lg-track);
  --loop-bundle-new-progress-bar-container-border-color: transparent;

  /* --- add to cart ---------------------------------------------------- */
  --loop-bundle-add-to-cart-button-bg-color: var(--lg-accent);
  --loop-bundle-add-to-cart-button-text-color: #ffffff;
  --loop-bundle-add-to-cart-button-border-color: var(--lg-accent);
  --loop-bundle-add-to-cart-button-border-radius: var(--lg-radius-btn);

  /* --- drawers -------------------------------------------------------- */
  --loop-drawer-bg-color: #ffffff;
  --loop-drawer-separator-color: var(--lg-line);
  --loop-drawer-product-title-color: var(--lg-stage);
  --loop-drawer-product-discounted-price-color: var(--lg-stage);
  --loop-drawer-product-price-color: var(--lg-muted);
  --loop-drawer-go-back-btn-color: var(--lg-stage);

  /* --- bottom sheet (mobile) — Loop ships no merchant values ----------- */
  --loop-bottom-sheet-header-bg-color: #ffffff;
  --loop-bottom-sheet-body-bg-color: #ffffff;
  --loop-bottom-sheet-footer-bg-color: #ffffff;
  --loop-bottom-sheet-border-color: var(--lg-line);

  /* --- selling-plan widget -------------------------------------------- */
  --loop-bundle-widget-container-background: transparent;
  --loop-bundle-widget-container-border-width: 0px;
  --loop-bundle-widget-container-border-color: transparent;
  --loop-bundle-widget-container-border-radius: var(--lg-radius-btn);
  --loop-bundle-widget-selected-selling-plan-background: #ffffff;
  --loop-bundle-widget-selected-selling-plan-border-color: var(--lg-stage);
  --loop-bundle-widget-selling-plan-container-background-color: #ffffff;
  --loop-bundle-widget-selling-plan-container-border-width: 1.5px;
  --loop-bundle-widget-selling-plan-container-border-color: var(--lg-line);
  --loop-bundle-widget-selling-plan-container-border-radius: var(--lg-radius-btn);
  --loop-bundle-widget-discount-badge-color: #ffffff;
  --loop-bundle-widget-discount-badge-background: var(--lg-accent);
  --loop-bundle-widget-discount-badge-border-radius: 999px;
  --loop-bundle-widget-discount-badge-font-size: 10px;
  --loop-bundle-widget-discount-badge-line-height: 14px;
  --loop-bundle-widget-discount-badge-font-weight: 800;
  --loop-bundle-widget-plan-description-color: var(--lg-muted);
  --loop-bundle-widget-plan-description-font-size: 13px;
  --loop-bundle-widget-plan-description-line-height: 18px;
  --loop-bundle-widget-plan-description-font-weight: 500;
  --loop-bundle-widget-plan-description-opacity: 1;
  --loop-bundle-widget-plan-description-text-transform: none;
  --loop-bundle-widget-plan-description-font-style: normal;

  /* consumed but has NO default anywhere in Loop's CSS — must be set */
  --loop-purchase-plan-border-color: var(--lg-line);

  /* --- toasts --------------------------------------------------------- */
  --loop-toast-success-bg-color: var(--lg-tick);
  --loop-toast-failure-bg-color: var(--lg-accent);
  --loop-toast-default-bg-color: var(--lg-stage);
}


/* ==========================================================================
   3. STRUCTURAL FIXES (the actual breakage)
   ========================================================================== */

/* 3.1  THE ACTUAL DESKTOP BREAK (the "YOUR STACK" panel overlapping the grid):
   Loop sets .loop-products-available-new{width:70%} and .loop-actions-container
   {width:35%} as siblings in a flex row — that's 105%. Flex items default to
   `min-width:auto`, so the 3-card grid refuses to shrink below its content
   width and the sidebar overflows on top of the third column.
   Fixed in §4 with `min-width:0` on the grid column + a fixed-basis sidebar.

   NOTE: no transform/containing-block workaround is needed here. .loop-bundle-footer
   is portaled to <body> (React createPortal), the portal root `.loop` has no CSS,
   and this theme's .main-content--parallax sets no transform/filter/contain.
   If a future theme change DOES add one, `position:fixed` would resolve against it;
   the fix would then be:
     body:has(.loop-background) .main-content { transform: none !important; }        */

/* 3.2  Never show BOTH the sticky sidebar and the fixed bottom bar.
   :has() tests existence (the sidebar is display:none < 1024px but still in DOM),
   so on CLASSIC bundles — which have no sidebar — the footer correctly stays. */
@media (min-width: 1024px) {
  body:has(.loop-actions-container) .loop-bundle-footer {
    display: none !important;
  }
}

/* 3.3  The card's inner wrapper is `display:grid` with no template. */
.loop-body-footer-wrapper {
  display: block;
}


/* ==========================================================================
   4. LAYOUT — desktop sticky sidebar / mobile bottom bar
   ========================================================================== */

.loop-background {
  background: transparent;
}

.loop-container,
.loop-bs-container {
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: 28px;
  color: var(--lg-ink);
  font-family: 'Roboto', sans-serif;
}

/* --- >= 1024px : two columns --------------------------------------------- */
@media (min-width: 1024px) {
  .loop-bundle-products-section-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }

  .loop-products-available-new {
    flex: 1 1 auto;
    width: auto;
    /* Loop hard-set 70%, which + 35% overflowed */
    min-width: 0;
    /* let the grid actually shrink */
    padding-inline: 0;
  }

  /* The sticky stack panel.
     Loop sets min-height AND max-height to calc(100vh - offset) plus
     overflow:hidden — that forces a full-viewport column and clips content. */
  .loop-actions-container {
    flex: 0 0 360px;
    width: 360px;
    align-self: flex-start;
    position: sticky;
    top: var(--actions-top-offset, 96px);
    min-height: 0 !important;
    /* Loop: 100vh   */
    max-height: calc(100vh - var(--actions-top-offset, 96px) - 24px) !important;
    overflow: visible !important;
    /* Loop: hidden  */
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  /* Everything sizes to CONTENT (no child forced to grow), so a short stack no
     longer floats in a big empty panel. The stack panel shows ALL its items
     while they fit; only once the whole sidebar hits the viewport cap does it
     shrink and scroll internally (§7) — keeping the purchase options + Add to
     cart on screen. */
  .loop-actions-container>* {
    flex: 0 0 auto;
    min-height: 0;
  }

  .loop-actions-container>.loop-selected-bundle {
    flex: 0 1 auto;
    /* grow to content, shrink+scroll only when capped */
    min-height: 0;
  }

  /* The bottom bar is hidden up here (§3.2), so drop the space Loop reserved
     for it. Loop's JS writes an inline margin-bottom on .loop-products-available*
     sized to the bar — !important is required to beat that inline style. */
  .loop-products-available,
  .loop-products-available-new {
    margin-bottom: 0 !important;
  }

  .loop-bundle-products-wrapper {
    padding-bottom: 40px;
  }
}

/* --- < 1024px : fixed bottom bar ----------------------------------------- */
@media (max-width: 1023.98px) {
  .loop-bundle-footer {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    /* top:auto; right/bottom/left:0 */
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    z-index: 1000 !important;
    isolation: isolate;
    /* own stacking context */
    box-sizing: border-box;
    background: #ffffff;
    border-top: 1px solid var(--lg-line);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .10);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important;
  }

  /* signature gradient hairline, exactly like the theme's sticky ATC bar */
  .loop-bundle-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: var(--lg-grad);
  }

  .loop-bundle-footer>* {
    max-width: 1220px;
    margin-inline: auto;
    width: 100%;
  }

  /* Spacing under the last row is left to Loop: its JS measures the real bar
     height and writes an inline margin-bottom on .loop-products-available*.
     Do NOT hardcode a padding here — it double-counts and leaves a dead gap. */
}

/* …and drop the gap Loop hardcodes on top of that. Below 768px Loop ships
   `@media not all and (min-width:48rem){.loop-bundle-products-wrapper{
   padding-bottom:calc(var(--spacing)*40)}}` — with --spacing at .25rem that's
   10rem (~160px) of dead space before the footer. The fixed bar is already
   cleared by Loop's inline margin (above), so this is pure gap.
   Equal specificity (0,1,0) + our file loads later → no !important needed. */
@media (max-width: 767.98px) {
  .loop-bundle-products-wrapper {
    padding-bottom: 0;
  }
}


/* ==========================================================================
   5. TYPOGRAPHY — the Legit voice: 900, uppercase, tight
   ========================================================================== */
.loop-container,
.loop-container button,
.loop-container input,
.loop-container select {
  font-family: 'Roboto', sans-serif;
}

/* bundle title */
.loop-h1,
.loop-bundle-title {
  font-weight: 900;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: .92;
  letter-spacing: -.025em;
  text-transform: uppercase;
  color: var(--lg-stage);
}

.loop-h2,
.loop-h3 {
  font-weight: 900;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--lg-stage);
}

/* "SELECT YOUR ITEMS" — treat as an eyebrow/label */
.loop-bundle-select-product-title,
.loop-bundle-select-product-title-new {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lg-muted);
}

.loop-bundle-select-product-title::before,
.loop-bundle-select-product-title-new::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--lg-accent);
}

.loop-bundle-description,
.loop-bundle-new-description,
.loop-bundle-footer-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--lg-body);
}


/* ==========================================================================
   6. PRODUCT CARD
   ========================================================================== */
.loop-products-align,
.loop-products-align-new {
  gap: 20px;
}

.loop-card,
.loop-bundle-product-card {
  background: #ffffff;
  border: 1.5px solid var(--lg-line);
  border-radius: var(--lg-radius-card);
  overflow: hidden;
  transition: transform .18s var(--lg-ease), box-shadow .18s var(--lg-ease), border-color .18s var(--lg-ease);
}

.loop-card:hover,
.loop-bundle-product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--lg-shadow-lift);
  border-color: #d9dade;
}

/* 6.1 image tile */
.loop-card-header {
  border: 0;
  background: transparent;
}

.loop-bundle-product-image-container {
  padding: 14px 14px 0;
}

.loop-image-product-lg {
  background: var(--lg-tile);
  border-radius: var(--lg-radius-img);
  /* Loop hard-codes `height:200px` here. An explicit height ALWAYS beats
     aspect-ratio, so the tile rendered width x 200px — visibly portrait once
     the cards narrow (2-up mobile). height:auto hands control to the ratio. */
  box-sizing: border-box;
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

/* NOTE: deliberately no mix-blend-mode — some catalogue shots are on a BLACK
   background and `multiply` would render those tiles solid black. */
.loop-image-product-lg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform .3s var(--lg-ease);
}

.loop-card:hover .loop-image-product-lg img {
  transform: scale(1.04);
}

/* 6.2 body */
.loop-card-body {
  padding: 14px 14px 0 !important;
  text-align: center;
}

.loop-product-title,
.loop-bundle-product-card-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -.005em;
  color: var(--lg-stage);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

/* clamped rather than hidden, so merchant copy still shows if it's set */
.loop-product-description {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--lg-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 6.3 price */
.loop-display-product-price {
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.loop-discounted-price {
  font-weight: 900;
  font-size: 17px;
  color: var(--lg-stage);
  padding: 6px 0 !important;
}

.loop-product-price.strike-through {
  font-weight: 500;
  font-size: 13px;
  color: var(--lg-muted);
  text-decoration: line-through;
  padding: 6px 0 !important;
}

/* when a discount exists, the live price takes the brand accent */
.loop-card:has(.loop-product-price.strike-through:not(.hidden)) .loop-discounted-price {
  color: var(--lg-accent);
}

/* 6.4 card footer: variant select + ADD */
.loop-card-footer {
  border: 0;
  padding: 12px 14px 14px !important;
}

select.loop-select-variant {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff;
  border: 1.5px solid var(--lg-line);
  border-radius: var(--lg-radius-btn);
  padding: 11px 34px 11px 14px;
  font: 500 13px/1.2 'Roboto', sans-serif;
  color: var(--lg-ink);
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8d92' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  transition: border-color .15s var(--lg-ease);
}

select.loop-select-variant:hover {
  border-color: #cfd0d4;
}

select.loop-select-variant:focus {
  outline: none;
  border-color: var(--lg-stage);
}

/* the ADD button — the theme's primary CTA */
.loop-add-product-btn {
  margin-top: 10px;
}

.loop-btn-add-product {
  width: 100%;
  height: 48px;
  background: var(--lg-accent);
  color: #fff;
  border: 0;
  border-radius: var(--lg-radius-btn);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s var(--lg-ease), filter .15s var(--lg-ease);
}

.loop-btn-add-product:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.loop-btn-add-product:active {
  transform: translateY(0);
}

/* 6.5 quantity stepper → one bordered pill (like the PDP's .lg-qty)
   IMPORTANT — target `> button` / `> input`, NOT `.loop-btn-input-increase`.
   Loop's Button component assigns those classes inside a useEffect seeded from
   useState(""), so on the card they are unreliable and the glyphs render
   unstyled/invisible. Structural child selectors always match. */
.loop-bundle-product-quantity-controls {
  display: flex !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  height: 48px;
  margin-top: 10px;
  border: 1.5px solid var(--lg-stage);
  border-radius: var(--lg-radius-btn);
  overflow: hidden;
  background: #fff;
}

.loop-bundle-product-quantity-controls>button {
  flex: 0 0 48px !important;
  width: 48px !important;
  min-width: 48px !important;
  height: 100% !important;
  padding: 0 !important;
  /* Loop: 12px 20px */
  margin: 0 !important;
  background: transparent !important;
  color: var(--lg-stage) !important;
  -webkit-text-fill-color: var(--lg-stage) !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 900 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  opacity: 1 !important;
  cursor: pointer;
  transition: background .12s var(--lg-ease);
}

.loop-bundle-product-quantity-controls>button:hover:not(:disabled) {
  background: #f4f4f5 !important;
}

.loop-bundle-product-quantity-controls>button:disabled {
  opacity: .3 !important;
  cursor: not-allowed;
}

.loop-bundle-product-quantity-controls>input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--lg-stage) !important;
  -webkit-text-fill-color: var(--lg-stage) !important;
  opacity: 1 !important;
  text-align: center !important;
  font-weight: 900 !important;
  font-size: 15px !important;
}

.loop-bundle-product-quantity-controls>input:focus {
  outline: none;
}

.loop-bundle-product-quantity-controls>input:disabled {
  opacity: 1 !important;
}

/* max-items state */
.loop-max-items-added {
  opacity: .45;
  pointer-events: none;
}


/* ==========================================================================
   7. "YOUR STACK" PANEL  (sidebar on desktop, bottom bar on mobile)
   ========================================================================== */
.loop-selected-bundle {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #ffffff;
  border: 1.5px solid var(--lg-line) !important;
  border-radius: var(--lg-radius-panel) !important;
  padding: 18px 18px 16px;
  overflow: hidden;
  box-shadow: var(--lg-shadow);
}

/* signature gradient hairline across the top of the panel */
.loop-selected-bundle::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--lg-grad);
}

.loop-selected-bundle-header {
  padding-top: 4px;
}

.loop-selected-bundle-title {
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--lg-stage);
}

.loop-selected-bundle-info,
.loop-higher-discount-rate {
  font-size: 13px;
  line-height: 1.5;
  color: var(--lg-muted);
  margin-top: 4px;
}

/* highlight the discount % in brand accent */
.loop-higher-discount-rate strong,
.loop-higher-discount-rate b {
  color: var(--lg-accent);
  font-weight: 800;
}

.loop-selected-bundle-items-count {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lg-muted);
  margin-top: 10px;
}

/* The scrolling list of chosen products.
   Grows with content; once the panel hits its viewport cap this is the ONLY
   part that scrolls, with a VISIBLE thumb. overscroll-behavior stops the scroll
   chaining to the page behind it. Loop declares overflow-y:scroll — override. */
.loop-selected-bundle-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--lg-scroll) transparent;
  margin-top: 6px;
  padding-right: 6px;
}

.loop-selected-bundle-items::-webkit-scrollbar {
  width: 6px;
}

.loop-selected-bundle-items::-webkit-scrollbar-track {
  background: transparent;
}

.loop-selected-bundle-items::-webkit-scrollbar-thumb {
  background: var(--lg-scroll);
  border-radius: 999px;
}

.loop-selected-bundle-items::-webkit-scrollbar-thumb:hover {
  background: #a9abaf;
}

/* The panel grows with your stack until it reaches the viewport; past that the
   list scrolls (Add to cart must stay visible). A clipped row otherwise just
   looks broken, so fade the bottom edge whenever there IS more below.
   `is-scrollable` / `is-at-end` are toggled by legit-loop-bundles.js. */
.loop-selected-bundle:has(.loop-selected-bundle-items.is-scrollable:not(.is-at-end))::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  height: 36px;
  border-radius: 0 0 var(--lg-radius-panel) var(--lg-radius-panel);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 78%);
  pointer-events: none;
}

/* 7.1 one selected row */
.loop-selected-variant-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--lg-line);
  border-radius: var(--lg-radius-btn);
  background: #fff;
}

.loop-selected-variant-container img,
.loop-image-product-sm img {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: var(--lg-tile);
  object-fit: contain;
  flex: none;
}

.loop-selected-variant-info,
.loop-selected-variant-info-container {
  min-width: 0;
}

.loop-selected-variant-title {
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--lg-stage);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.loop-selected-variant-price-container {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
}

.loop-selected-variant-price-discount {
  font-weight: 900;
  font-size: 13px;
  color: var(--lg-accent);
}

.loop-selected-variant-price-actual {
  font-weight: 500;
  font-size: 11.5px;
  color: var(--lg-muted);
  text-decoration: line-through;
}

/* 7.2 the small stepper inside a row — the other "black rectangle" source */
.loop-selected-variant-actions-container {
  flex: 0 0 auto !important;
  max-width: none !important;
  /* Loop capped it at 20% */
}

.loop-selected-variant-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  height: 30px;
  border: 1.5px solid var(--lg-line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

/* structural children again — same useEffect class-timing caveat as §6.5 */
.loop-selected-variant-actions>button {
  flex: 0 0 28px !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  color: var(--lg-stage) !important;
  -webkit-text-fill-color: var(--lg-stage) !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 900 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  opacity: 1 !important;
  cursor: pointer;
}

.loop-selected-variant-actions>button:hover:not(:disabled) {
  background: #f4f4f5 !important;
}

.loop-selected-variant-actions>button:disabled {
  opacity: .3 !important;
}

.loop-selected-variant-actions>input,
.loop-selected-variant-actions-input,
.loop-form-input-small {
  flex: 0 0 30px !important;
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--lg-stage) !important;
  -webkit-text-fill-color: var(--lg-stage) !important;
  opacity: 1 !important;
  text-align: center !important;
  font-weight: 900;
  font-size: 12px;
  border-radius: 0 !important;
  /* Loop declares this !important */
}


/* ==========================================================================
   8. PROGRESS BAR + MILESTONES
   ========================================================================== */
/* Loop ships two conflicting width rules (70%/15% then 50%/25%) and a
   margin-bottom:25px!important — normalise all of it. */
.loop-bundle-progress-bar-container,
.loop-bundle-progress-bar-new-container {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 26px !important;
}

/* simple fill bar (FIXED bundles) */
.loop-progress-bar-container {
  height: 10px;
  background: var(--lg-track);
  border: 0;
  border-radius: 999px;
  overflow: hidden;
}

.loop-progress-bar {
  height: 100%;
  background: var(--lg-accent);
  border-radius: 999px;
  transition: width .35s var(--lg-ease);
}

.loop-progress-bar-label {
  font-weight: 800;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* milestone range bar (RANGE bundles — the "3 / 4 / 5" dots) */
/* The dots are absolutely positioned at left:N% with a -50% translate, so the
   last one (5) at 100% centres on the container's right edge and its right half
   overflows to touch the panel edge. Loop makes the track 98% wide — inset it a
   bit more (and centre it) so the end dots keep clear of the edge. */
.loop-progress-range-bar .loop-progress-range-milestone-container {
  width: calc(100% - 36px) !important;
  /* Loop: 98% */
  margin-inline: auto !important;
}

.loop-progress-range-line-container {
  height: 8px;
  border-radius: 999px;
  overflow: visible;
}

.loop-progress-range-line {
  height: 8px;
  background: var(--lg-track) !important;
  border-radius: 999px;
}

.loop-progress-range-line.left,
.loop-new-progress-range-line.left {
  background: var(--lg-accent) !important;
  transition: width .35s var(--lg-ease);
}

.loop-progress-range-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--lg-track);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .10);
  transition: background .2s var(--lg-ease), border-color .2s var(--lg-ease), transform .2s var(--lg-ease);
}

/* JS toggles .active-dots / .active-label as each milestone is reached */
.loop-progress-range-dot.active-dots {
  background: var(--lg-accent) !important;
  border-color: var(--lg-accent) !important;
  transform: scale(1.08);
}

/* NOTE: scoped on purpose. Loop ships a bare global `.label{}` and this theme's
   theme.css also defines `.label` — an unscoped rule here would leak site-wide. */
.loop-progress-range-milestone-container .label {
  font-weight: 800;
  font-size: 11px;
  color: var(--lg-muted);
  transition: color .2s var(--lg-ease);
}

.loop-progress-range-milestone-container .label.active-label {
  color: var(--lg-accent);
}

/* the green "discount unlocked" strip */
.loop-bundle-footer-discount-section {
  background-color: color-mix(in srgb, var(--lg-tick) 12%, #fff) !important;
  border: 1px solid color-mix(in srgb, var(--lg-tick) 40%, #fff) !important;
  color: var(--lg-tick);
  border-radius: var(--lg-radius-btn);
  font-weight: 700;
  font-size: 12.5px;
}


/* ==========================================================================
   9. TOTALS + ADD TO CART
   ========================================================================== */
.loop-bundle-footer-progress-bar-add-to-cart {
  padding: 14px 0 0 !important;
}

/* NOTE: the total, the SAVED pill and "Add to cart" all sit INSIDE the red CTA
   (.loop-bundle-cart-btn-text-container is a child of .loop-btn-add-to-cart).
   So they must all be white — Loop even colours .loop-bundle-total-label with
   the ATC *text* colour on purpose. Keep the row on ONE line at 360px. */
.loop-btn-add-to-cart {
  width: 100%;
  height: 56px;
  padding: 0 14px;
  background: var(--lg-accent);
  color: #fff;
  border: 0;
  border-radius: var(--lg-radius-btn);
  cursor: pointer;
  transition: transform .15s var(--lg-ease), filter .15s var(--lg-ease);
}

.loop-btn-add-to-cart:hover:not([disabled]) {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.loop-btn-add-to-cart[disabled] {
  background: var(--lg-disabled) !important;
  border: 0 !important;
  color: #fff !important;
  opacity: 1 !important;
  cursor: not-allowed;
}

.loop-bundle-cart-btn-text-container {
  gap: 8px !important;
  /* Loop: 20px — overflows at 360px */
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

/* Loop renders the total through a Text component with
   classNames="total-label bundle_total_label" (+ a *_mobile twin), while its
   own stylesheet targets .loop-bundle-total-label. Cover BOTH families, scoped
   inside .loop-btn-add-to-cart so the generic `.total-label` / `.bundle_total_label`
   names can never leak onto the rest of the site. */
.loop-bundle-total-label,
.loop-btn-add-to-cart .total-label,
.loop-btn-add-to-cart .bundle_total_label,
.loop-btn-add-to-cart .bundle_total_label_mobile {
  color: #fff !important;
  font-weight: 900 !important;
  font-size: 13.5px !important;
  /* was 22px — wrapped onto two lines */
  letter-spacing: -.005em;
  white-space: nowrap;
  text-transform: none;
}

.loop-bundle-total-label-disabled,
.loop-btn-add-to-cart .total-label-disabled {
  color: rgba(255, 255, 255, .65) !important;
}

.loop-display-saved-total {
  flex: 0 0 auto;
}

.loop-bundle-saved-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, .18);
  /* reads cleanly on the coral CTA */
  color: #fff !important;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.loop-bundle-saved-label-disabled {
  display: none;
}

.loop-bundle-add-to-cart-text {
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.loop-bundle-view-cart-btn {
  background: transparent;
  color: var(--lg-stage);
  border: 1.5px solid var(--lg-stage);
  border-radius: var(--lg-radius-btn);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* spinner in the CTA */
.loop-spinner-default {
  border-top-color: #fff;
}


/* ==========================================================================
   9b. PURCHASE OPTIONS — one-time vs subscribe, frequency chips
   ========================================================================== */
.loop-bundle-widget-selling-plan-container {
  border-radius: var(--lg-radius-btn);
  padding: 14px;
}

/* ---- ROW ALIGNMENT -------------------------------------------------------
   Loop's .loop-bundle-widget-selling-plan is `display:flex` with NO align-items,
   so the 25px radio column stretches and the dot pins to the TOP. On the
   subscribe row the content column is 2+ lines tall (label+pill, stacked prices,
   frequency picker), so the radio never lines up with "SUBSCRIBE & SAVE".
   Fix: align to flex-start, then give the radio a first-line-height box so the
   dot centres on the label. Works for the 1-line ONE TIME row too.          */
.loop-bundle-widget-selling-plan {
  align-items: flex-start !important;
  gap: 12px !important;
}

.loop-bundle-widget-radio-btn-container {
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 26px;
  /* = first text line, centres the dot */
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.loop-bundle-widget-radio-btn {
  border-color: var(--lg-line) !important;
}

.loop-bundle-widget-radio-btn.selected {
  background-color: var(--lg-stage) !important;
  border-color: var(--lg-stage) !important;
}

.loop-bundle-widget-radio-btn-inner {
  background-color: #fff !important;
}

/* ONE TIME row: label | prices, one line */
.loop-bundle-widget-selling-plan-price-container {
  align-items: center;
  min-height: 26px;
}

/* ONE TIME savings badge (added by legit-loop-bundles.js). Deliberately MUTED
   green, not the coral SUBSCRIBE pill, so subscribe stays the hero offer.
   When present, group [label][badge] on the left and push prices right. */
.legit-onetime-badge {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: color-mix(in srgb, var(--lg-tick) 12%, #fff);
  color: var(--lg-tick);
  font-weight: 800;
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.1;
  padding: 4px 8px;
  border-radius: 999px;
}

.loop-bundle-widget-selling-plan-price-container:has([data-legit-onetime-badge]) {
  justify-content: flex-start;
  gap: 8px;
}

.loop-bundle-widget-selling-plan-price-container:has([data-legit-onetime-badge])>.loop-bundle-widget-selling-plan-price {
  margin-left: auto;
}

/* SUBSCRIBE row: label + pill on the first line, prices stacked at the right */
.loop-bundle-widget-selling-plan-subscription {
  align-items: flex-start !important;
}

.loop-bundle-widget-selling-plan-subscription .loop-bundle-widget-selling-plan-info {
  width: auto !important;
  /* Loop: 100% — pushed the prices out of line */
  flex: 1 1 auto !important;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 26px;
}

.loop-bundle-widget-selling-plan-subscription>.loop-bundle-widget-selling-plan-price-container {
  flex: 0 0 auto !important;
}

.loop-bundle-widget-selling-plan-price-subscription {
  align-items: flex-end;
}

/* The "SAVE 22%" pill: width:fit-content but flex-shrink:1, so it collapsed. */
.loop-bundle-widget-discount-badge-container {
  flex: 0 0 auto !important;
  align-self: center;
  width: auto !important;
  height: auto !important;
  white-space: nowrap !important;
  padding: 4px 8px !important;
  line-height: 1.1 !important;
  font-weight: 800;
  font-size: 9.5px !important;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.loop-bundle-widget-selling-plan-discount-price {
  font-weight: 900;
  color: var(--lg-stage);
}

.loop-bundle-widget-selling-plan-actual-price {
  color: var(--lg-muted);
  text-decoration: line-through;
  font-weight: 500;
}

.loop-bundle-widget-selling-plan-text {
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--lg-stage);
  white-space: nowrap;
}


/* ==========================================================================
   9c. "WHY SUBSCRIBE" USP BLOCK  (injected by legit-loop-bundles.js)
   Sits between the ONE TIME and SUBSCRIBE & SAVE rows.
   ========================================================================== */
/* A <details> so it can collapse. Open on desktop, collapsed inside the mobile
   bottom sheet — where every fixed-height pixel is taken from the product list. */
.legit-usp {
  background: var(--lg-tile);
  border: 1px solid var(--lg-line);
  border-radius: var(--lg-radius-btn);
  padding: 12px 14px;
}

.legit-usp__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.legit-usp__summary::-webkit-details-marker {
  display: none;
}

.legit-usp__eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lg-accent);
}

.legit-usp__eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--lg-accent);
  flex: none;
}

.legit-usp__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  /* the theme's header font (roboto_n7); falls back to Roboto if the theme var
     doesn't cascade into Loop's subtree */
  font-family: var(--FONT-STACK-HEADING, 'Roboto', sans-serif);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--lg-accent);
  white-space: nowrap;
}

.legit-usp__hint::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--lg-muted);
  border-bottom: 2px solid var(--lg-muted);
  transform: rotate(45deg);
  transform-origin: 60% 60%;
  transition: transform .18s var(--lg-ease);
}

.legit-usp[open] .legit-usp__hint::after {
  transform: rotate(-135deg);
}

.legit-usp__list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.legit-usp__list li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--lg-body);
}

.legit-usp__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lg-accent);
}

.legit-usp__list b {
  color: var(--lg-stage);
  font-weight: 800;
}

/* frequency chips ("Deliver every 30 days") */
.loop-bundle-widget-frequency-interval-button {
  border: 1.5px solid var(--lg-line) !important;
  border-radius: var(--lg-radius-btn) !important;
  color: var(--lg-stage) !important;
  font-weight: 700;
  font-size: 12.5px;
  padding: 10px 12px;
  transition: border-color .15s var(--lg-ease);
}

.loop-bundle-widget-frequency-interval-button:hover {
  border-color: var(--lg-stage) !important;
}

.loop-bundle-widget-frequency-interval-button.selected {
  background-color: var(--lg-stage) !important;
  border-color: var(--lg-stage) !important;
  color: #fff !important;
}

/* radio */
.loop-bundle-widget-radio-btn {
  border-color: var(--lg-line);
}

.loop-bundle-widget-radio-btn-inner {
  background: var(--lg-stage);
}


/* ==========================================================================
   10. FILTERS / CATEGORIES / GENERIC BUTTONS
   ========================================================================== */
.loop-btn-outline,
.loop-bundle-filter-btn-container,
.loop-category-title-as-text {
  background: #fff;
  border: 1.5px solid var(--lg-line);
  border-radius: var(--lg-radius-btn);
  color: var(--lg-stage);
  font-weight: 700;
  font-size: 12.5px;
  transition: border-color .15s var(--lg-ease), transform .15s var(--lg-ease);
}

.loop-btn-outline:hover,
.loop-bundle-filter-btn-container:hover {
  border-color: var(--lg-stage);
  transform: translateY(-1px);
}

.loop-btn-selected,
.loop-bundle-filter-btn-container-selected {
  background: var(--lg-stage);
  border-color: var(--lg-stage);
  color: #fff;
  font-weight: 800;
}

.loop-bundle-filters-selected-count-icon {
  background: var(--lg-accent);
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
}

.loop-category-item {
  cursor: pointer;
}

.loop-category-rounded-image,
.loop-rounded-image {
  border-radius: 50%;
  border: 2px solid var(--lg-line);
}

.loop-category-header-content-left-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--lg-stage);
}

.loop-category-header-content-left-sub {
  color: var(--lg-muted);
  font-size: 13px;
}

.loop-checkbox {
  border: 1.5px solid var(--lg-line);
}

.loop-checkbox-selected,
.loop-checkbox:hover {
  border-color: var(--lg-accent);
}

.loop-checkbox-circle {
  background-color: var(--lg-accent);
}

.loop-show-more-less-text {
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}


/* ==========================================================================
   11. DRAWERS · BOTTOM SHEET · TOASTS
   ========================================================================== */
/* SCROLL CHAINING — scrolling the sheet/drawer must NOT scroll the page behind.
   Loop sets overflow-y:scroll with no overscroll-behavior, so the page takes
   over at the ends of the list. `contain` stops that, and gives a visible thumb. */
.loop-drawer-body,
.loop-bottom-sheet-body-products-container,
.loop-bottom-sheet-body-products-container-expanded,
.loop-selected-products-wrapper {
  overflow-y: auto !important;
  /* Loop: scroll */
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--lg-scroll) transparent;
}

.loop-drawer-body::-webkit-scrollbar,
.loop-bottom-sheet-body-products-container::-webkit-scrollbar,
.loop-bottom-sheet-body-products-container-expanded::-webkit-scrollbar,
.loop-selected-products-wrapper::-webkit-scrollbar {
  width: 6px;
}

.loop-drawer-body::-webkit-scrollbar-track,
.loop-bottom-sheet-body-products-container::-webkit-scrollbar-track,
.loop-bottom-sheet-body-products-container-expanded::-webkit-scrollbar-track,
.loop-selected-products-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.loop-drawer-body::-webkit-scrollbar-thumb,
.loop-bottom-sheet-body-products-container::-webkit-scrollbar-thumb,
.loop-bottom-sheet-body-products-container-expanded::-webkit-scrollbar-thumb,
.loop-selected-products-wrapper::-webkit-scrollbar-thumb {
  background: var(--lg-scroll);
  border-radius: 999px;
}

/* Freeze the page only while a drawer is genuinely OPEN. Loop keeps
   .loop-drawer-overlay in the DOM permanently (pointer-events:none when shut)
   and adds .enter-done on open — so gate on that, never on the overlay alone. */
body:has(.loop-drawer-overlay.enter-done) {
  overflow: hidden;
}

/* MOBILE STACK MODAL — the bundle builder behind it must not scroll.
   Loop renders .loop-bottom-sheet-header-container ONLY while the sheet is
   expanded (`header: isExpanded && <div …>`), so it is an exact open-state hook.
   This handles desktop browsers; legit-loop-bundles.js adds the position:fixed
   lock that iOS Safari additionally requires. */
@media (max-width: 1023.98px) {
  body:has(.loop-bottom-sheet-header-container) {
    overflow: hidden;
  }
}

.loop-bottom-sheet-wrapper,
.loop-bottom-sheet-body-container {
  overscroll-behavior: contain;
}

.loop-drawer-overlay {
  background: rgba(23, 24, 26, .55);
  backdrop-filter: blur(2px);
  overscroll-behavior: none;
}

.loop-drawer-content {
  border-radius: var(--lg-radius-panel) 0 0 var(--lg-radius-panel);
}

.loop-drawer-header,
.loop-drawer-footer {
  border-color: var(--lg-line);
}

.loop-drawer-product-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
}

.loop-drawer-discounted-price {
  font-weight: 900;
}

.loop-drawer-product-price {
  text-decoration: line-through;
}

.loop-drawer-go-back-btn {
  border: 1.5px solid var(--lg-stage);
  border-radius: var(--lg-radius-btn);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.loop-bottom-sheet-header-container,
.loop-bottom-sheet-purchase-options-container {
  border-color: var(--lg-line);
}

.loop-bottom-sheet-wrapper {
  border-radius: var(--lg-radius-panel) var(--lg-radius-panel) 0 0;
  overflow: hidden;
}

.loop-bottom-sheet-header-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--lg-stage);
}

.loop-toast {
  border-radius: var(--lg-radius-btn);
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--lg-shadow-lift);
}


/* ==========================================================================
   12. SKELETONS + MOTION
   ========================================================================== */
.loop-skeleton,
.loop-skeleton-box {
  background: linear-gradient(90deg, #f2f2f3 25%, #e9e9eb 37%, #f2f2f3 63%);
  background-size: 400% 100%;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {

  .loop-container *,
  .loop-bundle-footer * {
    transition: none !important;
    animation: none !important;
  }

  .loop-card:hover,
  .loop-btn-add-product:hover,
  .loop-btn-add-to-cart:hover {
    transform: none !important;
  }
}


/* ==========================================================================
   12b. MOBILE BOTTOM SHEET — give "YOUR STACK" its space back
   --------------------------------------------------------------------------
   The sheet is a flex column: header · progress · products(flex:1) · purchase
   options · footer. Everything except the product list is fixed-height, so any
   growth in the purchase options is taken straight out of the list — which is
   why only one product was visible. Rebalance it:
     · product list gets a real floor (min-height) and is the primary scroller
     · purchase options are capped and scroll internally on short phones
     · rows are compacted so ~4 fit instead of ~1.5
   (The USP block is also collapsed here — see legit-loop-bundles.js.)
   ========================================================================== */
@media (max-width: 767.98px) {

  /* progress / "you unlocked…" header — trim the dead height */
  .loop-bottom-sheet-body-container {
    padding: 10px 16px 0 !important;
  }

  .loop-bottom-sheet-body-info-text,
  .loop-higher-discount-rate {
    font-size: 12.5px !important;
    line-height: 1.4;
  }

  .loop-bundle-progress-bar-container,
  .loop-bundle-progress-bar-new-container {
    margin-bottom: 14px !important;
  }

  .loop-progress-range-dot {
    width: 18px;
    height: 18px;
  }

  /* the product list is the scroller (Loop nests two overflow:auto boxes) */
  .loop-bottom-sheet-body-products-container,
  .loop-bottom-sheet-body-products-container-expanded {
    flex: 1 1 auto !important;
    min-height: 30vh;
    padding: 0 16px !important;
    overflow: hidden !important;
    /* inner container does the scrolling */
  }

  .loop-bottom-sheet-products-inner-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--lg-scroll) transparent;
    padding-bottom: 4px !important;
  }

  .loop-bottom-sheet-products-inner-container::-webkit-scrollbar {
    width: 5px;
  }

  .loop-bottom-sheet-products-inner-container::-webkit-scrollbar-track {
    background: transparent;
  }

  .loop-bottom-sheet-products-inner-container::-webkit-scrollbar-thumb {
    background: var(--lg-scroll);
    border-radius: 999px;
  }

  /* fade the clipped row so it reads as "more below" */
  .loop-bottom-sheet-body-products-container-expanded:has(.loop-bottom-sheet-products-inner-container.is-scrollable:not(.is-at-end)) {
    position: relative;
  }

  .loop-bottom-sheet-body-products-container-expanded:has(.loop-bottom-sheet-products-inner-container.is-scrollable:not(.is-at-end))::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 80%);
    pointer-events: none;
  }

  /* purchase options: capped, and they yield before the product list does */
  .loop-bottom-sheet-purchase-options-container {
    flex: 0 1 auto !important;
    max-height: 44vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 16px 0 !important;
    border-top-width: 1px !important;
  }

  /* --- FREQUENCY DROPDOWN ------------------------------------------------
     Loop renders the plan list as `position:absolute; z-index:10` inside a
     `.relative` wrapper. An absolutely-positioned box is CLIPPED by any
     overflow:auto ancestor — z-index cannot escape an overflow context — so
     inside the capped scroller above, the plans were cut off below the fold
     and unreachable. Put the panel back in NORMAL FLOW: it then grows the
     container (which is what we actually want on a phone) instead of floating
     over it, and nothing clips it. Also drops Loop's own 14rem inner scroller,
     so the whole list is one piece. Same specificity + later file → no
     !important needed. */
  .loop-bundle-widget-frequency-dropdown-options {
    position: static;
    /* Loop: absolute — the whole bug */
    max-height: none;
    /* Loop: 14rem + a nested scroller */
    overflow: visible;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
    border-color: var(--lg-line);
    border-radius: var(--lg-radius-btn);
  }

  /* While it's open the shopper is mid-decision, so hand the space over: the
     options take what they need and the product list gives up its floor (it
     scrolls anyway, and it isn't what's being looked at). The panel only
     exists while open, so :has() is an exact open-state hook. */
  .loop-bottom-sheet-purchase-options-container:has(.loop-bundle-widget-frequency-dropdown-options) {
    max-height: 72vh;
  }

  body:has(.loop-bundle-widget-frequency-dropdown-options) .loop-bottom-sheet-body-products-container,
  body:has(.loop-bundle-widget-frequency-dropdown-options) .loop-bottom-sheet-body-products-container-expanded {
    min-height: 0;
    /* release the 30vh floor set above */
  }

  .loop-bundle-radio-widget-container {
    gap: 8px;
  }

  .loop-bundle-widget-selling-plan-container {
    padding: 12px;
  }

  /* compact rows — ~4 visible instead of ~1.5 */
  .loop-selected-variant-container {
    margin-top: 8px;
    padding: 8px;
    gap: 10px;
  }

  .loop-selected-variant-container img,
  .loop-image-product-sm img {
    width: 40px;
    height: 40px;
  }

  .loop-selected-variant-title {
    font-size: 12px;
  }

  .loop-selected-variant-price-discount {
    font-size: 12.5px;
  }

  .loop-selected-variant-price-actual {
    font-size: 11px;
  }

  .loop-bottom-sheet-footer-container {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important;
  }
}


/* ==========================================================================
   13. SMALL SCREENS
   ========================================================================== */
@media (max-width: 600px) {

  .loop-container,
  .loop-bs-container {
    padding-inline: 16px;
  }

  .loop-h1,
  .loop-bundle-title {
    font-size: 34px;
  }

  .loop-btn-add-to-cart {
    height: 52px;
    padding: 0 12px;
  }

  .loop-bundle-total-label {
    font-size: 13px;
  }

  .loop-bundle-add-to-cart-text {
    font-size: 11px;
  }

  .loop-bundle-saved-label {
    font-size: 8.5px;
    padding: 3px 7px;
  }

  .loop-selected-bundle {
    padding: 14px;
    border-radius: 12px !important;
  }

  /* in the bottom bar the list must stay short — and scroll without dragging
     the page with it (overscroll-behavior:contain is set in §7). */
  .loop-bundle-footer .loop-selected-bundle-items {
    max-height: 132px;
  }
}

@media (max-width: 600px) {
  .loop-bottom-sheet-header-container {
    border-color: #ffffff;
  }
}


/* ==========================================================================
   14. MOBILE 2-UP GRID  (driven by --loop-bundle-number-of-cards-mobile-view)
   --------------------------------------------------------------------------
   Fixes the horizontal spill at 2-up. Loop's grid is repeat(N, 1fr), and 1fr =
   minmax(auto, 1fr) — the `auto` floor is each card's content min-size, so the
   tracks refuse to shrink and the row overflows the screen. minmax(0, 1fr) lets
   them shrink to fit; min-width:0 on the items removes their auto floor.
   Also neutralises Loop's `.loop-background{min-width:100vw}`: it's transparent
   in this theme (invisible), but 100vw includes the scrollbar gutter and causes
   sideways page scroll.
   To go back to 1-up, set --loop-bundle-number-of-cards-mobile-view: 1 (§2).
   ========================================================================== */
.loop-background {
  min-width: 0 !important;
}

/* Loop: min-width:100vw */

@media (max-width: 600px) {

  .loop-products-align,
  .loop-products-align-new {
    grid-template-columns:
      repeat(var(--loop-bundle-number-of-cards-mobile-view, 1), minmax(0, 1fr)) !important;
    gap: 12px;
  }

  /* let the cards (grid items) shrink below their content min-size */
  .loop-bundle-product-wrapper,
  .loop-bundle-product-container,
  .loop-card,
  .loop-bundle-product-card,
  .loop-image-product-lg {
    min-width: 0 !important;
  }

  /* Loop img box: min-width:100px */
  .loop-products-align img,
  .loop-products-align-new img {
    max-width: 100%;
  }

  /* keep the cards tidy at ~150px wide */
  .loop-bundle-product-image-container {
    padding: 10px 10px 0;
  }

  .loop-card-body {
    padding: 10px 10px 0 !important;
  }

  .loop-card-footer {
    padding: 10px 10px 12px !important;
  }

  select.loop-select-variant {
    padding: 10px 28px 10px 12px;
    font-size: 12px;
  }

  .loop-btn-add-product {
    height: 44px;
    font-size: 11px;
    letter-spacing: .06em;
  }
}


/* ==========================================================================
   §15 STACK HERO + §16 STACK FOOTER — REMOVED FROM THIS FILE 2026-07-21.
   --------------------------------------------------------------------------
   They now live ONLY in legit-loop-bundles.js (LEGIT_INJECTED_CSS, injected
   into <head>). They were duplicated here AND there; this copy loaded LAST
   (end of <body>) and, with its mobile @media block cut off by the ~2000-line
   field cap, its leftover DESKTOP hero rules overrode the JS's correct mobile
   rules — squashing the header into 2 columns on phones.
   Keep hero/footer edits in the JS. This file is §1–14 only: the brand tokens
   + the .loop-* overrides, which MUST stay here (they beat Loop's own CSS by
   loading after it — a JS <head> inject can't guarantee that order).
   ========================================================================== */
