/* Scoped to the existing homepage gallery; product/detail cards remain unchanged. */
#gallery { scroll-margin-top: 100px; }
#gallery .gallery-heading > p { font-size: 16px; line-height: 1.8; color: #58615a; }
.testimonials { --testimonial-width: 420px; --testimonial-gap: 24px; min-width: 0; }
.testimonials-pending { padding: 32px 0; color: #58615a; }
.testimonials-viewport {
  display: flex; align-items: center; gap: var(--testimonial-gap);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: 20px;
  touch-action: pan-x pan-y pinch-zoom;
}
.testimonials-viewport::-webkit-scrollbar { display: none; }
.testimonials-viewport::before, .testimonials-viewport::after {
  content: ""; flex: 0 0 max(0px, calc((100% - var(--testimonial-width)) / 2 - var(--testimonial-gap)));
}
.testimonial-slide {
  flex: 0 0 var(--testimonial-width); width: var(--testimonial-width); min-width: 0;
  margin: 0; scroll-snap-align: center; opacity: .68; transform: scale(.94);
  transition: transform 400ms ease, opacity 400ms ease;
}
.testimonial-slide.is-current { transform: scale(1); opacity: 1; }
.testimonial-slide img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain;
  border-radius: 14px; box-shadow: 0 5px 18px #243d3020;
}
.testimonial-placeholder {
  box-sizing: border-box; aspect-ratio: 4 / 5; display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 24px; padding: 24px;
  background: #f2e8df; color: #40584b; border: 1px dashed #849b8b; border-radius: 14px;
  text-align: center; font-size: 16px; line-height: 1.8;
}
.testimonial-placeholder strong { font-family: inherit; font-size: 24px; }
.testimonials-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.testimonials-controls button { min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid #a7b4a6; border-radius: 999px; color: #294b3b; background: #faf7f0; font: inherit; cursor: pointer; }
.testimonials button:focus-visible, .testimonials-viewport:focus-visible { outline: 3px solid #42694d; outline-offset: 4px; }
.testimonials-dots { display: flex; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.testimonials-dots button { border: 0; background: transparent; padding: 14px; }
.testimonials-dots button::after { content: ""; display: block; width: 8px; height: 8px; border-radius: 50%; background: #a1aea1; }
.testimonials-dots button[aria-current="true"]::after { background: #294b3b; }
.testimonials-status { text-align: center; color: #58615a; font-size: 14px; line-height: 1.7; margin: 12px 0 0; }
.testimonials-status { min-height: 24px; }
.testimonials-dots .testimonial-mobile-dot { display: none; }
@media (max-width: 767px) {
  .testimonials { --testimonial-width: min(72vw, 320px); --testimonial-gap: 12px; }
  .testimonials-viewport { padding-block: 12px; }
  .testimonials-controls { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
  .testimonials-controls > button:first-child { grid-column: 1; grid-row: 1; }
  .testimonials-controls > button:nth-child(3) { grid-column: 3; grid-row: 1; }
  .testimonials-controls > button:last-child { grid-column: 2; grid-row: 1; justify-self: center; }
  .testimonials-dots { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; }
  .testimonials-dots .testimonial-desktop-dot { display: none; }
  .testimonials-dots .testimonial-mobile-dot { display: block; }
  .testimonials-controls button { min-width: 44px; }
  .testimonials-dots button { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .testimonial-slide { transition: none; }
  .testimonials-viewport { scroll-behavior: auto; }
}
