/* ============================================
   MAIN COLLECTION - CAROUSEL LAYOUT
   Multiple collections, each as a carousel row
   ============================================ */

.main-collection {
  position: relative;
  z-index: var(--z-10);
}

/* ============================================
   COLLECTION ROW (Each collection)
   ============================================ */

.collection-row {
  margin-bottom: var(--space-3xl);
}

.collection-row:last-child {
  margin-bottom: 0;
}

/* Container */
.collection-container {
  padding-left: var(--space-xl);
  padding-right: 0;
}

@media (max-width: 990px) {
  .collection-container {
    padding-left: var(--space-md);
    padding-right: 0;
  }
}

/* ============================================
   SPLIT LAYOUT (Info Card + Carousel)
   ============================================ */

.collection-split {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

@media (min-width: 991px) {
  .collection-split {
    flex-direction: row;
    gap: var(--space-2xl);
    align-items: stretch;
  }
}

/* ============================================
   LEFT INFO CARD
   ============================================ */

.collection-info-card {
  flex-shrink: 0;
  width: 100%;
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.collection-info-card:hover {
  transform: scale(1.02);
}

@media (min-width: 991px) {
  .collection-info-card {
    width: 400px;
    height: 500px;
    min-height: 500px;
    padding: var(--space-xl) var(--space-2xl);
  }
}

/* Background Image & Overlay */
.info-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

.info-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.info-card-solid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.info-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

/* Header (Title at Top) */
.info-header {
  display: flex;
  flex-direction: column;
}

/* Footer (Description + Link at Bottom) */
.info-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.collection-title {
  margin: 0;
  line-height: 1.2;
}

.collection-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  display: inline-block;
  width: fit-content;
  margin-top: var(--space-sm);
}

/* Description */
.collection-description {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.description-separator {
  width: 48px;
  height: 1px;
  background-color: currentColor;
  opacity: 0.3;
}

.description-text {
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   RIGHT CAROUSEL
   ============================================ */

.carousel-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.carousel-container {
  position: relative;
}

.carousel-track-container {
  overflow: visible;
}

.carousel-track {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px;
  cursor: grab;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track:active {
  cursor: grabbing;
}

/* Product Card */
.product-card {
  flex-shrink: 0;
  width: 280px;
}

@media (min-width: 768px) {
  .product-card {
    width: 400px;
  }
}

@media (max-width: 767px) {
  .product-card {
    width: 280px;
  }
}

.product-link {
  display: block;
  text-decoration: none;
}

/* Product Image */
.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background-color: #f8fafc;
  margin-bottom: var(--space-md);
}

@media (max-width: 767px) {
  .product-image-wrapper {
    height: 280px;
  }
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.product-image--default {
  opacity: 1;
}

.product-image--hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

/* Fade only when the card actually has a hover image (a broken second image
   strips .has-hover-image at runtime) — never fade to blank. */
.product-link.has-hover-image:hover .product-image--hover {
  opacity: 1;
}

.product-link.has-hover-image:hover .product-image--default {
  opacity: 0;
}

/* Product Info */
.product-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-title {
  margin: 0;
  line-height: 1.4;
}

.product-price {
  margin: 0;
  line-height: 1.4;
}

/* ============================================
   NAVIGATION ARROWS
   ============================================ */

.carousel-nav {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  margin-top: var(--space-lg);
}

@media (max-width: 767px) {
  .carousel-nav {
    display: none;
  }
}

.nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #0f172a;
}

.nav-btn:hover {
  background-color: #0f172a;
  border-color: #0f172a;
  color: #fff;
  transform: scale(1.05);
}

.nav-btn svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 990px) {
  .collection-row {
    margin-bottom: var(--space-2xl);
  }
  
  .collection-info-card {
    min-height: 280px;
  }
  
  .carousel-track {
    -webkit-overflow-scrolling: touch;
  }
}
