/* ============================================
   카테고리 목록 페이지 스타일
   (메인 페이지 스타일은 main_shop.css 로 이동)
   ============================================ */

/* 영카트 기본 서브카테고리/정렬 숨김 (커스텀 스킨이 자체 사이드바 제공) */
#sct_ct_1 { display: none !important; }

.category-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 16px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
}

.category-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 14px;
  border-bottom: 2px solid #1a1a1a;
  margin-bottom: 8px;
}

.sub-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sub-category-list li a {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.2s;
}

.sub-category-list li a:hover,
.sub-category-list li.active a {
  color: #1a1a1a;
  font-weight: 600;
}

.sub-category-list .count {
  font-size: 12px;
  color: #bbb;
}

.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.total-count {
  font-size: 14px;
  color: #666;
}

.sort-select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  color: #333;
  background: #fff;
}

/* ============================================
   상품 그리드
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-grid--list {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   상품 카드
   ============================================ */
.product-card {
  position: relative;
}

.product-card__image {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}

.badge-soldout {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.product-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}

.product-card:hover .product-actions {
  opacity: 1;
}

.product-actions button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.2s, color 0.2s;
}

.product-actions button:hover {
  background: #fff;
  color: #e74c3c;
}

.product-card__info {
  padding: 12px 2px 0;
}

.product-category {
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
  display: block;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-name a {
  color: #1a1a1a;
  text-decoration: none;
}

.product-desc {
  font-size: 12px;
  color: #aaa;
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.price-original {
  font-size: 12px;
  color: #ccc;
  text-decoration: line-through;
}

.price-rate {
  font-size: 15px;
  font-weight: 700;
  color: #e74c3c;
}

.price-current {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.price-member {
  font-size: 14px;
  font-weight: 600;
  color: #e74c3c;
}

/* ============================================
   페이지네이션
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 40px;
  padding: 20px 0;
}

.pagination a,
.pagination strong {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  text-decoration: none;
  color: #666;
  transition: background 0.2s;
}

.pagination a:hover {
  background: #f5f5f5;
}

.pagination strong {
  background: #1a1a1a;
  color: #fff;
}

/* ============================================
   반응형 - 카테고리 페이지
   ============================================ */

/* 소형 데스크탑 */
@media (max-width: 1024px) {
  .category-page {
    grid-template-columns: 180px 1fr;
    gap: 20px;
  }
  .product-grid,
  .product-grid--list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 태블릿 */
@media (max-width: 768px) {
  .category-page {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .category-sidebar {
    position: static;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
  }

  .sidebar-title {
    display: none;
  }

  .sub-category-list {
    display: flex;
    gap: 8px;
    white-space: nowrap;
    padding-bottom: 4px;
  }

  .sub-category-list li a {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    border-bottom: none;
  }

  .sub-category-list li.active a {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
  }

  .product-grid,
  .product-grid--list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-actions {
    opacity: 1;
  }
}

/* 모바일 */
@media (max-width: 480px) {
  .list-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .product-grid {
    gap: 10px;
  }

  .product-name {
    font-size: 13px;
  }

  .price-current {
    font-size: 14px;
  }
}
