/* ═══════════════════════════════════════════════════
   옷결 OTT_GYEOL — Collection Page Styles
   ═══════════════════════════════════════════════════ */

/* ─── COLLECTION HERO BANNER ─── */
.collection-hero {
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.collection-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      var(--charcoal) 0%,
      var(--dark) 40%,
      #3d3028 70%,
      var(--charcoal) 100%
    );
}

.collection-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(184, 150, 90, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(184, 150, 90, 0.08) 0%, transparent 40%);
}

/* Subtle decorative pattern */
.collection-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,0.1) 40px,
      rgba(255,255,255,0.1) 41px
    );
}

.collection-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: fadeUp 0.8s ease-out both;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--taupe);
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--gold-light);
}

.breadcrumb-sep {
  color: var(--brown);
  margin: 0 8px;
}

.breadcrumb-current {
  color: var(--gold-light);
}

.collection-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  line-height: 1.1;
}

.collection-hero-subtitle {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--taupe);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.collection-hero-count {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  padding: 6px 20px;
  border: 1px solid rgba(184, 150, 90, 0.25);
  border-radius: 20px;
}

/* ─── FILTER & SORT TOOLBAR ─── */
.collection-toolbar {
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  background: rgba(250, 246, 240, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(200, 185, 165, 0.2);
  border-top: 1px solid rgba(200, 185, 165, 0.1);
}

.collection-toolbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-tab {
  padding: 8px 20px;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--taupe);
  border-radius: 24px;
  transition: all 0.35s ease;
  position: relative;
  font-family: var(--font-sans);
}

.filter-tab:hover {
  color: var(--charcoal);
  background: rgba(200, 185, 165, 0.15);
}

.filter-tab.active {
  color: var(--white);
  background: var(--charcoal);
}

/* Sort Select */
.sort-dropdown {
  position: relative;
}

.sort-dropdown select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--beige);
  padding: 8px 36px 8px 16px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--brown);
  letter-spacing: 0.04em;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239e8e7e' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.sort-dropdown select:focus {
  border-color: var(--gold);
}

.sort-dropdown select:hover {
  border-color: var(--gold-muted);
}

/* ─── COLLECTION MAIN ─── */
.collection-main {
  padding: 48px 40px 100px;
  background: var(--cream);
  min-height: 60vh;
}

/* ─── PRODUCT GRID ─── */
.collection-grid {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
}

/* ─── PRODUCT CARD ─── */
.col-product-card {
  opacity: 0;
  transform: translateY(20px);
  animation: colFadeIn 0.5s ease forwards;
}

.col-product-card:nth-child(1) { animation-delay: 0.05s; }
.col-product-card:nth-child(2) { animation-delay: 0.1s; }
.col-product-card:nth-child(3) { animation-delay: 0.15s; }
.col-product-card:nth-child(4) { animation-delay: 0.2s; }
.col-product-card:nth-child(5) { animation-delay: 0.25s; }
.col-product-card:nth-child(6) { animation-delay: 0.3s; }
.col-product-card:nth-child(7) { animation-delay: 0.35s; }
.col-product-card:nth-child(8) { animation-delay: 0.4s; }
.col-product-card:nth-child(9) { animation-delay: 0.45s; }
.col-product-card:nth-child(10) { animation-delay: 0.5s; }

@keyframes colFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hide filtered-out cards */
.col-product-card.hidden {
  display: none;
}

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

.col-product-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--beige);
  border-radius: 6px;
  margin-bottom: 16px;
}

.col-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.col-product-card:hover .col-product-image {
  transform: scale(1.06);
}

/* Product actions overlay */
.col-product-actions {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.35s ease;
}

.col-product-card:hover .col-product-actions {
  opacity: 1;
  transform: translateX(0);
}

.col-action-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(26, 23, 20, 0.08);
  border: none;
  cursor: pointer;
}

.col-action-btn:hover {
  background: var(--gold);
  color: var(--white);
  transform: scale(1.1);
}

.col-action-btn.wishlisted {
  background: var(--gold);
  color: var(--white);
}

/* Product badge */
.col-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 14px;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  background: var(--charcoal);
  color: var(--cream);
  border-radius: 2px;
}

.col-badge.best {
  background: var(--gold);
  color: var(--white);
}

/* Product info */
.col-product-info {
  padding: 0 4px;
}

.col-product-category {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--taupe);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.col-product-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.col-product-card:hover .col-product-name {
  color: var(--gold-dark);
}

.col-product-price {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--brown);
  letter-spacing: 0.02em;
}

/* ─── EMPTY STATE ─── */
.collection-empty {
  text-align: center;
  padding: 80px 20px;
  max-width: 400px;
  margin: 0 auto;
}

.empty-icon {
  color: var(--beige-dark);
  margin-bottom: 20px;
}

.empty-text {
  font-size: 0.9rem;
  color: var(--taupe);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .collection-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 20px;
  }

  .collection-hero {
    height: 240px;
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .collection-hero {
    height: 220px;
  }

  .collection-hero-title {
    font-size: 2rem;
  }

  .collection-toolbar-inner {
    padding: 0 16px;
    flex-direction: column;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding-bottom: 2px;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    padding: 6px 16px;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .sort-dropdown {
    width: 100%;
  }

  .sort-dropdown select {
    width: 100%;
  }

  .collection-main {
    padding: 28px 16px 72px;
  }

  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 12px;
  }

  .col-product-actions {
    opacity: 1;
    transform: translateX(0);
  }

  .col-action-btn {
    width: 32px;
    height: 32px;
  }

  .col-product-name {
    font-size: 0.88rem;
  }

  .col-product-price {
    font-size: 0.82rem;
  }

  .col-product-image-wrapper {
    border-radius: 4px;
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE
   ═══════════════════════════════════════════ */
@media (max-width: 420px) {
  .collection-hero {
    height: 190px;
  }

  .collection-hero-title {
    font-size: 1.6rem;
  }

  .collection-hero-subtitle {
    font-size: 0.75rem;
  }

  .filter-tab {
    padding: 5px 12px;
    font-size: 0.68rem;
  }

  .collection-grid {
    gap: 16px 10px;
  }

  .col-product-name {
    font-size: 0.82rem;
  }
}
