@charset "utf-8";

/* 하단 고정 내비게이션에 가리지 않도록, PLP에서만 아래 여백을 조금 더 확보 */
.l-main{
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 18px);
}

/* 1단 헤더 타이틀 드롭다운 */
.c-hdr-toggle{
  background: transparent;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.c-hdr-toggle__txt{ font-size: 18px; letter-spacing: -0.2px; color: #555; }
.c-hdr-toggle__ico{ font-size: 22px; line-height: 1; }

.c-hdr-dd{
  position: fixed;
  left: 0; right: 0;
  top: calc(var(--header-h) + env(safe-area-inset-top));
  z-index: 1600;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 28px rgba(0,0,0,.10);
  display: none;
}
.c-hdr-dd.is-open{ display: block; }

/* 내부는 crumbs(상단) + cols(2열) */
.c-hdr-dd__inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0;

  display: flex;
  flex-direction: column;
  background: #fff;

  /* 화면을 꽉 채우지 않도록 높이 제한 */
  height: min(
    520px,
    calc(
      100dvh
      - (var(--header-h) + env(safe-area-inset-top))
      - (var(--bottomnav-h) + env(safe-area-inset-bottom))
      - 18px
    )
  );
  overflow: hidden;
}

.c-hdr-crumbs{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--sub);
  padding: 12px var(--space-3);
}
.c-hdr-crumbs__sep{ opacity: .7; }

/* 2열 */
.c-hdr-dd__cols{
  flex: 1;
  min-height: 0;
  font-size: 15px;
  font-weight: 500;
  display: grid;
  grid-template-columns: minmax(160px, 45%) 1fr;
}

