:root {
  --product-card-bg: #ffffff;
  --product-card-border: #e6e8ec;
  --product-card-radius: 10px;
  --product-card-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  --variant-border: #dfe3e8;
}

.product-section {
  margin-bottom: 50px;
}

.subcategory-group {
  margin-bottom: 40px;
}

.subcategory-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #151b29;
}

.product-group-card {
  background: var(--product-card-bg);
  border: 1px solid var(--product-card-border);
  border-radius: var(--product-card-radius);
  padding: 15px;
  text-align: center;
  transition: all 0.25s ease;
}

.product-group-card:hover {
  box-shadow: var(--product-card-shadow);
  transform: translateY(-3px);
}

.product-group-card img,
.collection-carousel img {
  min-width: 170px;
  height: 140px;
  object-fit: contain;
  display: block;
}

.product-group-card h6 {
  height: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.product-group-card p {
  margin-bottom: 10px;
}

.collection-carousel,
.product-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #f9fbfe;
  margin-bottom: 14px;
  min-height: 160px;
}

.product-carousel-track,
.collection-carousel-track {
  display: flex;
  width: calc(var(--image-count) * 100%);
  transition: transform 0.4s ease;
}

.product-card:hover .product-carousel-track,
.product-group-card:hover .collection-carousel-track {
  animation: carousel-slide var(--carousel-duration, 7s) linear infinite alternate;
}

.product-carousel img {
  width: 100%;
  flex: 0 0 100%;
  height: 160px;
  object-fit: contain;
  display: block;
}

@keyframes carousel-slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% * (var(--image-count) - 1) / var(--image-count)));
  }
}

.variant-panel {
  margin-top: 12px;
  border-top: 1px solid var(--variant-border);
  padding-top: 12px;
  display: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.25s ease;
}

.variant-panel.visible {
  display: block;
  opacity: 1;
  max-height: 1000px;
}

.variant-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #4d5563;
  margin-bottom: 8px;
}

.variant-label {
  font-weight: 700;
  color: #111827;
}

.toggle-variants-btn {
  margin-top: 6px;
}

@media (max-width: 768px) {
  .product-carousel {
    min-height: 140px;
  }
  .product-carousel img {
    height: 140px;
  }
}

@keyframes carousel-slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% * (var(--image-count) - 1)));
  }
}

.variant-panel {
  margin-top: 12px;
  border-top: 1px solid var(--variant-border);
  padding-top: 12px;
  display: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.25s ease;
}

.variant-panel.visible {
  display: block;
  opacity: 1;
  max-height: 1000px;
}

.variant-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #4d5563;
  margin-bottom: 8px;
}

.variant-label {
  font-weight: 700;
  color: #111827;
}

.toggle-variants-btn {
  margin-top: 6px;
}

@media (max-width: 768px) {
  .product-carousel {
    min-height: 140px;
  }
  .product-carousel img {
    height: 140px;
  }
}
