/* ========================================
   Product Listing Page — Light theme
   Matches index.html color palette
   ======================================== */

.product-page {
  background-color: var(--background, #faf6f0);
  min-height: 100vh;
  padding-top: var(--nav-height, 80px);
  color: var(--on-surface, #2e3230);
}

/* --- Product Banner --- */
.product-banner {
  width: 100%;
  height: 380px; /* Increased from 280px to make banner taller */
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-banner__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15); /* Light overlay to keep the leather bright but text legible */
  z-index: 1;
}

.product-banner__title {
  position: relative;
  z-index: 2;
  font-size: 2.75rem;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* --- Page Header --- */
.product-header {
  max-width: var(--max-width, 1536px);
  margin: 0 auto;
  padding: 48px var(--px, 32px) 0;
}

.product-header__title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 32px;
  color: var(--on-surface, #2e3230);
}

/* --- Category Tabs --- */
.product-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--outline-variant, #c4c8bc);
  padding-bottom: 0;
}

.product-tabs__item {
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary, #6b6358);
  padding: 12px 16px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.product-tabs__item:hover {
  color: var(--primary, #18709c);
}

.product-tabs__item--active {
  color: var(--primary, #18709c);
  font-weight: 700;
}

.product-tabs__item--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--primary, #18709c);
}

.product-tabs__item--all {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-tabs__icon {
  font-size: 18px;
}

/* --- Sub-category Filter Pills --- */
.product-filters {
  max-width: var(--max-width, 1536px);
  margin: 0 auto;
  padding: 24px var(--px, 32px) 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.product-filters__pill {
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary, #6b6358);
  padding: 8px 20px;
  border: 1px solid var(--outline-variant, #c4c8bc);
  border-radius: 9999px;
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.product-filters__pill:hover {
  border-color: var(--primary, #18709c);
  color: var(--primary, #18709c);
}

.product-filters__pill--active {
  background: var(--primary, #18709c);
  color: var(--on-primary, #ffffff);
  border-color: var(--primary, #18709c);
  font-weight: 600;
}

.product-filters__pill--active:hover {
  background: var(--primary-hover, #fc8505);
  border-color: var(--primary-hover, #fc8505);
  color: var(--on-primary, #ffffff);
}

/* --- Count --- */
.product-count {
  max-width: var(--max-width, 1536px);
  margin: 0 auto;
  padding: 28px var(--px, 32px) 0;
  font-size: 14px;
  color: var(--secondary, #6b6358);
}

.product-count__number {
  color: var(--primary, #18709c);
  font-weight: 700;
}

/* --- Product Grid --- */
.product-grid {
  max-width: var(--max-width, 1536px);
  margin: 0 auto;
  padding: 24px var(--px, 32px) 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --- Product Card --- */
.product-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-container-low, #f5f1ea);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(46, 50, 48, 0.12);
}

.product-card__image-wrapper {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .product-card__img {
  transform: scale(1.05);
}

/* Series name overlay on image */
.product-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 28px 24px;
  z-index: 2;
}

.product-card__series-name {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.product-card__series-sub {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

/* Bottom info area */
.product-card__info {
  padding: 16px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.product-card__tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--secondary, #6b6358);
  padding: 4px 10px;
  border: 1px solid var(--outline-variant, #c4c8bc);
  border-radius: 9999px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.product-card:hover .product-card__tag {
  border-color: var(--primary, #18709c);
  color: var(--primary, #18709c);
}

.product-card__more {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--outline-variant, #c4c8bc);
  background: none;
  color: var(--secondary, #6b6358);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
  transition: all 0.2s ease;
}

.product-card__more:hover {
  background: var(--surface-container, #f0ece4);
  border-color: var(--primary, #18709c);
  color: var(--primary, #18709c);
}


/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .product-header__title {
    font-size: 1.5rem;
  }

  .product-tabs {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

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

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .product-card__series-name {
    font-size: 1.4rem;
  }

  .product-card__tags {
    display: none;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Pagination (각진 사각형 · 모던 미니멀) --- */
.detail-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 64px 0 8px;
}
.detail-pagination:empty { display: none; }
.pg-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--outline-variant, #e0dace);
  background: transparent;
  color: #4a4e4a;
  border-radius: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pg-btn:hover:not(:disabled):not(.pg-btn--active) { border-color: #1a1a1a; color: #1a1a1a; }
.pg-btn--active { background: #1a1a1a; border-color: #1a1a1a; color: #fff; font-weight: 600; cursor: default; }
.pg-btn:disabled { opacity: 0.28; cursor: default; }
.pg-btn--nav { min-width: 44px; padding: 0; }
.pg-btn--nav .material-symbols-outlined { font-size: 18px; }
.pg-ellipsis { min-width: 20px; text-align: center; color: #b0a99b; font-weight: 500; letter-spacing: 0.04em; user-select: none; }

/* ================================================================
   대분류 탭(전체 보기~소파) 잘림 대응 (2026-07-22)
   탭 9개 총폭(~800px+)이 화면보다 넓어지는 구간부터 가로 스크롤 허용.
   기존엔 768px 이하에서만 스크롤이 켜져서 769~1100px 구간에서
   의자·소파 탭이 잘린 채 접근 불가였음. (768px 이하 기존 규칙과 동일 방식)
   ================================================================ */
@media (max-width: 1100px) {
  .product-tabs {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .product-tabs::-webkit-scrollbar {
    display: none;
  }
}
