/* ==========================================================================
   shop / products — editorial redesign. Uses the same CSS variables
   defined in hero.css (:root is global) so the palette stays identical
   to the rest of the site: warm cream background, deep forest green,
   sage/stone accents. No new colors introduced.
   ========================================================================== */
.products

 {
    position: relative;
    z-index: 2;
    background: var(--hero-bg, #eef2e9);
    padding: clamp(3.5rem, 10vw, 6rem) clamp(1.1rem, 6vw, 3rem) clamp(4rem, 10vw, 7rem);
    scroll-margin-top: 0px !important;
}

.products__inner {
  max-width: 76rem;
  margin: 0 auto;
}

/* -- heading -- */

.products__heading {
  max-width: 34rem;
  margin: 0 auto clamp(2rem, 6vw, 3rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.products__eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--hero-eyebrow-green);
}

.products__title {
  margin: 0;
  font-family: var(--hero-font);
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--hero-ink);
}

.products__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--hero-body);
}

/* ==========================================================================
   hero product visual — the tablet + pouch floating in its own quiet
   moment before the cards begin. Real product photography, not a
   generic placeholder.
   ========================================================================== */

.shop-hero {
  max-width: 56rem;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
}

.shop-hero__visual {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.6) 0%, var(--hero-bg, #eef2e9) 65%);
  box-shadow: 0 30px 60px -30px rgba(40, 104, 71, 0.3);
}

.shop-hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 105%, rgba(32, 45, 41, 0.18) 0%, transparent 55%);
}

.shop-hero__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

@media (min-width: 1024px) {
  .shop-hero__visual {
    aspect-ratio: 21 / 9;
  }
}

/* ==========================================================================
   editorial product cards — image + copy side by side, alternating
   direction card to card (never a repetitive grid), on every breakpoint.
   ========================================================================== */

.shop-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 3vw, 1.5rem);
}

