@charset "utf-8";

/* product-detail-new.css
 * - SelectSheet 기반 PDP (옵션/담기 UI는 시트에서 처리)
 * - product-new.php 템플릿 구조에 맞춰 최소/명확하게 유지
 */

/* Header */
.l-pdp-header{ border-bottom: 0; }
.c-pdp-logo{ font-weight: 500; }

/* Main: 하단 고정 buybar 가림 방지 */
.l-main.l-pdp{
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 12px);
}

/* Gallery (snap carousel) */
.c-pdp-gallery{ background:#fff; }
.c-pdp-gallery.c-carousel{
  padding: 0;
  --carousel-item-basis: 100%;
  --carousel-gap: 0px;
  --carousel-snap: mandatory;
}
.c-pdp-gallery .c-carousel__viewport{
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: 1 / 1;
  background: #f2f2f2;
}
.c-pdp-gallery .c-carousel__track{ gap: 0; }
.c-pdp-gallery .c-carousel__item{
  background:#f2f2f2;
  display:grid;
  place-items:center;
}
.c-pdp-gallery .c-carousel__item img{
  width:100%;
  height:100%;
  object-fit:contain;
}
/* PDP controls spacing */
.c-pdp-gallery .c-carousel__controls{
  margin-top: 0;
  padding: 10px 0 14px;
  background:#fff;
}

/* Product info */
.l-pdp-info{
  background:#fff;
  padding: 14px var(--space-3) 18px;
  border-bottom: 1px solid var(--line);
}
.c-pdp-brand{
  color:#888;
  font-size: 12px;
  margin-bottom: 8px;
}
.c-pdp-name{
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing:-0.3px;
}
.c-pdp-code{
  color:#222;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing:-0.3px;
  margin: 6px 0 12px;
}

/* Tags */
.c-pdp-tags{
  display:flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.c-pdp-tag{
  display:inline-flex;
  align-items:center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.2px;
  border: 1px solid rgba(0,0,0,0.12);
  background:#fff;
  color:#333;
}
.c-pdp-tag--accent{
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,0,0,0.02);
}
.c-pdp-tag--dark{
  border-color: #111;
  background:#111;
  color:#fff;
}
.c-pdp-tag--line{
  border-color: rgba(0,0,0,0.18);
  color:#333;
}
.c-pdp-tag--danger{
  border-color: #d7263d;
  color:#d7263d;
  background: rgba(0,0,0,0.02);
}

/* Price */
.c-pdp-price{
  margin-top: 12px;
  display:flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 500;
  letter-spacing:-0.3px;
}
.c-pdp-del{
  color:#aaa;
  font-size: 15px;
  text-decoration: line-through;
}
.c-pdp-rate{
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
}
.c-pdp-sale{
  font-weight: 600;
  font-size: 20px;
}

/* Status / hint */
.c-pdp-status{
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.c-pdp-status--soldout{ color: #d7263d; }
.c-pdp-hint{
  margin: 12px 0 0;
  color:#666;
  font-size: 13px;
  line-height: 1.45;
}

/* Meta list */
.c-pdp-meta{
  margin: 14px 0 0;
  display:grid;
  grid-template-columns: 56px 1fr;
  row-gap: 8px;
  column-gap: 10px;
}
.c-pdp-meta dt{
  color:#666;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}
.c-pdp-meta dd{
  margin:0;
  color:#222;
  font-size: 14px;
  line-height: 1.45;
}

/* Sections */
.l-pdp-section{
  background:#fff;
  padding: 18px var(--space-3) 20px;
  border-bottom: 1px solid var(--line);
}
.l-pdp-section h2{
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 18px;
}
.c-pdp-muted{
  color:#666;
  font-size: 14px;
  line-height: 1.55;
}

/* Simple list */
.c-pdp-list{
  margin: 0;
  padding: 0 0 0 18px;
  color:#333;
  font-size: 14px;
  line-height: 1.6;
}
.c-pdp-list li{ margin: 6px 0; }

/* HTML content (desc/shipping/return) */
.c-pdp-html{
  color:#333;
  font-size: 15px;
  line-height: 1.6;
  /* 가로 사이즈 넘치지 않게 */
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-wrap: break-word;
  overflow-x: auto;
}
.c-pdp-html > iframe { 
  width: 100% !important;
  min-width: 0 !important;
  display: block;
  height: auto; 
}
.c-pdp-html > :first-child{ margin-top: 0; }
.c-pdp-html h3{
  font-size: 14px;
  font-weight: 700;
  margin: 14px 0 8px;
}
.c-pdp-html ul{
  margin: 0;
  padding-left: 18px;
}
.c-pdp-html li{ margin: 6px 0; }
.c-pdp-html__gsimg-tag{
  margin: 3px 0;
  font-weight: 400;
  height: 20px;
}
.c-pdp-html__gsimg{
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 10px;
}
.c-pdp-html img{
  display:block;
  max-width: 100%;
  height: auto;
}
.c-pdp-html table{
  width:100%;
  border-collapse: collapse;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  overflow:hidden;
  margin: 10px 0;
}
.c-pdp-html th, .c-pdp-html td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 13px;
}
.c-pdp-html th{
  text-align:left;
  background: rgba(0,0,0,0.03);
  font-weight: 900;
}


/* Buybar: 찜 + 장바구니 c-selectbtn 포함 in style.css */
.c-pdp-buybar{
  display:grid;
  grid-template-columns: 1fr 1fr 4fr;
}


/* 수량별 할인 */
.dc_rates-card {
  /* clamp를 이용한 최적의 너비 계산 */
  flex: 0 0 clamp(80px, 23vw, 120px);
  padding: 10px 0;
  color: #111;
  font-weight: 600;
  letter-spacing:-0.3px;
  margin-bottom: 20px;
}
.dc_card-qty { font-size: 12px; display: block; margin-bottom: 5px; }
.dc_card-rate { 
  color: #fff; 
  background: var(--accent-price);
  font-size: 11px; 
  font-weight: bold;
  line-height: 12px; 
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block; 
  margin-bottom: 5px; 
}
.dc_card-price { font-size: 15px; }
.dc_card-unit { font-size: 12px; color: #222; }


/* =========================================================
   Wide screen PDP (tablet landscape / desktop)
   - 마크업 수정 없이 main 그리드로 상단 2열 구성
========================================================= */
@media (min-width: 768px){
  /* main을 그리드로: 첫 2개 섹션만 2열, 나머지는 전체폭 */
  .l-main.l-pdp{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px; /* 좌:유동 / 우:고정 */
    gap: 24px;
    align-items: start;
  }

  /* 1) 갤러리: 왼쪽 컬럼 */
  .l-main.l-pdp > .c-pdp-gallery{
    grid-column: 1;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .c-pdp-gallery .c-carousel__viewport{
    border-radius: 0; /* 카드 라운드로 감쌌으니 내부는 0 */
  }

  /* 2) 요약정보: 오른쪽 컬럼 + sticky */
  .l-main.l-pdp > .l-pdp-info{
    grid-column: 2;
    position: sticky;
    top: calc(var(--header-h) + env(safe-area-inset-top) + 12px);
    align-self: start;

    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-bottom: 0; /* 모바일용 하단 라인 제거 */
  }

  /* 3) 이하 섹션은 전체폭(양 컬럼 모두) */
  .l-main.l-pdp > .l-pdp-section{
    grid-column: 1 / -1;

    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-bottom: 0; /* 모바일용 하단 라인 제거 */
    margin-top: 14px;
  }

  /* 섹션 간격 */
  .l-main.l-pdp > .l-pdp-section + .l-pdp-section{
    margin-top: 14px;
  }
}

/* 구글에서 추가해준 내용. */
@media (min-width: 768px) {
  /* 정보창 우측 여백 및 그림자 보강 */
  .l-main.l-pdp > .l-pdp-info {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 24px; /* 모바일보다 여유로운 패딩 */
    border-bottom: 1px solid var(--line); /* 모바일에서 제거한 보더 복구 고려 */
  }

  /* 상세 설명 텍스트 폭 제한으로 가독성 향상 */
  .c-pdp-html, .c-pdp-list {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
}