/* ============================================================
   products.css — 상품 목록 페이지 전용
   ============================================================ */

body {
  background: var(--white);
}

/* ── 등급 뱃지 ─────────────────────────────────────────────── */
.grade-badge {
  font-size: 12px;
  background: var(--accent-light);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 2px;
  font-weight: 600;
  margin-left: 10px;
}

/* ── 카테고리 필터 탭 ──────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 20px;
  font-family: var(--font);
  color: var(--gray-600);
  transition: all 0.18s;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--primary);
  background: var(--accent-light);
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

.filter-icon {
  font-size: 15px;
  line-height: 1;
}

/* ── 상품 그리드 ───────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.product-card {
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.product-card:hover {
  border-color: var(--border);
}

/* ── 상품 이미지 ───────────────────────────────────────────── */
.product-img {
  background: var(--gray-100);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
  position: relative;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-img-placeholder {
  font-size: 48px;
  color: var(--gray-200);
}

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
}

.product-badge.new {
  background: var(--accent);
}

/* ── 상품 정보 ─────────────────────────────────────────────── */
.product-name {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}

.product-code {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 6px;
  font-family: monospace;
}

.product-price {
  font-size: 20px;
  font-weight: 800;
}

/* ── 품절 표시 (이미지 흐림 + 중앙 빨간 '품절') ── */
.is-soldout img { filter: blur(2px) grayscale(50%); opacity: .5; }
.soldout-overlay {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.25);
}
.soldout-overlay span {
  color: #e53935; font-size: 26px; font-weight: 900; letter-spacing: 8px;
  border: 3px solid #e53935; border-radius: 8px; padding: 4px 14px 4px 22px;
  background: rgba(255,255,255,.9); transform: rotate(-8deg);
}

.product-price span {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 400;
  margin-left: 4px;
}

.product-moq {
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
}

.product-order-btn {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  padding: 9px;
  font-size: 12px;
  cursor: pointer;
  margin-top: 8px;
  font-family: var(--font);
  transition: all 0.2s;
}

.product-order-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── 주문 모달 (상품 전용 크기) ───────────────────────────── */
.modal {
  width: 680px;
}

/* ── 사이즈 섹션 ───────────────────────────────────────────── */
.size-section {
  margin-bottom: 20px;
}

.size-section h4 {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ── 주문 요약 ─────────────────────────────────────────────── */
.order-summary {
  background: var(--gray-100);
  padding: 14px 16px;
  margin-top: 4px;
  font-size: 13px;
  border-radius: 2px;
}

.order-summary .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  color: var(--gray-600);
}

.order-summary .total {
  font-weight: 700;
  font-size: 15px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--primary);
}
