/* Inicio: una sola fila adaptable; si sobran productos, se navegan como carrusel. */
.home-product-carousel {
  --home-visible-products: 4;
  --home-product-width: 260px;
}

.home-product-carousel .home-carousel-stage,
.home-product-carousel.is-product-carousel .home-carousel-stage {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  -webkit-mask-image: none;
  mask-image: none;
}

.home-product-carousel .home-carousel-stage::-webkit-scrollbar {
  display: none;
}

.home-product-carousel .home-product-grid,
.home-product-carousel.is-product-carousel .home-product-grid {
  position: relative;
  display: flex !important;
  grid-template-columns: none !important;
  grid-auto-flow: initial !important;
  gap: 20px;
  width: 100%;
  height: auto;
  transform: none;
}

.home-product-carousel .home-product-card,
.home-product-carousel.is-product-carousel .home-product-card {
  position: relative;
  top: auto;
  left: auto;
  flex: 0 0 var(--home-product-width);
  width: auto;
  height: clamp(350px, 44svh, 430px);
  visibility: visible;
  scroll-snap-align: start;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
  pointer-events: auto;
}

.home-product-carousel .home-carousel-controls,
.home-product-carousel.is-product-carousel .home-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 48px;
  margin: 10px auto 0;
}

.home-product-carousel .home-carousel-controls[hidden] {
  display: none !important;
}

.home-product-carousel .home-carousel-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #344859;
  border-radius: 50%;
  background: rgba(17, 34, 54, .92);
  color: #fafafa;
  cursor: pointer;
}

.home-product-carousel .home-carousel-arrow:disabled {
  opacity: .35;
  cursor: default;
}

.home-product-carousel .home-carousel-arrow svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-carousel-position {
  min-width: 82px;
  color: #9b9ea3;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Tienda: cada colección mantiene su propio bloque. */
.shop-collections {
  display: grid;
  gap: 64px;
  width: 100%;
  min-width: 0;
}

.shop-collection-group,
.shop-product-carousel {
  width: 100%;
  min-width: 0;
}

.shop-collection-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(250, 250, 250, .16);
}

.shop-collection-group > header > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.shop-collection-group > header h2 {
  margin: 0;
  color: #fafafa;
  font-size: clamp(23px, 2.8vw, 32px);
  line-height: 1.1;
}

.shop-collection-group > header > div > span {
  color: #9b9ea3;
  font-size: 11px;
  white-space: nowrap;
}

.shop-open-collection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #344859;
  border-radius: 9px;
  color: #fafafa;
  font-size: 12px;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease;
}

.shop-open-collection:hover {
  border-color: #1769f2;
  background: rgba(23, 105, 242, .14);
}

.shop-open-collection span {
  color: #76a9ff;
  font-size: 16px;
}

.shop-product-carousel .home-carousel-controls {
  margin-top: 14px;
}

.shop-collections.is-expanded {
  gap: 0;
}

.shop-expanded-grid {
  align-items: stretch;
}

.shop-back-link {
  display: block;
  width: max-content;
  margin-bottom: 20px;
  color: #8cb4ff;
  font-size: 12px;
  font-weight: 700;
}

.shop-back-link:hover {
  color: #fafafa;
}

@media (max-width: 980px) {
  .home-product-carousel .home-carousel-stage,
  .home-product-carousel.is-product-carousel .home-carousel-stage {
    padding: 0 0 8px;
  }

  .home-product-carousel .home-product-card,
  .home-product-carousel.is-product-carousel .home-product-card {
    height: clamp(330px, 52svh, 420px);
  }
}

@media (max-width: 650px) {
  .home-product-carousel .home-product-grid,
  .home-product-carousel.is-product-carousel .home-product-grid {
    gap: 14px;
  }

  .home-product-carousel .home-product-card,
  .home-product-carousel.is-product-carousel .home-product-card {
    flex-basis: var(--home-product-width);
    width: auto;
    height: clamp(330px, 60svh, 420px);
  }

  .shop-collections {
    gap: 48px;
  }

  .shop-collection-group > header {
    align-items: flex-end;
  }

  .shop-collection-group > header > div {
    display: block;
  }

  .shop-collection-group > header > div > span {
    display: block;
    margin-top: 5px;
  }

  .shop-open-collection {
    min-height: 36px;
    padding: 0 11px;
  }
}
