/* carousel component — SCOPED rules only.
   Global reset / body / .desktop-only / .container live in ../_preview.css
   (standalone preview ONLY). In a project, base.css owns the global frame —
   do NOT reintroduce them here. */

/*Product Block */
@media (min-width: 1024px) {
    .product-block-wrapper {
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }
    .product-block-carrousel {
        width: 50%;
        margin-top: 0;
    }
    .product-block-left {
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }
    .product-block-right {
        flex: 1;
        min-width: 0
    }

}
/* Carousel extracted styles */
.__shopify .shopify-slider { 
  width: 100%; 
}
.__shopify .shopify-slider-container { 
  overflow: hidden; 
}
.__shopify .shopify-slider-slide img { 
  display: block; 
}
.__shopify .shopify-slider-horizontal { 
  touch-action: pan-y; 
}
.__shopify .shopify-slider-horizontal > .shopify-slider-wrapper { 
  flex-direction: row; 
  height: 100%;
}
.__shopify .shopify-slider-vertical { 
  touch-action: pan-x; 
}
.__shopify .shopify-slider-vertical > .shopify-slider-wrapper { 
  flex-direction: column; 
}
.__shopify .shopify-slider-free-mode > .shopify-slider-wrapper { 
  transition-timing-function: ease-out; 
}
.__shopify .shopify-slider-auto-slides .shopify-slider-slide { 
  max-width: none; min-width: unset; 
}
.__shopify .shopify-slider-thumbs > .shopify-slider-wrapper > .shopify-slider-slide { 
  cursor: pointer; 
}
.__shopify .shopify-slider-wrapper 
{ align-items: inherit; 
  align-self: stretch; 
  box-sizing: content-box; 
  display: flex; 
  height: 48px;
  order: 1; 
  transform: translateZ(0); 
  transition-property: transform; 
  transition-timing-function: ease; 
  width: 100%; }
.__shopify .shopify-slider-slide { 
  flex-shrink: 0; transition-property: transform; 
}
.__shopify .shopify-slider-button-disabled:not(.__shopify_builder_element) { 
  opacity: .35; 
}
.__shopify .shopify-slider-button-lock, .__shopify .shopify-slider-pagination-lock { 
  display: none !important; 
}
.shopify-slider-button {
  position: absolute;
    transform: translateY(-50%);
    top: 50%;
width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;  
  transition: box-shadow .2s ease, transform .15s ease;
}
.shopify-slider-button:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.shopify-slider-button svg {
  transition: transform .2s ease;
}

.shopify-slider-button:hover svg {
  transform: scale(1.2);
}
.shopify-slider-button-prev {
    left: 10px;
}
.shopify-slider-button-next {
    right: 10px;
}
.__shopify .shopify-slider-pagination-bullets-dynamic .shopify-slider-pagination-bullet-active, .__shopify .shopify-slider-pagination-bullets-dynamic .shopify-slider-pagination-bullet-active-main { 
  display: flex; transform: scale(1); 
}
.__shopify .shopify-slider-pagination-bullets-dynamic .shopify-slider-pagination-bullet-active-next, .__shopify .shopify-slider-pagination-bullets-dynamic .shopify-slider-pagination-bullet-active-prev { 
  display: flex; transform: scale(.66); 
}
.__shopify .shopify-slider-pagination-bullets-dynamic .shopify-slider-pagination-bullet-active-next-next, .__shopify .shopify-slider-pagination-bullets-dynamic .shopify-slider-pagination-bullet-active-prev-prev { 
  display: flex; transform: scale(.33); 
}
.__shopify .shopify-slider-pagination-bullet { 
  cursor: pointer; flex-shrink: 0; 
}
.__shopify .shopify-image.shopify-image__main { 
  aspect-ratio: inherit; 
  height: auto; 
  max-height: none; 
  object-fit: contain; 
  object-position: center; 
  width: 100%; 
}

/* Product gallery specific classes (preserved) */
 .ibdl7jSctrEgobsDF {  
    min-width: 0; 
    overflow: var(--shopify-overflow-clip, hidden); 
    gap: 10px; 
}
 .iQMV5VuCwogaJEdtc,  .ibdl7jSctrEgobsDF { 
  align-items: flex-start; 
   display: flex; flex-basis: 0%; 
   flex-direction: column; 
   flex-grow: 1; 
   flex-shrink: 1; 
   justify-content: flex-start; 
   position: relative; 
  }
