/* ============================================
   Supplier Products Page — Template 1
   카페24 미니멀 화이트 참고
   ============================================ */

.supplier-products-page {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px 80px;
  min-height: calc(100vh - 300px);
}

/* 배너 */
.supplier-products-banner {
  margin: 0 0 32px;
  overflow: hidden;
}

.supplier-products-banner img {
  width: 100%;
  display: block;
}

/* 검색바 */
.products-search {
  margin: 0 0 20px;
}

.products-search form {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.products-search input[type="text"] {
  flex: 1;
  max-width: 320px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  transition: border-color 0.15s;
  background: #fff;
}

.products-search input[type="text"]:focus {
  outline: none;
  border-color: #111;
}

.products-search button[type="submit"] {
  padding: 10px 20px;
  border: none;
  background: #111;
  color: #fff;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.products-search button[type="submit"]:hover {
  background: #000;
}

.products-search a {
  padding: 10px 16px;
  border: 1px solid #ddd;
  background: #fff;
  color: #999;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.products-search a:hover {
  border-color: #111;
  color: #111;
}

/* 카테고리 필터 — 언더라인 스타일 */
.supplier-cate-filter {
  margin: 10px 0 16px;
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  border-bottom: 1px solid #eee;
  -webkit-overflow-scrolling: touch;
}

.supplier-cate-filter::-webkit-scrollbar {
  display: none;
}

.supplier-subcate-filter {
  margin: -4px 0 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.supplier-cate-filter a {
  padding: 12px 18px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  color: #999;
  text-decoration: none;
  transition: color 0.15s;
  background: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.supplier-subcate-filter a {
  padding: 5px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #999;
  text-decoration: none;
  transition: all 0.15s;
  background: #fff;
  white-space: nowrap;
}

.supplier-cate-filter a:hover {
  color: #111;
}

.supplier-subcate-filter a:hover {
  border-color: #111;
  color: #111;
}

.supplier-cate-filter a.active {
  color: #111;
  font-weight: 700;
  border-bottom-color: #111;
  background: transparent;
}

.supplier-subcate-filter a.active {
  background: #111;
  border-color: #111;
  color: #fff;
  font-weight: 600;
}

/* 상품 그리드 */
.prdList {
  display: grid;
  gap: 30px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prdList.grid4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 상품 카드 — 카페24 스타일 */
.prdList__item {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
}

.prdList__item:hover {
  transform: none;
}

.prdList__item:hover .thumbnail {
  box-shadow: none;
}

/* 썸네일 — 사각, 연회색 배경 */
.thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
  background: #f5f5f5;
  border-radius: 0;
}

.thumbnail a {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.prdList__item:hover .thumbnail img {
  transform: scale(1.03);
}

/* 뱃지 */
.badge-wrap {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.nanum_box {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* 상태 뱃지 */
.badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 6px 16px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  z-index: 3;
}

.badge--hit {
  background: rgba(0,0,0,0.75);
}

.badge--partial {
  background: rgba(255,152,0,0.85);
}

/* 상품 정보 — 카페24 스타일 */
.description {
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.name a {
  text-decoration: none;
  color: #333;
  display: block;
}

.name a:hover {
  text-decoration: underline;
}

.name span {
  font-size: 13px;
  font-weight: 400;
  color: #333;
  display: block;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: keep-all;
  letter-spacing: -0.01em;
}

/* 가격 */
.spec {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.spec li {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.original-price {
  font-size: 12px;
  color: #ccc;
  font-weight: 400;
  text-decoration: line-through;
}

.discount-percent {
  font-weight: 800;
  font-size: 16px;
  color: #e8344e;
  letter-spacing: -0.3px;
}

.final-price {
  font-weight: 700;
  font-size: 16px;
  color: #111;
  letter-spacing: -0.3px;
}

.coupon-price-row {
  padding: 4px 8px;
  background: #f5f5f5;
  border-radius: 2px;
  margin-top: 4px;
  border: none;
}

.coupon-percent {
  font-weight: 700;
  font-size: 13px;
  color: #3b82f6;
}

.coupon-price {
  font-weight: 600;
  font-size: 13px;
  color: #3b82f6;
}

/* 빈 상태 */
.empty-products {
  padding: 100px 20px;
  text-align: center;
  color: #aaa;
  font-size: 14px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-products svg {
  margin-bottom: 12px;
  color: #ddd;
}

.empty-products p {
  margin: 0;
}

/* 페이징 — 카페24 스타일 */
.tbl_pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.tbl_pagination > * {
  list-style: none;
}

.tbl_pagination li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 4px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 400;
  transition: color 0.15s;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #999;
}

.tbl_pagination a {
  text-decoration: none;
}

.tbl_pagination a:hover li:not(.disabled):not(.active) {
  color: #111;
}

.tbl_pagination li.active {
  background: transparent;
  color: #111;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tbl_pagination li.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.tbl_pagination .arrow {
  position: relative;
  font-size: 0;
}

.tbl_pagination .arrow::before {
  font-family: sans-serif;
  font-size: 14px;
  line-height: 1;
}

.tbl_pagination .arrow-prev-2::before { content: "\00AB"; }
.tbl_pagination .arrow-prev::before { content: "\2039"; font-size: 16px; }
.tbl_pagination .arrow-next::before { content: "\203A"; font-size: 16px; }
.tbl_pagination .arrow-next-2::before { content: "\00BB"; }

/* 반응형 */
@media (max-width: 1200px) {
  .prdList.grid4 {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 16px;
  }
}

@media (max-width: 768px) {
  .supplier-products-page {
    padding: 0 16px 48px;
  }

  .supplier-products-banner {
    margin: 0 0 24px;
  }

  .products-search form {
    flex-wrap: wrap;
  }

  .products-search input[type="text"] {
    max-width: 100%;
    width: 100%;
  }

  .products-search button,
  .products-search a {
    flex: 1;
    padding: 10px 14px;
  }

  .supplier-cate-filter a {
    padding: 10px 14px;
    font-size: 13px;
  }

  .supplier-subcate-filter a {
    padding: 5px 10px;
    font-size: 11px;
  }

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

  .description {
    padding: 10px 0 0;
  }

  .name span {
    font-size: 12px;
  }

  .discount-percent,
  .final-price {
    font-size: 14px;
  }

  .original-price {
    font-size: 11px;
  }

  .tbl_pagination {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .supplier-products-page {
    padding: 0 12px 36px;
  }

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

  .description {
    padding: 8px 0 0;
  }

  .name span {
    font-size: 11px;
  }

  .coupon-price-row {
    padding: 4px 6px;
  }

  .coupon-percent,
  .coupon-price {
    font-size: 11px;
  }
}