/* ===== MATCHING MODULE – "Setini Tamamla" ===== */
/* Replaces the old complete-look section with a more prominent cross-sell carousel */

.matching-module {
  margin-top: 2rem;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(145deg, var(--bg-cream, #FAF8F5), #fff);
  border-radius: var(--radius-xl, 0.75rem);
  border: 1px solid var(--accent-gold, #EFE8D8);
}

/* Header with title + subtitle */
.matching-header {
  margin-bottom: 1.25rem;
}

.matching-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.matching-header-title h3 {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 1.25rem;
  color: var(--text-darker, #342d26);
  font-weight: 600;
}

.matching-header-title svg {
  color: var(--rose-900, #881337);
}

.matching-subtitle {
  font-size: 0.8125rem;
  color: rgba(74, 64, 54, 0.6);
  font-weight: 300;
}

/* Horizontal scroll carousel */
.matching-carousel {
  display: flex;
  overflow-x: auto;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.matching-carousel::-webkit-scrollbar {
  display: none;
}

/* Individual matching card */
.matching-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  background: #fff;
  border-radius: var(--radius-xl, 0.75rem);
  border: 1px solid var(--accent-gold, #EFE8D8);
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.matching-card:hover {
  border-color: var(--rose-900, #881337);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.matching-card-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--accent-rose, #F4EBE8);
  position: relative;
}

.matching-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.matching-card:hover .matching-card-image img {
  transform: scale(1.05);
}

/* Matching badge on card image */
.matching-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.9);
  color: var(--rose-900, #881337);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.matching-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.matching-card-body h4 {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-darker, #342d26);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.matching-card-body .matching-card-cat {
  font-size: 0.6875rem;
  color: rgba(74, 64, 54, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.matching-card-body .matching-card-price {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-darker, #342d26);
  margin-top: auto;
}

/* Helper text at bottom */
.matching-helper {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(74, 64, 54, 0.45);
  font-style: italic;
}

/* --- Micro-copy prompt --- */
.matching-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(244, 235, 232, 0.5), rgba(239, 232, 216, 0.5));
  border-radius: var(--radius-full, 9999px);
  font-size: 0.8125rem;
  color: rgba(74, 64, 54, 0.7);
  font-weight: 400;
  text-align: center;
}

.matching-prompt .prompt-emoji {
  font-size: 1rem;
}

/* === Mobile optimizations === */
@media (max-width: 767px) {
  .matching-module {
    padding: 1.25rem 1rem;
    margin-top: 1.5rem;
  }

  .matching-header-title h3 {
    font-size: 1.125rem;
  }

  .matching-card {
    flex: 0 0 160px;
  }

  .matching-card-body {
    padding: 0.625rem;
  }

  .matching-card-body h4 {
    font-size: 0.75rem;
  }

  .matching-card-body .matching-card-price {
    font-size: 0.8125rem;
  }
}

/* Desktop: allow 3 cards visible */
@media (min-width: 768px) {
  .matching-card {
    flex: 0 0 200px;
  }

  .matching-module {
    padding: 2rem;
  }
}

/* ===== COMPACT VARIANT (near CTA) ===== */
.matching-module--compact {
  margin-top: 0.75rem;
  padding: 1rem 1rem;
  border-radius: var(--radius-xl, 0.75rem);
}

.matching-module--compact .matching-header {
  margin-bottom: 0.75rem;
}

.matching-module--compact .matching-header-title h3 {
  font-size: 1rem;
}

.matching-module--compact .matching-subtitle {
  font-size: 0.75rem;
}

.matching-module--compact .matching-carousel {
  gap: 0.5rem;
}

.matching-module--compact .matching-card {
  flex: 0 0 150px;
}

.matching-module--compact .matching-card-image {
  aspect-ratio: 1;
}

.matching-module--compact .matching-card-body {
  padding: 0.5rem;
}

.matching-module--compact .matching-card-body h4 {
  font-size: 0.75rem;
}

.matching-module--compact .matching-card-body .matching-card-price {
  font-size: 0.8125rem;
}

.matching-module--compact .matching-helper {
  display: none; /* Hide helper text in compact mode */
}

/* Mobile compact adjustments */
@media (max-width: 767px) {
  .matching-module--compact {
    padding: 0.75rem;
    margin-top: 0.5rem;
  }

  .matching-module--compact .matching-card {
    flex: 0 0 130px;
  }

  .matching-module--compact .matching-header-title h3 {
    font-size: 0.9375rem;
  }

  .matching-module--compact .matching-card-body h4 {
    font-size: 0.6875rem;
  }

  .matching-module--compact .matching-card-body .matching-card-price {
    font-size: 0.75rem;
  }
}

/* ===== CATEGORY CARD MATCHING BADGE ===== */
/* Used on category grid product cards */
.product-card .card-matching-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.92);
  color: var(--rose-900, #881337);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3;
  pointer-events: none;
}