.iQMV5VuCwogaJEdtc { 
  align-self: stretch; min-height: 0; 
}
.ip0v3Wq2c0KULJHOO 
{ align-items: stretch;  
    bottom: auto; 
    display: flex; 
    flex-direction: row;
     height: 100%; 
     width: 100%;
     justify-content: flex-start; 
     left: auto; 
     overflow: var(--shopify-overflow-clip, hidden); 
     position: relative; right: auto; top: auto; 
      
    }
 .iytPxehuLgUqoxXQ6 { 
  align-items: center; 
  align-self: stretch;  
  display: flex; 
  flex-direction: column; 
  height: auto; 
  justify-content: center; 
  position: relative; 
  width: 100%; 
}
 .ivkJ7tiDLPBwLMk8t { 
  align-self: stretch;  
  flex-basis: 0%; 
  flex-grow: 1; flex-shrink: 1; 
  max-width: 100%; 
  min-height: 0; 
  object-fit: cover; 
  position: relative; 
}
.ilZAXLa0KEQPTS9q2 { 
  align-items: flex-start; 
  align-self: stretch;  
  /* column-gap: 24px;  */
  display: flex; 
  flex-direction: column; 
  justify-content: flex-start; 
  overflow: var(--shopify-overflow-clip, hidden); 
  position: relative; 
  /* row-gap: 24px;  */
}
 .i9MuTiHFVI9qvIaSA { align-items: stretch; 
  display: flex; 
  flex-direction: row; 
  height: 100%; 
  justify-content: flex-start; 
  overflow: visible; 
  position: relative;
  width: 100%; }
/* FD-BS: never stretch the horizontal thumb row. Safari <= 18 keeps the flex line at the
   aspect-ratio height of the slide's pre-Swiper width (calc(25% - 12px)) after Swiper writes
   the real one, so stretched thumbs with `aspect-ratio` render taller than wide. */
.i9MuTiHFVI9qvIaSA.shopify-slider-horizontal > .shopify-slider-wrapper {
  align-items: flex-start;
}
/* Without the stretch a thumb needs its own shape, or a not-yet-loaded lazy image collapses it
   to 0 tall (Safari 18) and mixed-ratio photos make a ragged row. Shape = layout.thumbAspect
   (default 1/1). :where() keeps this at (0,2,0) so a project's own thumb aspect-ratio wins. */
.i9MuTiHFVI9qvIaSA:where(.shopify-slider-horizontal) .iA7jBRXnSUIAbCr1c { 
  aspect-ratio: var(--carousel-thumb-aspect, 1 / 1); 
}
.iA7jBRXnSUIAbCr1c {
  align-items: center;  
   display: flex; 
   flex-direction: column; 
   height: auto; 
   justify-content: center;
    margin-bottom: 0; 
    margin-right: 16px; 
    position: relative; 
    transition-duration: 125ms; 
    transition-property: color, background-color, fill, opacity, transform, border, box-shadow, left, backdrop-filter, filter; 
    transition-timing-function: ease-in-out; 
    width: calc(25% - 12px); 
  }
