/* ============================
   General
   ============================ */
.loop-btn {
  min-width: auto !important;
  font-size: 13px !important; /* all buttons, all screen sizes */
}

/* ============================
   Hero image — desktop (show full banner, no side crop)
   Note: Loop puts .loop-bundle-image-container on BOTH the div and the img
   ============================ */
body #loop .loop-bundle-image-container-wrapper {
  align-items: stretch !important;
}
body #loop .loop-bundle-title-wrapper-new {
  width: 100% !important; /* keeps "Custom build..." title aligned with the grid */
}
/* Break the hero out of Loop's 1200px container to full screen width */
body #loop div.loop-bundle-image-container {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}
div.loop-bundle-image-container {
  height: auto !important;
  max-height: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin-bottom: 30px !important;
}
body #loop img.loop-bundle-image-container {
  max-height: none !important; /* Loop caps this at 240px by default */
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2704 / 954 !important;
  object-fit: contain !important;
}

/* ============================
   Flat cream layout — no white panel, no boxed sections
   ("body #loop" needed to beat Loop's own white background rule)
   ============================ */
body #loop .loop-bundle-products-wrapper,
body #loop .loop-category-list-new-container,
body #loop .loop-category-header {
  background-color: #F5F2E1 !important;
}

/* Category sections: remove the grey box, keep a thin divider under the heading */
body #loop .loop-category-container-section {
  border: 0 !important;
  border-radius: 0 !important;
}
body #loop .loop-category-header {
  border-bottom: 1px solid rgba(62, 71, 40, .2) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body #loop .loop-products-available {
  padding: 20px 0 32px !important; /* grid lines up with heading */
}

/* Product cards: cream with a soft olive border (was white + black border) */
body #loop .loop-bundle-product-card {
  background-color: #F5F2E1 !important;
  border: 1px solid rgba(62, 71, 40, .25) !important;
  border-radius: 12px !important;
}
body #loop .loop-card-footer {
  background-color: transparent !important;
}

/* Sidebar "Your bundle": drop the box, keep a divider above the subscription widget */
body #loop .loop-selected-bundle {
  border: 0 !important;
  border-bottom: 1px solid rgba(62, 71, 40, .2) !important;
  border-radius: 0 !important;
}

/* ============================
   Product cards — image fills card, less dead space
   ============================ */
.loop-card-header,
.loop-bundle-product-image-container,
.loop-image-product-lg {
  height: auto !important;
}
.loop-bundle-product-card .loop-img-fit {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
}

/* Titles max 2 lines so prices + buttons line up */
.loop-bundle-product-card-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 2.6em !important;
}

/* ============================
   Sidebar — shrink to content so Add to Cart stays on screen
   ============================ */
.loop-actions-container {
  min-height: 0 !important;
  height: auto !important;
}
.loop-selected-bundle {
  flex: 0 0 auto !important;
  height: auto !important;
}
.loop-selected-bundle-items {
  max-height: 220px !important; /* scrolls if many items */
}
.loop-bundle-widget-add-to-cart-container {
  position: sticky !important;
  bottom: 16px !important;
  z-index: 5 !important;
}

/* Add to Cart — one clean line: "TOTAL: $110.65   ADD TO CART" */
.loop-btn-add-to-cart {
  letter-spacing: .04em !important;
}
.loop-btn-add-to-cart * {
  white-space: nowrap !important;
}
.loop-btn-add-to-cart .loop-bundle-saved-label,
.loop-btn-add-to-cart .loop-bundle-saved-label-disabled {
  display: none !important; /* also hides "(Saved $0.00)" when box is under 5 items */
}
.loop-bundle-cart-btn-text-container {
  gap: 12px !important;
}

/* "Save 10%" badge on one line */
.loop-bundle-widget-discount-badge-container {
  white-space: nowrap !important;
}

/* ============================
   Frequency
   ============================ */
.loop-bundle-widget-frequency-button-label-fixed,
.loop-bundle-widget-frequency-interval-button .loop-text-p6 {
  font-size: 16px !important;
}

/* ============================
   "Add your items" heading + category pills
   ============================ */
body #loop .loop-bundle-select-product-title-new-container {
  margin-left: 20px !important; /* lines up with pills + grid */
  margin-bottom: 4px !important;
}
body #loop .loop-bundle-select-product-title-new {
  font-size: 26px !important;
}

