/* ============================================================================
   ragazzi-slider.css — CARRIED from ragazzi-site/css/templates/slider.css.

   The static's shared slider RAIL: the drag scroller, its `.is-dragging` state
   and the arrow buttons. Three sections of the page use it (reviews, athletes,
   blog), which is why it is its own file here too.

   ONE EDIT on the way in: the static scopes every rule with
   `:is(.reviews, .athletes, .blog, .benefits, .ingredients)` — five bare,
   collision-prone names in what is a FLAT `assets/` folder here, shared with
   every app the merchant installs. All of them became one class, `.ragazzi-slider`,
   which each section that uses the rail carries. Specificity is UNCHANGED:
   `:is()` counts as its most specific argument, one class either way — and that
   matters, because ragazzi-reviews.css deliberately out-specifies several of
   these rules and was tuned against exactly this weight.

   The class names the JS binds — .slides-wrapper, .slides-blocks,
   .slide-wrapper, .carousel-btn, .is-dragging — are a contract with
   ragazzi-slider.js. Do not rename either side alone.
============================================================================ */
/* ============================================================================
   slider.css — THE SITE'S ONE COPY, SCOPED. Not the raw template.
   Linked by home (`css/templates/slider.css`) and pdp-gels (`../css/…`).

   SCOPE LIST WIDENED 2026-08-15, when pdp-gels joined: the `:is()` prefix on
   every scoped rule went from `(.reviews, .athletes, .blog)` to
   `(.reviews, .athletes, .blog, .benefits, .ingredients)` — 23 selectors — so
   one file serves both pages' rails. Checked first, not assumed:

     - `.bestsellers` STAYS OUT. See the stitcher note below; it is the whole
       reason this file is scoped at all.
     - ALL of pdp-gels's slider markup lives inside `.benefits` / `.ingredients`
       (counted in the DOM: 2 `.slides-blocks`, 2 `.slides-wrapper`,
       11 `.slide-wrapper`, 2 `.carousel-controls`, 4 `.carousel-btn`, and
       nothing outside those two sections).
     - `.reviews` is in the list and pdp-gels HAS a `.reviews` section — a
       completely different one, which uses no slider template. Counted: zero
       elements of any template class inside it, so widening cannot reach it.
     - home has no `.benefits` and no `.ingredients`, so the two new names are
       inert there.
     - SPECIFICITY: `:is()` takes its most specific argument, so a scoped rule
       is (0,2,0) — the same as pdp-gels's own `.benefits .slides-blocks`-style
       overrides, which still win by source order because this file is linked
       BEFORE the section stylesheets. Previously those rules reached pdp-gels
       at (0,1,0); the section CSS out-specified them then and ties them now.
       Either way the section wins. Verified, not assumed: 0 computed-style
       diffs on both pages at 375/768/1024/1440/1920.

   The four UNSCOPED rules are deliberately left unscoped, because that is the
   state both pages were verified in: `.slides-wrapper { position: relative }`,
   the `.slides-wrapper.slide-no-arrows` half of the no-arrows pair,
   `.carousel-btn.prev/.next`, and `.carousel-controls .carousel-btn:disabled`
   (which pdp-gels's components.css counters at (0,3,0) per FD-86).

   ORIGINAL STITCHER NOTE — why this file is scoped at all:
   part3 links this template; part1 NEVER DID. part1's bestsellers rail was
   built and verified with its own scoped rules only. Linking the template
   page-wide measurably regressed it — a stitched-vs-part diff showed its cards
   gaining `border-radius: 12px` and `overflow: hidden`, and their height being
   forced from content (735.89 desktop / 480.17 mobile) to the template's fixed
   637 / 400. Those are template rules part1 simply never overrode, because it
   never had to.

   Every selector below is therefore prefixed with the three sections that
   actually use this template. Specificity rises by exactly one class, and this
   file is still linked BEFORE the section stylesheets, so part3's own overrides
   keep winning by source order — verified, not assumed.

   Bonus: this also contains FD-71. The template's bare `.title`
   (color #2C2C2C, 24px, 58px above 1440) can no longer reach any other
   section's heading.
============================================================================ */

/* slider component — SCOPED rules only.
   Global reset / body / .container live in ../_preview.css (standalone preview ONLY).
   In a project, base.css owns the global frame — do NOT reintroduce them here. */




.ragazzi-slider .video-wrapper {
  position: relative;
  overflow: hidden;
      margin-left: auto;
    margin-right: auto;

}

.ragazzi-slider .video-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  object-fit: cover;
  /* object-position: center bottom; */
  object-position: 50% 80%;
}
/* (demo .desktop-only/.mobile-only + .container gutter removed → ../_preview.css) */
/*Slider*/