.i9MuTiHFVI9qvIaSA.shopify-slider-thumbs .iA7jBRXnSUIAbCr1c.shopify-slider-thumb-active,  .i9MuTiHFVI9qvIaSA:not(.shopify-slider-thumbs) .iA7jBRXnSUIAbCr1c.shopify-slider-slide-active { 
  border: 1px solid #000001; 
}
.i9P5R4TQc9YakHTAG { 
  align-self: stretch;  
  flex-basis: 0%; 
  flex-grow: 1; 
  flex-shrink: 1; 
  max-width: 100%; 
  min-height: 0; 
  object-fit: cover; 
  position: relative; 
}
/* Thumbnail sizing overrides */
.i9MuTiHFVI9qvIaSA .iA7jBRXnSUIAbCr1c { 
  /* width: 48px;
  height: 48px;  */
  flex: 0 0 auto; 
}
.i9MuTiHFVI9qvIaSA .i9P5R4TQc9YakHTAG,
.i9MuTiHFVI9qvIaSA .i9P5R4TQc9YakHTAG img.shopify-image__main { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
@media (min-width: 768px) { 
.i9MuTiHFVI9qvIaSA .iA7jBRXnSUIAbCr1c { 
   height: auto;
   }
}
@media (min-width: 1024px) { 
.ip0v3Wq2c0KULJHOO { 
     height: 100%; 
}
.__shopify .shopify-slider-wrapper {
  height: 100%;
}
.product-block-carrousel {
    flex: 1;
}
}
/* Carousel layout overrides */
.product-block-carrousel {
  margin-top: 15px;
}
.product-block-carrousel[data-thumbs-position="top"] [data-shopify-type="container"] {
  display: flex;
  flex-direction: column;
  gap: 12px;
  order: 1;
}
.product-block-carrousel[data-thumbs-position="top"] [data-shopify-type="slider-container"] {
  order: 0;
}
/* Left thumbnails layout */
.product-block-carrousel[data-thumbs-position="left"] .__shopify {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 12px;
  align-items: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
}
.product-block-carrousel[data-thumbs-position="left"] .shopify-slider-container.ilZAXLa0KEQPTS9q2 {
  /* flex: 0 0 80px !important; */
  /* width: 80px !important; */
  width: 15%;
  margin-top: 0 !important;
}
.product-block-carrousel[data-thumbs-position="left"] .shopify-slider-container.ibdl7jSctrEgobsDF {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  flex-direction: row-reverse;
}
.product-block-carrousel[data-thumbs-position="left"] .shopify-slider {
  width: 100% !important;
  max-width: 100% !important;
   height: fit-content !important;
}
.product-block-carrousel[data-thumbs-position="left"] .shopify-slider-thumbs .shopify-slider-wrapper {
  flex-direction: column !important;
  height: auto !important;
}
.product-block-carrousel[data-thumbs-position="left"] .i9MuTiHFVI9qvIaSA .iA7jBRXnSUIAbCr1c {
  width: 100% !important;
  margin-right: 0 !important;
  margin-bottom: 12px !important;
}
.product-block-carrousel[data-thumbs-position="left"] .iQMV5VuCwogaJEdtc {
  width: 85%;
   height: fit-content !important;
}
.product-block-carrousel[data-thumbs-position="left"] .shopify-slider-p0v3Wq2c0KULJHOO-button-prev {
  left: 16%;
}
.product-block-carrousel[data-thumbs-position="left"] .ivkJ7tiDLPBwLMk8t {
max-height: fit-content;
}
.product-block-carrousel[data-thumbs-position="left"] .__shopify .shopify-slider-slide {
  height: fit-content !important;
}

.product-block-carrousel[data-thumbs-position="left"] .__shopify .shopify-slider-wrapper {
  height: fit-content !important;
}
.product-block-carrousel[data-thumbs-position="left"] .shopify-slider-9MuTiHFVI9qvIaSA-button-prev {
  top: 5px;
  transform: translateX(-50%) rotate(90deg);
  left: 50%;
}

.product-block-carrousel[data-thumbs-position="left"] .shopify-slider-9MuTiHFVI9qvIaSA-button-next {
  bottom: 5px;
  transform: translateX(-50%) rotate(90deg);
  left: 50%;
  top: auto;
}

/* ============================================
   DESKTOP GRID MODE — opt-in via layout.desktopLayout: "grid" in carousel.json
   Mobile (<1024) stays as a Swiper carousel (default behavior).
   Desktop (>=1024) becomes a static "1 hero + 2-column thumbnail grid" gallery:
     - thumbnails wrap into a 2-column grid (instead of horizontal scroll row)
     - main slider is locked to the first slide (no swipe / drag)
     - prev/next arrows are hidden
     - first thumbnail is hidden because it duplicates the hero
     - thumbnail cells use a uniform aspect-ratio from layout.thumbAspect
     - thumbnails get hover affordance (darken + zoom icon) and click-to-zoom
   The JS bindings, Swiper init, and HTML structure are untouched —
   this block is pure CSS overrides on the same JS-bound identifiers.
============================================ */
@media (min-width: 1024px) {
  /* --carousel-grid-gap: gap between cells; defaults to 20px scaled by viewport.
     Fallback values for --max-vw / --vw-base ensure the template works
     standalone (without a project tokens.css). Project CSS may override
     --carousel-grid-gap directly if Figma uses a different gap. */
  .product-block-carrousel[data-desktop-layout="grid"] {
    --carousel-grid-gap: calc(20px * (var(--max-vw, 1520px) / var(--vw-base, 1520px)));
  }
  .product-block-carrousel[data-desktop-layout="grid"] .i9MuTiHFVI9qvIaSA .shopify-slider-wrapper {
    flex-wrap: wrap;
    align-content: flex-start;
    gap: var(--carousel-grid-gap);
    height: auto;
  }
  /* Cell width is driven by --carousel-grid-cols (default 2). Examples:
     - cols=2 → cells take 50% (minus gap share) → classic 2×N grid (4 thumbs → 2×2)
     - cols=6 → cells take ~16.6% → single 1×6 row (note: single-row layouts should use carousel mode, not grid — see RECOGNIZE.md)
     - cols=3 → cells take ~33% → 3×N grid */
  .product-block-carrousel[data-desktop-layout="grid"] .i9MuTiHFVI9qvIaSA .iA7jBRXnSUIAbCr1c {
    --cols: var(--carousel-grid-cols, 2);
    width: calc((100% - (var(--cols) - 1) * var(--carousel-grid-gap)) / var(--cols));
    flex: 0 0 calc((100% - (var(--cols) - 1) * var(--carousel-grid-gap)) / var(--cols));
    /* Neutralize Swiper's inline `margin-right` (set from sliderConfig.spaceBetween).
       In grid mode the gap is handled by CSS `gap` on the wrapper above — keeping
       Swiper's margin-right would force thumbs into fewer columns than expected. */
    margin-right: 0 !important;
    aspect-ratio: var(--carousel-thumb-aspect, 1 / 1);
  }
  .product-block-carrousel[data-desktop-layout="grid"] .i9MuTiHFVI9qvIaSA .iA7jBRXnSUIAbCr1c > [data-shopify-type="image"],
  .product-block-carrousel[data-desktop-layout="grid"] .i9MuTiHFVI9qvIaSA .iA7jBRXnSUIAbCr1c img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="slider"] {
    pointer-events: none;
  }
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="slider"] > .shopify-slider-wrapper {
    transform: none !important;
  }
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="slider"] > .shopify-slider-wrapper > .shopify-slider-slide:not(:first-child) {
    display: none;
  }
  .product-block-carrousel[data-desktop-layout="grid"] .shopify-slider-button {
    display: none !important;
  }
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="thumbnails"] > .shopify-slider-wrapper > .shopify-slider-slide:first-child {
    display: none;
  }

  /* Thumbnail hover affordance — darken + center zoom icon, indicates that
     the thumb is clickable and will open the lightbox. */
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="thumbnails"] .iA7jBRXnSUIAbCr1c {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
  }
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="thumbnails"] .iA7jBRXnSUIAbCr1c::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1;
  }
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="thumbnails"] .iA7jBRXnSUIAbCr1c::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 2;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7.5 1.667H1.667V7.5M12.5 1.667h5.833V7.5M1.667 12.5v5.833H7.5M18.333 12.5v5.833H12.5M1.667 1.667l6.667 6.666M18.333 1.667l-6.666 6.666M1.667 18.333l6.667-6.666M18.333 18.333l-6.666-6.666' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="thumbnails"] .iA7jBRXnSUIAbCr1c:hover::before,
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="thumbnails"] .iA7jBRXnSUIAbCr1c:focus-within::before,
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="thumbnails"] .iA7jBRXnSUIAbCr1c:hover::after,
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="thumbnails"] .iA7jBRXnSUIAbCr1c:focus-within::after {
    opacity: 1;
  }
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="thumbnails"] .iA7jBRXnSUIAbCr1c:hover::after,
  .product-block-carrousel[data-desktop-layout="grid"] [data-shopify-type="thumbnails"] .iA7jBRXnSUIAbCr1c:focus-within::after {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ============================================
   LIGHTBOX — auto-mounted by carousel.js when desktop grid mode opens a thumb.
   `.carousel-lightbox` is appended to <body> and toggled via `.is-open`.
============================================ */
.carousel-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  padding: 24px;
}
.carousel-lightbox.is-open {
  display: flex;
}
.carousel-lightbox__image {
  width: min(92vw, 1200px);
  height: min(86vh, 820px);
  object-fit: contain;
}
.carousel-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}