@charset "utf-8";

/* ════════════════════════════════════════════════════════════════
   inc-nss (Native Scroll Slider) — 가로 스크롤 카드 컴포넌트
   ────────────────────────────────────────────────────────────────
   기본 구조:
     <section class="c-nss">
       <div class="c-nss-container">
         <div class="c-nss-head">                   (옵션)
           <h2 class="c-nss__title">제목</h2>
           <a class="c-nss__more" href="...">전체 ›</a>
         </div>
         <div class="c-nss-wrapper">
           <a class="c-nss__card c-gc" href="...">...</a>
           ...
         </div>
       </div>
     </section>

   네이밍 룰:
     c-nss-*   (하이픈)   : 레이아웃 인프라 (container, head, wrapper)
     c-nss__*  (이중밑줄) : BEM element/콘텐츠 (card, title, more)
     c-gc      (goods card): NSS 기본 상품 카드

   책임 분담:
     .c-nss          섹션 배경/상하 여백/구분선
     .c-nss-container 좌측 외곽 여백
     .c-nss-head     제목/더보기 행과 우측 여백
     .c-nss-wrapper  가로 스크롤/스냅/우측 여백
     .c-nss__card    스냅 카드 기본 골격
     .c-gc           상품카드 표시 양식

   modifier 패턴:
     .c-nss__card.dc_rates-card   수량별 할인 (pages/product.css)
     .c-nss__card.c-gc            기본 상품 카드
     .c-nss-wrapper--2dan         2단 가로 스크롤
     .c-gc--rank                  랭킹 카드
     .c-gc--wide                  와이드 카드
     .c-nss--promo                프로모션 배너 + 상품 섹션
═══════════════════════════════════════════════════════════════════ */

/* ===== Section ===== */
.c-nss {
  background: #fff;
  padding: 20px 0 36px;
  margin-bottom: 8px;
}

/* ===== Container (좌측 외곽 여백) ===== */
.c-nss-container {
  padding: 0 var(--space-3);
}

/* ===== Header (제목 + 더보기) — 옵션 ===== */
.c-nss-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-left: 2px;
}
.c-nss__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: #111;
  letter-spacing: -0.3px;
}
.c-nss__more {
  font-size: 13px;
  color: var(--sub);
  text-decoration: none;
  flex-shrink: 0;
}

/* ===== Wrapper (가로 스크롤 + 우측 UX 여백) ===== */
.c-nss-wrapper {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  padding: 0 var(--space-3);
  scroll-padding-left: var(--space-3);
  margin: 0 calc(-1 * var(--space-3));
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.c-nss-wrapper::-webkit-scrollbar { display: none; }

/* 2단 가로 스크롤: 세로 2줄을 만들고 column 방향으로 흘림 */
.c-nss-wrapper--2dan {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: 125px;
  column-gap: 10px;
  row-gap: 12px;
  scroll-snap-type: x proximity;
}
.c-nss-wrapper--2dan .c-nss__card {
  width: 125px;
}

/* ===== Card (기본 골격) ===== */
.c-nss__card {
  flex: 0 0 clamp(120px, 23vw, 180px);
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  text-align: center;
  box-sizing: border-box;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.c-nss__card:active {
  transform: scale(0.95);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  background-color: #fdfdfd;
}

/* PC 호버 — 색상 톤은 modifier 가 책임 */
@media (min-width: 1024px) {
  .c-nss__card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent);
  }
}

/* ════════════════════════════════════════════════════════════════
   c-gc ─── 기본 상품 카드 (goods card)
   ────────────────────────────────────────────────────────────────
   용도: 관련상품 / 추천상품 / 신상품 / 베스트셀러 / 최근 본 상품 등
   조합: <a class="c-nss__card c-gc" href="/product/?pCode=...">
═══════════════════════════════════════════════════════════════════ */

.c-nss__card.c-gc {
  flex: 0 0 125px;
  text-align: left;
  padding: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

/* --- 이미지 영역 --- */
.c-gc__img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f7f7f7;
  overflow: hidden;
  border-bottom: 1px solid #eee;
}
.c-gc__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 품절 배지 (좌상단) */
.c-gc__soldout {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.2px;
  padding: 3px 7px;
  border-radius: 3px;
  line-height: 1;
  z-index: 2;
}
.c-gc.is-soldout .c-gc__img img {
  filter: grayscale(0.6) opacity(0.85);
}