.ragazzi-slider .slider-container {
    margin-top: 60px;
}
.ragazzi-slider .title {
font-weight: 500;
font-size: 24px;
line-height: 1.1;
letter-spacing: -1px;
text-align: center;
vertical-align: middle;
color: #2C2C2C;
}
.ragazzi-slider .slide-logo {
position: absolute;
top: 10px;
left: 10px;

}
.ragazzi-slider .slides-blocks {
    margin-top: 20px;
    display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 10px;

  /* AUTO, not smooth. CSS-level `scroll-behavior: smooth` is what fights mandatory snap:
     a programmatic scrollBy/scrollTo animates, the snap re-targets mid-animation, and the
     scroller reads back at its old position — the prev/next buttons then look dead. The JS
     passes `behavior: 'smooth'` on each call, so the animation is not lost.
     The historical work-around for that was to switch SNAP off per variant. That kills the
     wrong one of the two: without snap a cursor drag stops wherever it is released and leaves
     a slide half-shown. Measured on nooa-landing 2026-08-02 — with `auto` here, mandatory snap
     and one-slide button steps coexist: a drag released at 1.4 slides settled exactly on
     slide 1, and the button landed on a snap point. */
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ragazzi-slider .slides-blocks.is-dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
}
.slides-wrapper { position: relative; }
.ragazzi-slider .slide-wrapper {
width: 281px;
height: 400px;
border-radius: 20px;
position: relative;
margin-left: 0;
margin-right: 0;

flex: 0 0 auto;
scroll-snap-align: center;
  border-radius: 12px;
  overflow: hidden;
}
.ragazzi-slider .slide-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.ragazzi-slider .slide-image-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 14px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  color: #fff;
}
.ragazzi-slider .slide-image-text p {
  margin: 0;
  font-family: "Onest", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
}
.ragazzi-slider .slides-blocks::-webkit-scrollbar {
  display: none; /* приховати скрол */
}
.ragazzi-slider .carousel-controls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  pointer-events: none;
}
.slides-wrapper.slide-no-arrows .carousel-controls,
.ragazzi-slider .slides-blocks.slide-no-arrows + .carousel-controls {
  display: none;
}

.ragazzi-slider .carousel-btn {
     display: flex;
  align-items: center;
  justify-content: center;
  background: #DED6D8;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: background 0.2s;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
}
.ragazzi-slider .carousel-btn img {
  width: 9px;
  height: 15px;
}
.carousel-btn.prev { left: 30px; }
.carousel-btn.next { right: 30px; }
.carousel-controls .carousel-btn:disabled { display: none; }

.ragazzi-slider .carousel-btn:hover {
  background: #cfc7c9;
}
.ragazzi-slider .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 36px;
    width: 100px;
    height: 100px;
    cursor: pointer;
    transition: .3s;
}
@media (min-width: 1440px) {  
.ragazzi-slider .slider-container {
    margin-top: 150px;
}
.ragazzi-slider .slide-wrapper {
    /* flex: 1; */
    width: 425px;
    height: 637px;
}
.ragazzi-slider .slide-image-text p {
    font-size: 20px;
}
.ragazzi-slider .slides-blocks {
    margin-top: 50px;
}
.ragazzi-slider .title {
    font-size: 58px;
}




}

/* ============================================================================
   THE REVEAL ANIMATION DOES NOT GO ON INDIVIDUAL SLIDES.

   Reported: every rail is clipped slightly in height on mobile and offers a
   vertical scroll it should not have. Measured on the live store - each
   `.slides-blocks` had EXACTLY 20px of vertical overflow, on every rail and at
   every width.

   The cause is Dawn's scroll reveal. `.scroll-trigger.animate--slide-in` starts
   at `opacity: 0.01; transform: translateY(2rem)` and animates to nothing once
   the element enters the viewport. The theme's sections put that class on each
   CARD. A card is exactly as tall as this scroller, so while it waits its turn
   the 20px translate pushes its bottom past the scroller's content box - and
   because the scroller declares `overflow-x: auto`, the OTHER axis computes to
   `auto` as well, so those 20px become a real vertical scroll. Where a section
   had written `overflow-y: hidden` instead, the same 20px silently clipped the
   card.

   DAWN ALREADY SOLVED THIS FOR ITS OWN SLIDERS, and this mirrors it:
   base.css cancels the per-slide reveal inside `.slider--mobile/tablet/desktop`
   (`animation: none; opacity: 1; transform: inherit`) and animates the whole
   rail instead. Those rules key on Dawn's `.slider` classes, which this carried
   template does not use, so they never matched here.

   Cancelled rather than re-pointed at the rail: the design does not ask for a
   rail-level reveal, and the headings above each rail already carry their own
   trigger. `(0,3,0)` clears Dawn's `(0,2,0)`.

   Verified live: 20px -> 0 on all three home rails, card transform `none`,
   opacity 1.
============================================================================ */
.slides-blocks .scroll-trigger.animate--slide-in,
.slides-blocks .scroll-trigger.animate--fade-in {
  animation: none;
  opacity: 1;
  transform: none;
}