/* 좌측(대분류): 흰색 */
.c-hdr-dd__left{
  background: #fff;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* 우측(소분류): 명암 */
.c-hdr-dd__right{
  background: #f5f6f8;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* 리스트 기본 */
.c-hdr-list{ display: block; position: relative; }

/* 공통 item 기본(버튼/링크 공통) */
.c-hdr-item{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;

  border: 0;
  background: transparent;
  text-decoration: none;

  letter-spacing: -0.2px;
  color: #222;
}

/* 기존 1열용 아이콘은 완전 미사용(혹시 남아도 숨김) */
.c-hdr-item__ico{ display: none !important; }

/* 좌측 item 스타일 */
.c-hdr-dd__left .c-hdr-item{
  cursor: pointer;
  justify-content: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  position: relative;
}
.c-hdr-dd__left .c-hdr-item:active{ background: rgba(0,0,0,.04); }
.c-hdr-dd__left .c-hdr-item.is-active{
  font-weight: 700;
  background: #f5f6f8;
  padding-left: 18px;
}

/* 우측 패널(대분류 선택에 따라 교체) */
.c-hdr-dd__right [data-hdr-panel]{
  padding: 4px var(--space-3) 12px;
}
.c-hdr-dd__right .c-hdr-list .c-hdr-item:first-child::after{
  position: absolute; right: 0;
  content: 'chevron_right';
  font-family: 'Material Symbols Outlined';
  font-size: 18px;
}

/* 우측 item 스타일 */
.c-hdr-dd__right .c-hdr-item{
  justify-content: flex-start;
  padding: 12px 0;
}
.c-hdr-dd__right .c-hdr-item:active{ opacity: .85; color: var(--accent); }

/* 우측 활성(현재 cgID) */
.c-hdr-dd__right .c-hdr-item.is-active{
  font-weight: 700;
  color: var(--accent);
}

/* 작은 화면 조정 */
@media (max-width: 360px){
  .c-hdr-dd__inner{
    height: min(
      520px,
      calc(
        100dvh
        - (var(--header-h) + env(safe-area-inset-top))
        - (var(--bottomnav-h) + env(safe-area-inset-bottom))
        - 14px
      )
    );
  }
  .c-hdr-dd__left .c-hdr-item{ font-size: 14px; }
  .c-hdr-dd__right .c-hdr-item{ font-size: 14px; }
}


/* PLP 상단(2단 칩 + 3단 탭/드롭다운) */
.c-plp-head{
  position: sticky;
  top: calc(var(--header-h) + env(safe-area-inset-top));
  z-index: 1200;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 16px rgba(0,0,0,.06);
}
@supports (backdrop-filter: blur(10px)) {
  .c-plp-head{
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
  }
}

/* 2단 칩(가로 스크롤) */
.c-plp-chips{
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;

  padding: 10px var(--space-3) 8px;
  display: flex;
  gap: 9px;
  align-items: center;

  max-height: 64px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height .18s ease, opacity .18s ease, transform .18s ease, padding .18s ease;
}
.c-plp-chips::-webkit-scrollbar{ display:none; }

.c-plp-chip{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.c-plp-chip:active,
.c-plp-chip.is-active{
  border-color: rgba(255,107,107,.35);
  background: rgba(255,107,107,.07);
  color: var(--accent);
}

/* 3단 탭 + 활성 underline */
.c-plp-tabs{
  padding: 4px var(--space-3) 8px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.c-plp-tabs__scroller{
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.c-plp-tabs__scroller::-webkit-scrollbar{ display:none; }

.c-plp-tab{
  position: relative;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: .78;
}
.c-plp-tab:active,
.c-plp-tab.is-active{
  color: var(--accent);
  opacity: 1;
  font-weight: 700;
}
.c-plp-tab:active::after,
.c-plp-tab.is-active::after{
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 10px;
}

.c-plp-more{
  width: 30px;
  height: 26px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.c-plp-more:active{ background: rgba(0,0,0,.04); }

/* 3단 ▼ 드롭다운(탭 아래 펼침) */
.c-plp-dd{
  display: none;
  padding: 10px var(--space-3) 14px;
  border-top: 1px solid rgba(0,0,0,.04);
  box-shadow: 0 6px 10px rgba(0,0,0,0.1);
}
.c-plp-dd.is-open{ display: block; }

.c-plp-dd__grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}
.c-plp-dd__item{
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.2px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.c-plp-dd__item.is-active{
  color: var(--accent);
  font-weight: 700;
}

/* 아래로 스크롤하면 2단(칩)만 접힘 */
.c-plp-head.is-compact .c-plp-chips{
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  padding-top: 0;
  padding-bottom: 0;
}


/* 상품목록 상단 컨트롤(총 상품수 / 정렬 / 보기 전환) */
.c-plp-controls{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px var(--space-3) 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.c-plp-count{
  font-size: 14px;
  font-weight: 500;
  color: var(--sub);
  letter-spacing: -0.2px;
}
.c-plp-count strong{
  font-weight: 700;
  color: #111;
}

.c-plp-controls__right{
  display: flex;
  align-items: center;
  gap: 10px;
}

.c-plp-sort{
  position: relative;
  display: inline-flex;
  align-items: center;
}
.c-plp-sort__sr{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.c-plp-sort__select{
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  border-radius: 10px;
  height: 30px;
  padding: 0 34px 0 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: #111;
}
.c-plp-sort__ico{
  position: absolute;
  right: 10px;
  font-size: 20px;
  opacity: .6;
  pointer-events: none;
}

.c-plp-view{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  display: inline-grid;
  place-items: center;
}
.c-plp-view:active{ background: rgba(0,0,0,.04); }
.c-plp-view [data-plp-view-ico] { font-size: 20px; opacity: .8; }


/* 데모 상품 목록 */
.c-plp-list{ padding: var(--space-3); display: grid; gap: 15px; }

/* 보기 전환: 그리드 */
.c-plp-list.is-grid{
  /* 상품 카드가 최소 150px은 유지하되, 남는 공간은 알아서 채워라! */
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}
.c-plp-list.is-grid .c-plp-item{
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
  border: 0;
}
.c-plp-list.is-grid .c-plp-item__img{
  width: 100%;
}
.c-plp-list.is-grid .c-plp-benefits{
  display: none;
}

.c-plp-item{
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 15px;
}
.c-plp-item:active{ background: rgba(0,0,0,.05); }
.c-plp-item__img{
  width: 120px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 10px;
}
.c-plp-item__img img{ 
  width: 100%; height: 100%; 
  object-fit: cover; 
  object-position: center;
  display: block; 
}

.c-plp-badge,
.c-plp-likeBtn,
.c-plp-salePct,
.c-plp-sale{
  z-index: 2;
}
.c-plp-badge{
  position: absolute;
  top: 8px; left: 8px;
  padding: 4px 7px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.2px;
  background: rgba(255,107,107,.92);
  color: #fff;
}
.c-plp-likeBtn{
  position: absolute;
  right: 0; bottom: 20px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
}
.c-plp-likeBtn:active{
  border-radius: 999px;
  background: rgba(0,0,0,.1);
}
.c-plp-likeBtn .material-symbols-outlined{ font-size: 18px; opacity: .78; }
.c-plp-likeBtn.is-on .material-symbols-outlined{
  color: var(--accent);
  opacity: 1;
  font-variation-settings: 'FILL' 1;
}

/* --- Sale / Soldout badges --- */
.c-plp-salePct{
  position: absolute;
  top: 8px; right: 8px;
  padding: 4px 7px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.2px;
  background: rgba(17,17,17,.82);
  color: #fff;
}
.c-plp-sale{
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.2px;
  background: rgba(17,17,17,.72);
  color: #fff;
}

.c-plp-soldout{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  z-index: 3;
  pointer-events: none;
  padding: 10px 12px;
  background: rgba(0,0,0,.20);
  color: #fff;
  font-weight: 600;
  text-shadow: 0 2px 3px rgba(0,0,0,0.7);
}

.c-plp-item__body{ min-width: 0; }

.c-plp-shopRow{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--sub);
}
.c-plp-shopTag{
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,107,107,.28);
  color: var(--accent);
  background: rgba(255,107,107,.06);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: -0.2px;
}
.c-plp-shopName{ font-size:11px; color:#888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-plp-title{
  margin: 5px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.c-plp-priceRow{ display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.c-plp-discount{ color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: -0.2px; }
.c-plp-price{ font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.c-plp-price small{ font-size: 13px; font-weight: 500; opacity: .9; }
.c-plp-was{ margin-top: 2px; font-size: 12px; color: var(--sub); text-decoration: line-through; }

.c-plp-benefits{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.c-plp-pill{
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  font-size: 11px;
  font-weight: 700;
  color: #374151;
}

.c-plp-ratingRow{ display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--sub); }
.c-plp-star{ color: var(--accent); font-weight: 900; }
.c-plp-score{ font-weight: 800; color: #111; }
.c-plp-reviews{ color: var(--sub); }


/* 더보기/무한추가(하이브리드) */
.c-plp-pager{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--space-3) 12px;
}
.c-plp-loadMore{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.c-plp-loadMore:active{ background: rgba(0,0,0,.04); }
.c-plp-loadMore.is-loading{
  opacity: .6;
  pointer-events: none;
}
.c-plp-sentinel{ height: 1px; }