.shop-card
 {
    position: relative;
    /* two explicit columns, always 50/50 — text side and image side,
       rather than flex sizing/positioning things by proportion */
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 172px;

    transition:
      opacity 1.6s var(--ease-cinematic) var(--reveal-delay, 0s),
      transform 1.6s var(--ease-cinematic) var(--reveal-delay, 0s),
      translate 0.4s cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.shop-card:hover {
  translate: 0 -3px;
  box-shadow: 0 22px 44px -24px rgba(40, 104, 71, 0.3);
}

/* mobile has no :hover — apply the same lift/shadow permanently instead
   of only on an interaction that touch devices can never trigger */
@media (max-width: 1023px) {
  .shop-card {
    translate: 0 -3px;
    box-shadow: 0 22px 44px -24px rgba(40, 104, 71, 0.3);
  }
}

/* markup order is always media-then-content (reading order for screen
   readers never changes); grid `order` flips which column each one
   renders in. Default card: content in the left column, image in the
   right. The alternate card (Value Bag) swaps them. */
.shop-card__media {
  order: 2;
}

.shop-card__content {
  order: 1;
}

.shop-card--reverse .shop-card__media {
  order: 1;
}

.shop-card--reverse .shop-card__content {
  order: 2;
}

.shop-card__media {
  position: relative;
  min-width: 0;
  overflow: hidden;
  /* rounds the outer edge of whichever side the image is on — default
     card: media is the right column, so round its right corners */
  border-radius: 0 22px 22px 0;
  background: linear-gradient(160deg, #dfe6db, var(--hero-bg, #eef2e9));
}

.shop-card--reverse .shop-card__media {
  /* Value Bag: media is the left column instead, round the left side */
  border-radius: 22px 0 0 22px;
}

.shop-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* soften the hard seam where the image meets the text column — the
   image itself fades out into the card background right at that edge
   instead of cutting off sharply */
.shop-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right, var(--hero-bg, #eef2e9) 0px, rgba(238, 242, 233, 0) 70px);
}

.shop-card--reverse .shop-card__media::after {
  /* Value Bag: media is the left column, so the seam (and the fade)
     is on its right edge instead */
  background: linear-gradient(to left, var(--hero-bg, #eef2e9) 0px, rgba(238, 242, 233, 0) 70px);
}

@media (hover: hover) and (pointer: fine) {
  .shop-card:hover .shop-card__media img {
    transform: scale(1.045) translateY(-3px);
  }
}

.shop-card__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  padding: 1rem clamp(0.85rem, 3vw, 1.25rem);
}

.shop-card__tagline {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hero-green-accent);
}

.shop-card__title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin: 0.1rem 0 0;
  font-family: var(--hero-font);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  color: var(--hero-ink);
}

.shop-card__price {
  margin-top: 0.15rem;
  font-weight: 700;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  color: var(--hero-ink);
}

.shop-card__price-unit {
  font-weight: 400;
  font-size: 0.7em;
  color: var(--hero-body);
}

.shop-card__benefits {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.shop-card__benefits li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  line-height: 1.25;
  color: var(--hero-body);
}

.shop-card__benefits i {
  flex: 0 0 auto;
  color: var(--hero-green-accent);
  font-size: 0.85em;
}

/* every benefit line is forced to a single line (ellipsis if it doesn't
   fit) rather than wrapping — different products have different-length
   copy, and letting any one of them wrap to a second line is what made
   cards with otherwise-identical structure end up different heights */
.shop-card__benefits li span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* -- CTA: minimal pill, thin border, arrow that slides on hover -- */

.shop-card__cta {
    margin-top: 0.65rem;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    border: 0px solid #fff;
    background: var(--hero-bg, #eef2e9);
    color: var(--hero-green);
    font-family: var(--hero-font);
    font-weight: 600;
    font-size: clamp(0.7rem, 1.8vw, 0.76rem);
    padding: 0.5em 1em;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.shop-card__cta:hover {
  background: var(--hero-green);
  color: #fff;
  transform: translateY(-1px);
}

.shop-card__cta--solid {
  background: var(--hero-green);
  color: #fff;
}

.shop-card__cta--solid:hover {
  background: var(--hero-green-accent);
}

.shop-card__cta-arrow {
  transition: transform 0.25s ease;
}

.shop-card__cta:hover .shop-card__cta-arrow {
  transform: translateX(3px);
}

/* -- already-in-cart state: replaces the CTA button with a live qty
   stepper (see initShopCartAwareness in app.js) -- */
.shop-card__cart-control {
  margin-top: 0.65rem;
}
.shop-card__stepper

 {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(40, 104, 71, 0.25);
    border-radius: 999px;
    padding: 0.35em 0.9em;
    /* background: #fff; */
}
.shop-card__stepper button {
  border: 0;
  background: transparent;
  color: var(--hero-green);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem;
}

.shop-card__stepper span {
  min-width: 1ch;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--hero-ink);
}

/* -- wishlist heart: small floating circle, translucent glass look -- */
.shop-card__heart {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0px solid rgba(40, 104, 71, 0.15);
    border-radius: 50%;
    background: rgb(255 255 255 / 32%);
    backdrop-filter: blur(33px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--hero-body);
    cursor: pointer;
    transition: transform 0.2s ease, color 0.25s ease, background 0.25s ease;
}
/* the image is the LEFT column on the reversed card (Value Bag), so its
   heart button should sit at the image's top-left corner instead */
.shop-card--reverse .shop-card__heart {
  right: auto;
  left: 12px;
}

/* desktop: every card matches the same layout (image right, text left) —
   the alternating image/text swap is a mobile/tablet-only treatment */
@media (min-width: 1024px) {
  .shop-card--reverse .shop-card__media {
    order: 2;
    border-radius: 0 22px 22px 0;
  }

  .shop-card--reverse .shop-card__media::after {
    background: linear-gradient(to right, var(--hero-bg, #eef2e9) 0px, rgba(238, 242, 233, 0) 70px);
  }

  .shop-card--reverse .shop-card__content {
    order: 1;
  }

  .shop-card--reverse .shop-card__heart {
    right: 12px;
    left: auto;
  }
}

.shop-card__heart i {
  font-size: 14px;
  line-height: 1;
}

.shop-card__heart:hover {
  transform: scale(1.08);
}

.shop-card__heart.is-active {
  color: var(--hero-green-accent);
}

/* -- badges: tasteful, not a discount-sticker look -- */

.shop-badge {
  position: absolute;
  z-index: 4;
  font-family: var(--hero-font);
  font-weight: 600;
  pointer-events: none;
}

.shop-badge--round
 {
    top: -9px;
    right: -10px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--hero-bg, #eef2e9);
    border: 1px solid rgba(40, 104, 71, 0.22);
    color: var(--hero-green-accent);
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px -12px rgba(40, 104, 71, 0.35);
}

/* desktop: the card is wider and the badge needs to sit further in from
   the edge to stay clear of the "Most Popular" card's image corner */
@media (min-width: 1024px) {
  .shop-badge--round {
    top: -20px;
    right: 189px;
  }
}

.shop-badge--pill {
  top: 16px;
  left: 16px;
  background: rgba(245, 243, 238, 0.92);
  color: var(--hero-green);
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 0.4em 1em;
  border-radius: 999px;
}

/* ==========================================================================
   subscribe & save — the visual climax of the section: a large
   promotional feature card using the wide product photo as its own
   background, not a fourth generic card.
   ========================================================================== */

.shop-card--promo {
  /* the promo card has no separate media column (its image is its own
     background), so it opts out of the two-column grid entirely */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;

  padding: clamp(1.5rem, 5vw, 2.5rem);
  /* PNG fallback first (universal); browsers that understand image-set()
     use the smaller WebP instead — a browser that doesn't recognize
     image-set() simply treats that whole declaration as invalid and
     keeps using the one above it, so this is a safe progressive layer */
  background:
    linear-gradient(100deg, rgba(24, 36, 32, 0.88) 0%, rgba(24, 36, 32, 0.62) 42%, rgba(24, 36, 32, 0.08) 78%),
    url('/img/SUB.png') 75% 35% / cover;
  background:
    linear-gradient(100deg, rgba(24, 36, 32, 0.88) 0%, rgba(24, 36, 32, 0.62) 42%, rgba(24, 36, 32, 0.08) 78%),
    -webkit-image-set(url('/img/SUB.webp') type('image/webp'), url('/img/SUB.png') type('image/png')) 75% 35% / cover;
  background:
    linear-gradient(100deg, rgba(24, 36, 32, 0.88) 0%, rgba(24, 36, 32, 0.62) 42%, rgba(24, 36, 32, 0.08) 78%),
    image-set(url('/img/SUB.webp') type('image/webp'), url('/img/SUB.png') type('image/png')) 75% 35% / cover;
}


.shop-card--promo:hover {
  translate: 0 -3px;
}

.shop-card--promo .shop-card__content {
  position: relative;
  z-index: 1;
  padding: 0;
  max-width: 26rem;
}

/* the background image feathers into the card's own dark overlay tone
   at both the left and right edges — on every breakpoint, since this
   card has no separate media column to seam against like the others */
.shop-card--promo::before,
.shop-card--promo::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  z-index: 0;
  pointer-events: none;
}

.shop-card--promo::before {
  left: 0;
  background: linear-gradient(to right, var(--hero-bg, #eef2e9) 0%, rgba(238, 242, 233, 0) 100%);
}

.shop-card--promo::after {
  right: 0;
  background: linear-gradient(to left, var(--hero-bg, #eef2e9) 0%, rgba(238, 242, 233, 0) 100%);
}

/* mobile only: full-bleed edge to edge */
@media (max-width: 1023px) {
  .shop-card--promo {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
  }
}

/* desktop: the card is much wider, so the fade needs more room to read
   as a gradual feather rather than a thin sliver */
@media (min-width: 1024px) {
  .shop-card--promo::before,
  .shop-card--promo::after {
    width: 140px;
  }
}

.shop-card--promo .shop-card__tagline {
  color: #bfe0cd;
}

.shop-card--promo .shop-card__title {
  color: #fff;
  font-size: clamp(1.3rem, 3.2vw, 1.7rem);
}

.shop-card--promo .shop-card__benefits li {
  color: rgba(245, 243, 238, 0.9);
}

.shop-card--promo .shop-card__benefits i {
  color: #8fd6ae;
}

.shop-card--promo .shop-card__price {
  color: #fff;
  margin-top: 0.6rem;
}

.shop-card--promo .shop-card__price-unit {
  color: rgba(245, 243, 238, 0.75);
}

.shop-card--promo .shop-card__cta--solid
 {
    background: #ffffff3d !important;
    color: #fff;
    backdrop-filter: blur(33px);
}

.shop-card--promo .shop-card__cta--solid:hover {
  background: var(--hero-bg, #eef2e9);
}
.shop-card--promo .shop-badge--pill{
    position: absolute;
    top: 9px;
    left: 261px;
    background: var(--hero-green);
    color: #fff;
}

/* desktop: the mobile-only fixed top/left above was tuned to that
   card's fixed width and doesn't hold up on a much wider desktop card
   — fall back to the badge's normal top-left corner position instead */
@media (min-width: 1024px) {
      .shop-card--promo .shop-badge--pill

 {
        top: 16px;
        left: 445px;
    }
}

.shop-card__heart--promo {
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.shop-card__heart--promo.is-active {
  color: #8fd6ae;
}

/* ==========================================================================
   benefit strip
   ========================================================================== */

/* outer: always static — the border and full-width breakout never move,
   only the track inside it (mobile) slides */
.shop-benefits {
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;

}

.shop-benefits__track {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem 2.4rem;
  margin: 0;
  padding: 0;
}

.shop-benefits__track li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hero-body);
}

.shop-benefits__track i {
  color: var(--hero-green-accent);
  font-size: 0.95em;
}

/* the JS-cloned set (see initBenefitsMarquee in app.js) — kept out of the
   Blade source entirely; only ever shown on mobile, where it's what makes
   the loop seamless */
.shop-benefits__dup {
  display: none;
}

/* mobile only: the outer bar stays full-width with its border fixed in
   place; the track inside it slides continuously one direction — in
   from the right, out on the left — and never stops or reverses. app.js
   clones the (single-source) list items once so translateX(-50%) lands
   exactly back on an identical copy, with no visible gap or reset. */
@media (max-width: 1023px) {
  .shop-benefits {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
  }

  .shop-benefits__track {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: max-content;
    padding-inline: 0;
    animation: shop-benefits-marquee 16s linear infinite;
  }

  .shop-benefits__track li {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .shop-benefits__dup {
    display: flex;
  }
}

@keyframes shop-benefits-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  .shop-benefits__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    transform: none;
  }

  .shop-benefits__dup {
    display: none;
  }
}

/* desktop: static row, no scrolling — just bigger, centered, with the
   divider line back (only as wide as the centered row itself, not the
   full section) */
@media (min-width: 1024px) {
  .shop-benefits {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    padding-top: clamp(1.4rem, 3vw, 1.8rem);
    border-top: 1px solid rgba(40, 104, 71, 0.12);
  }

  .shop-benefits__track {
    gap: 2.2rem 3.6rem;
  }

  .shop-benefits__track li {
    font-size: 0.95rem;
  }

  .shop-benefits__track i {
    font-size: 1.05em;
  }

  /* the JS-cloned duplicate set only exists to make the mobile marquee
     loop seamlessly — desktop shows the single set once */
  .shop-benefits__dup {
    display: none !important;
  }
}

/* ==========================================================================
   desktop — a proper editorial composition, not the mobile layout
   stretched wider: 3 cards flow into a 2-column arrangement, and the
   subscription card spans the full width as the section's closing beat.
   ========================================================================== */

@media (min-width: 1024px) {
  .shop-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }

  .shop-card {
    min-height: 260px;
  }

  .shop-card__content {
    padding: 1.75rem 2rem;
    gap: 0.35rem;
  }

  .shop-card__cta {
    margin-top: 1.25rem;
  }

     .shop-card--promo {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        min-height: 380px;
        padding: 2.5rem;
        background: linear-gradient(10deg, rgb(24 36 32 / 40%) 0%, rgba(24, 36, 32, 0.62) 42%, rgb(24 36 32 / 6%) 78%), image-set(url(/img/SUB.webp) type('image/webp'), url(/img/SUB.png) type('image/png')) 75% 35% / cover !important;
    }

 .shop-card--promo .shop-card__content {
        max-width: 30rem;
        gap: 0.5rem;
        margin-left: 91px;
    }

  .shop-card--promo .shop-card__title {
    font-size: clamp(1.8rem, 2.6vw, 2.3rem);
  }

  .shop-card--promo .shop-card__tagline {
    font-size: 12px;
  }

  .shop-card--promo .shop-card__benefits li {
    font-size: 0.9rem;
  }

  .shop-card--promo .shop-card__benefits {
    gap: 0.4rem;
    margin-top: 0.6rem;
  }

  .shop-card--promo .shop-card__price {
    font-size: 1.4rem;
    margin-top: 1rem;
  }

  .shop-card--promo .shop-card__cta {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    padding: 0.75em 1.4em;
  }
}

@media (min-width: 1440px) {
  .products__inner {
    max-width: 84rem;
  }

  .shop-card__title {
    font-size: 1.4rem;
  }
}