/* 랭킹 배지 */
.c-gc__rank {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.c-gc--rank .c-gc__soldout {
  top: 34px;
}

/* --- 본문 영역 --- */
.c-gc__body {
  padding: 9px 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.c-gc__brand {
  font-size: 11px;
  color: var(--sub);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c-gc__name {
  font-size: 13px;
  line-height: 1.25;
  color: #222;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  letter-spacing: -0.2px;
}

/* --- 가격 영역 --- */
.c-gc__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 1px;
}
.c-gc__rate {
  color: var(--accent-price);
  font-weight: 800;
  font-size: 14px;
}
.c-gc__sale {
  color: #111;
  font-weight: 700;
  font-size: 14px;
}
.c-gc__sale small {
  font-weight: 500;
  font-size: 11px;
  margin-left: 1px;
}
.c-gc__was {
  color: #999;
  font-size: 11px;
  text-decoration: line-through;
}
.c-gc__point {
  font-size: 11px;
  color: var(--sub);
}

/* ===== Wide card: 이미지 좌측 + 텍스트 우측 ===== */
.c-nss__card.c-gc--wide {
  flex-basis: 260px;
  min-height: 124px;
  flex-direction: row;
}
.c-gc--wide .c-gc__img {
  width: 112px;
  flex: 0 0 112px;
  aspect-ratio: auto;
  min-height: 100%;
  border-bottom: 0;
  border-right: 1px solid #eee;
}
.c-gc--wide .c-gc__body {
  flex: 1 1 auto;
  padding: 12px 12px 11px;
}
.c-gc--wide .c-gc__name {
  -webkit-line-clamp: 3;
  min-height: auto;
}

/* ===== Promo card: 섹션 앞쪽에 붙는 기획전/큐레이션 카드 ===== */
.c-nss__promo-card {
  flex: 0 0 145px;
  min-height: 232px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 14px;
  border-radius: 12px;
  box-sizing: border-box;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #343a40, #111);
  overflow: hidden;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.c-nss__promo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(255,255,255,0.28), transparent 34%);
  pointer-events: none;
}
.c-nss__promo-kicker,
.c-nss__promo-title,
.c-nss__promo-text {
  position: relative;
  z-index: 1;
}
.c-nss__promo-kicker {
  font-size: 11px;
  font-weight: 700;
  opacity: .78;
}
.c-nss__promo-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.4px;
}
.c-nss__promo-text {
  font-size: 12px;
  line-height: 1.4;
  opacity: .88;
}

/* ════════════════════════════════════════════════════════════════
   Tabbed NSS — 탭형 상품 섹션
   ────────────────────────────────────────────────────────────────
   nss_render_tabbed_section() 전용 스타일입니다.
   상품 패널은 기존 .c-nss-wrapper / .c-nss__card 구조를 그대로 사용하므로
   좌우 여백, 스크롤바 숨김, lazy 이미지 정책이 기존 NSS와 동일하게 동작합니다.
═══════════════════════════════════════════════════════════════════ */
.c-nss--tabs .c-nss-head {
  margin-bottom: 10px;
}
.c-nss-tabs__nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 calc(-1 * var(--space-3)) 14px;
  scroll-padding-left: var(--space-3);
  padding: 0 var(--space-3) 2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.c-nss-tabs__nav::-webkit-scrollbar {
  display: none;
}
.c-nss-tabs__btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #e7e7e7;
  border-radius: 999px;
  background: #fff;
  color: #555;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.25px;
  cursor: pointer;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}
.c-nss-tabs__btn.is-active,
.c-nss-tabs__btn[aria-selected="true"] {
  border-color: var(--accent);
  background: #fff7f4;
  color: var(--accent);
}
.c-nss-tabs__panel[hidden] {
  display: none !important;
}
.c-nss-tabs__panel-more {
  display: flex;
  justify-content: flex-end;
  margin: -2px 2px 8px;
}
.c-nss-tabs__panel-more a {
  font-size: 12px;
  color: var(--sub);
  text-decoration: none;
}
