/* Product carousel — full-bleed like live ProductCollection (spaceAround=false on desktop) */

.product-carousel,
.product-carousel.skeidar-block--contained,
.product-carousel.skeidar-block--full {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  box-sizing: border-box;
  /* Default top air is small; CMS Top Spacing still adds skeidar-block--top-* when set */
  padding: 0;
  /* Transparent so CMS Theme (White/Gray/Dark) can paint the band — matches live ProductCollection */
  background: transparent;
  overflow: hidden;
}

/* Keep a little air only when the next block is not a full-bleed promo banner */
.product-carousel:not(:has(+ .promo-media)) {
  padding-bottom: 40px;
}

/* Interior/furniture mosaic → bestsellers: live has no extra band between sections */
.column-splitter + .product-carousel,
.column-splitter + .product-carousel.skeidar-block--top-small,
.column-splitter + .product-carousel.skeidar-block--top-medium,
.column-splitter + .product-carousel.skeidar-block--top-large,
.promotion-grid + .product-carousel,
.promotion-grid + .product-carousel.skeidar-block--top-small,
.promotion-grid + .product-carousel.skeidar-block--top-medium,
.promotion-grid + .product-carousel.skeidar-block--top-large {
  margin-top: 0;
  padding-top: 0 !important;
}

.product-carousel + .promo-media,
.product-carousel + .promo-media.skeidar-block--top-small,
.product-carousel + .promo-media.skeidar-block--top-medium,
.product-carousel + .promo-media.skeidar-block--top-large {
  margin-top: 0;
  padding-top: 0 !important;
}

/* Garden promo → products: no large white band under the banner */
.promo-media + .product-carousel,
.promo-media + .product-carousel.skeidar-block--top-small,
.promo-media + .product-carousel.skeidar-block--top-medium,
.promo-media + .product-carousel.skeidar-block--top-large {
  margin-top: 0;
  padding-top: 0 !important;
}

/* Title keeps production space-around (20 / 40); track is edge-to-edge */
.product-carousel__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-inline: 20px;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .product-carousel__header {
    padding-inline: 40px;
  }
}

.product-carousel__heading {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.15;
  color: #000;
  text-align: start;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

@media (max-width: 599.95px) {
  .product-carousel__heading {
    font-size: 1.25rem;
  }
}

.product-carousel__subheading {
  margin: 0;
  font-size: 1rem;
  color: #555;
}

/*
 * Outside-arrow layout (matches CSwiper arrowsOutside):
 * [40px arrow] [track] [40px arrow] — track fills the rest, full viewport width.
 */
.product-carousel__viewport {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 20px;
  align-items: start;
  gap: 0;
  width: 100%;
  min-width: 0;
}

@media (min-width: 900px) {
  .product-carousel__viewport {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }
}

.product-carousel__scroller {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 6px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

@media (min-width: 900px) {
  .product-carousel__scroller {
    gap: 20px;
  }
}

.product-carousel__scroller::-webkit-scrollbar {
  display: none;
}

.product-carousel__scroller.is-dragging,
.product-carousel__viewport.is-dragging .product-carousel__scroller {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.product-carousel__scroller.is-dragging a,
.product-carousel__viewport.is-dragging a {
  pointer-events: none;
}

/* Live ProductCollection card widths: 191 mobile / 311 desktop */
.product-carousel__slide {
  flex: 0 0 191px;
  width: 191px;
  min-width: 191px;
  max-width: 311px;
  box-sizing: border-box;
  scroll-snap-align: start;
}

@media (min-width: 900px) {
  .product-carousel__slide {
    flex-basis: 311px;
    width: 311px;
    min-width: 311px;
  }
}

/*
 * Production arrowsmall: 21×23 frosted plate, SVG chevron,
 * vertically centered on the product image box.
 */
.product-carousel__arrow.carousel-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: 95px;
  z-index: 2;
  width: 21px;
  height: 23px;
  min-width: 21px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(248, 248, 248, 0.66);
  color: #000;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  line-height: 0;
  -webkit-appearance: none;
  appearance: none;
  justify-self: center;
  opacity: 0;
  pointer-events: none;
  transition: background 0.2s ease, opacity 0.3s ease;
}

@media (min-width: 900px) {
  .product-carousel__arrow.carousel-arrow {
    top: 103px; /* ~ half of 206px image height */
  }
}

.product-carousel__viewport:hover .product-carousel__arrow.carousel-arrow {
  opacity: 1;
  pointer-events: auto;
}

.product-carousel__arrow.carousel-arrow > svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.product-carousel__arrow.carousel-arrow:hover,
.product-carousel__arrow.carousel-arrow:focus {
  background: rgba(248, 248, 248, 0.9);
  outline: none;
}

.product-carousel__arrow.carousel-arrow:disabled,
.product-carousel__arrow.carousel-arrow.swiper-button-disabled {
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (hover: none) {
  .product-carousel__arrow.carousel-arrow {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 599.95px) {
  .product-carousel__arrow.carousel-arrow {
    display: none !important;
  }
}

/* Cards */
.product-carousel .product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.product-carousel .product-card__media-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-carousel .product-card__media {
  position: relative;
  display: block;
  width: 100%;
  height: 124px;
  overflow: hidden;
  background: #ececec;
}

@media (min-width: 900px) {
  .product-carousel .product-card__media {
    height: 206px;
  }
}

.product-carousel .product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #fff;
  pointer-events: none;
}

.product-carousel .product-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  font-style: italic;
  line-height: 1.2;
  color: #222;
}

.product-carousel .product-card__variants {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(120, 120, 120, 0.85);
  font-size: 0.75rem;
  line-height: 1.2;
  color: #fff;
}

.product-carousel .product-card__wishlist {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  font-size: 1.25rem;
  line-height: 1;
  color: #333;
  opacity: 0.85;
}

.product-carousel .product-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 2px 0;
  min-width: 0;
}

.product-carousel .product-card__category {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: #8a8a8a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-carousel .product-card__title {
  min-width: 0;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: #111;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-carousel .product-card__title:hover {
  text-decoration: underline;
}

.product-carousel .product-card__discount {
  flex: 0 0 auto;
  padding: 2px 6px;
  background: #e8dfd0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  color: #222;
  white-space: nowrap;
}

.product-carousel .product-card__brand {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-carousel .product-card__prices {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}

.product-carousel .product-card__prices .product-card__discount {
  margin-left: auto;
}

.product-carousel .product-card__list-price {
  font-size: 0.875rem;
  color: #9a9a9a;
  text-decoration: line-through;
  white-space: nowrap;
}

.product-carousel .product-card__sale-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #c62828;
  white-space: nowrap;
}
