/* ==========================================================================
   reviews — a "best seller" product card up top, then every review in
   one continuous row that auto-advances (and can be dragged/swiped by
   hand) on every screen size, mobile and desktop alike.
   ========================================================================== */

.reviews {
  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);
}

/* matches .products__inner / .inside__inner exactly, so this section's
   content lines up with the shop and "what's inside" sections above it */
.reviews__inner {
  max-width: 76rem;
  margin: 0 auto;
}

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

.reviews__heading {
  max-width: 30rem;
  margin: 0 auto clamp(1.75rem, 5vw, 2.25rem);
  text-align: center;
}

.reviews__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hero-green-accent);
  margin-bottom: 0.7rem;
}

.reviews__title {
  margin: 0;
  font-family: var(--hero-font);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--hero-ink);
}

.reviews__title span {
  color: var(--hero-green);
}

/* -- best seller card -- */

.reviews__bestseller {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  border-radius: 26px;
  overflow: hidden;
  margin-bottom: 1.75rem;
  /* mobile: the product photo IS the card's own background, tucked
     into the bottom-right corner — a fading wash over the top-left
     keeps the copy readable instead of sitting directly on the photo.
     Desktop reverts to a real two-column layout (see the 1024px
     breakpoint below), so this whole background is unset there. */
  background:
    linear-gradient(115deg, #dfe6db 0%, #dfe6db 48%, rgba(223, 230, 219, 0) 66%),
    url('/img/bestseller.png') no-repeat bottom right / 38% auto,
    linear-gradient(160deg, #dfe6db, #eef2e9);
  background:
    linear-gradient(115deg, #dfe6db 0%, #dfe6db 48%, rgba(223, 230, 219, 0) 66%),
    -webkit-image-set(url('/img/bestseller.webp') type('image/webp'), url('/img/bestseller.png') type('image/png')) no-repeat bottom right / 38% auto,
    linear-gradient(160deg, #dfe6db, #eef2e9);
  background:
    linear-gradient(115deg, #dfe6db 0%, #dfe6db 48%, rgba(223, 230, 219, 0) 66%),
    image-set(url('/img/bestseller.webp') type('image/webp'), url('/img/bestseller.png') type('image/png')) no-repeat bottom right / 38% auto,
    linear-gradient(160deg, #dfe6db, #eef2e9);
}

.reviews__bestseller-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.6rem;
  padding: clamp(1.75rem, 5vw, 3rem);
}

.reviews__bestseller-title {
  margin: 0.2rem 0 0;
  font-family: var(--hero-font);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  color: var(--hero-ink);
}

.reviews__bestseller-tagline {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--hero-body);
  max-width: 22rem;
}

.reviews__bestseller-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--hero-ink);
  margin-top: 0.3rem;
}

.reviews__bestseller-cta {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--hero-green);
  color: #fff;
  text-decoration: none;
  font-family: var(--hero-font);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.7em 1.3em;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.reviews__bestseller-cta:hover {
  background: var(--hero-green-accent);
  transform: translateY(-1px);
}

/* mobile: the real <img> is hidden — the photo is the card's own
   background instead (see .reviews__bestseller above). Restored as a
   real two-column block at the 1024px breakpoint below. */
.reviews__bestseller-media {
  display: none;
}

/* -- review cards -- */

.reviews__card {
  flex: 0 0 auto;
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px -28px rgba(32, 45, 41, 0.35);
}

.reviews__stars {
  display: flex;
  gap: 0.2rem;
  color: var(--hero-green-accent);
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.reviews__quote {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--hero-ink);
}

.reviews__author {
  display: block;
  font-size: 0.86rem;
  color: var(--hero-body);
  margin-bottom: 0.7rem;
}

.reviews__badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a5537;
  background: #e6e1c9;
  padding: 0.35em 0.85em;
  border-radius: 999px;
}

.reviews__badge--featured {
  color: var(--hero-green);
  background: rgba(40, 104, 71, 0.14);
}

/* -- the carousel: one continuous swipeable/auto-advancing row, same
   behavior at every breakpoint — only how many cards fit in view at
   once changes (see initReviews in app.js for the matching JS) -- */

.reviews__grid {
  overflow: hidden;
  cursor: grab;
}

.reviews__grid.is-dragging {
  cursor: grabbing;
}

.reviews__track {
  display: flex;
  gap: 1rem;
  transition: transform 0.5s var(--ease-cinematic, cubic-bezier(0.16, 1, 0.3, 1));
  touch-action: pan-y;
}

.reviews__grid.is-dragging .reviews__track {
  transition: none;
}

.reviews__track .reviews__card {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .reviews__track {
    transition: none;
  }
}

@media (min-width: 1024px) {
  /* no background/shadow block — just the copy and the product photo
     sitting close together, centered as a unit, side by side */
  .reviews__bestseller {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    background: none;
    border-radius: 0;
    overflow: visible;
    min-height: auto;
    padding: 1rem 0;
  }

  .reviews__bestseller-copy {
    flex: 0 1 26rem;
    padding: 0;
  }

  .reviews__bestseller-media {
    display: block;
    position: relative;
    flex: 0 0 auto;
    width: 20rem;
    height: 20rem;
  }

  .reviews__bestseller-media picture,
  .reviews__bestseller-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .reviews__track .reviews__card {
    width: calc(33.333% - 0.667rem);
  }
}