body #loop .loop-category-list {
  gap: 8px !important; /* space between pills */
  flex-wrap: wrap !important;
}
body #loop .loop-category-item {
  padding: 0 !important; /* wrapper padding was adding extra space */
  min-height: 0 !important;
}
body #loop .loop-category-item .loop-bundle-category-title {
  font-size: 15px !important;
  padding: 9px 20px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  transition: background-color .15s, color .15s !important;
}
body #loop .loop-category-item .loop-bundle-category-title:hover {
  background-color: #3E4728 !important;
  color: #F5F2E1 !important;
}

/* ============================
   Mobile (max-width: 767px)
   ============================ */
@media (max-width: 767px) {

  /* Swap to mobile-cropped hero (780x1470) */
  img.loop-bundle-image-container {
    display: none !important;
  }
  div.loop-bundle-image-container {
    background-image: url('https://cdn.shopify.com/s/files/1/0239/7947/files/MOBILE_Bundle_Header_Preview-selection.png?v=1789517511') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    aspect-ratio: 780 / 1470 !important;
  }

  /* 2-column product grid */
  .loop-products-align-new {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Add buttons fit narrow cards */
  .loop-btn-add-product {
    font-size: 12px !important;
    padding: 6px 10px !important;
    width: 100% !important;
  }

  /* Pills: don't squeeze, keep tappable */
  .loop-category-item {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    width: auto !important;
    min-height: 36px !important;
  }
}

/* ============================
   Desktop hero (live text + doorstep photo)
   Built by the custom JS; replaces the flat hero image on desktop only.
   Mobile keeps the mobile hero image.
   ============================ */
.pp-hero { display: none; }

@media (min-width: 768px) {
  body #loop div.loop-bundle-image-container { display: none !important; }

  .pp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 24px auto 8px;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: left;
  }
  .pp-hero__eyebrow {
    display: inline-block;
    background: #F0E2A6;
    color: #262626;
    font-family: "Rework Micro", sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: .2em;
    text-transform: uppercase;
    padding: 10px 22px;
    border-radius: 999px;
    margin: 0 0 22px;
  }
  .pp-hero__title {
    font-family: "Libre Caslon Condensed", serif;
    font-weight: 500;
    color: #3E4728;
    font-size: clamp(48px, 5.2vw, 72px);
    line-height: 1.02;
    letter-spacing: -.01em;
    margin: 0 0 18px;
  }
  .pp-hero__title em { font-style: italic; }
  .pp-hero__sub {
    font-family: "ABC Marfa", sans-serif;
    font-size: 18px;
    line-height: 1.55;
    color: #262626;
    margin: 0 0 28px;
    max-width: 460px;
  }
  .pp-hero__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(62, 71, 40, .25);
    max-width: 520px;
  }
  .pp-hero__steps li {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(62, 71, 40, .25);
    font-family: "Rework Micro", sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #3E4728;
  }
  .pp-hero__steps span { min-width: 22px; opacity: .7; }
  .pp-hero__img {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 560px;
    object-fit: cover;
    object-position: center 70%;
    border-radius: 12px;
    display: block;
  }
}

/* ============================
   Hide the "Custom build your pasture-raised box." heading visually.
   It stays in the page for Google and screen readers (it's the page's only H1).
   ============================ */
body #loop .loop-bundle-title-wrapper-new {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ============================
   Description line ("Pick 5 or more items...") — moved under "Choose your cuts" by the JS
   ============================ */
body #loop .loop-bundle-new-description {
  margin: -4px 0 4px 20px !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  color: #3E4728 !important;
}
body #loop .loop-bundle-new-description br { display: none; }

/* ============================
   Category buttons: stop sticking to the top (was covering products)
   Mobile: one swipeable row instead of wrapping onto 3–4 lines
   ============================ */
body #loop .loop-category-list-new-container {
  position: static !important;
  top: auto !important;
}

@media (max-width: 767px) {
  body #loop .loop-category-list-new-container .loop-category-list {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }
  body #loop .loop-category-list-new-container .loop-category-list::-webkit-scrollbar {
    display: none;
  }
  body #loop .loop-category-list-new-container .loop-category-item .loop-bundle-category-title {
    font-size: 14px !important;
    padding: 7px 14px !important;
  }
}