/* Smort Product Slider Styles - Uppdaterad enligt referensbild */

.smort-product-slider {
  position: relative;
  width: 100%;
  background: #f5f5f5;
  background: linear-gradient(
    180deg,
    rgba(245, 245, 245, 1) 50%,
    rgba(255, 255, 255, 1) 50%
  );
  overflow: visible;
}

.single-product .smort-product-slider {
  background: transparent;
}

.smort-product-slider-top {
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
}

.smort-product-slider-subtitle-container {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);

  .smort-product-slider-subtitle {
    margin: 0;
    font-size: var(--text-base);
  }
}

/* Category Filter */
.smort-product-slider-category-filter {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.smort-product-slider-category-btn {
  padding: var(--space-2) var(--space-4);
  background: transparent;
  border: none;
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.smort-product-slider-category-btn.active {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.smort-product-slider-category-btn:hover {
  color: var(--primary);
}

.smort-product-slider-view-all {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: all 0.3s ease;
}

.smort-product-slider-view-all:hover {
  color: var(--primary);
}

.smort-product-slider-view-all svg {
  width: 16px;
  height: 16px;
}

/* Grid Layout - Använder Tailwind classes i HTML */

.smort-product-slider-grid-mobile {
  width: 100%;
}

@media (width <= 767px) {
  .smort-product-slider-grid-mobile.swiper {
    overflow: hidden;
  }

  .smort-product-slider-grid-mobile .swiper-slide {
    height: auto;
  }
}

/* Slider container */
.smort-product-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-bottom: var(--space-4);
}

.smort-product-slider-container.swiper {
  overflow: hidden; /* Changed from visible to hidden to prevent overflow */
}

.smort-product-slider-container .swiper-wrapper {
  display: flex;
  transition: transform 0.3s ease;
}
.smort-product-slider .swiper-slide {
  height: -webkit-fill-available;
}
/* Navigation arrows */
.smort-product-slider-nav {
  position: relative;
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  padding: var(--space-4) 0;
}

/* Swiper slide wrapper */
.smort-product-slider-container .swiper-slide {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  scroll-snap-align: start;
  min-width: 0;
}

/* Product items inside slider use product-item component styling */
.smort-product-slider-container .swiper-slide .product-item {
  flex: 1;
  width: 100%;
}

/* Progress bar */
.smort-product-slider-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.smort-product-slider-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  transition: width 0.3s ease;
}

/* Responsive Styles */
@media (width <= 768px) {
  .smort-product-slider-category-filter {
    gap: var(--space-2);
  }

  .smort-product-slider-category-btn {
    font-size: var(--text-md);
    padding: var(--space-1) var(--space-2);
  }

  .smort-product-slider-view-all {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: var(--space-5);
  }
}
