/* [pliki 테마] 상품 상세 */

.pk-item { padding-top: 34px; }
.pk-item-top { display: flex; gap: 56px; align-items: flex-start; }

/* 갤러리 */
.pk-item-gallery { width: 560px; flex-shrink: 0; }
.pk-item-gallery .swiper { border-radius: 14px; overflow: hidden; background: var(--bg-thumb); }
.pk-item-gallery .swiper-slide { aspect-ratio: 1/1; }
.pk-item-gallery .swiper-slide a { display: block; width: 100%; height: 100%; }
.pk-item-gallery .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.pk-item-gallery .swiper-pagination-bullet-active { background: #111; }
.pk-item-noimg {
    display: flex; align-items: center; justify-content: center; height: 100%;
    color: #ccc; font-size: 48px;
}
.pk-item-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.pk-item-thumbs button {
    width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
    border: 1px solid var(--line); background: var(--bg-thumb); padding: 0; opacity: .65;
}
.pk-item-thumbs button.on { border-color: #111; opacity: 1; }
.pk-item-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* 우측 정보 */
.pk-item-info { flex: 1; min-width: 0; max-width: 520px; }
.pk-item-brandrow { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pk-item-brand { font-size: 15px; font-weight: 800; letter-spacing: 0.2px; }
.pk-item-share { font-size: 18px; color: #666; padding: 4px; }
.pk-item-name { font-size: 21px; font-weight: 700; line-height: 1.35; letter-spacing: -0.6px; margin-bottom: 8px; }
.pk-item-basic { font-size: 13px; color: var(--gray); margin-bottom: 6px; }
.pk-item-market { font-size: 13px; color: var(--gray-l); margin-bottom: 12px; }

.pk-item-price { margin-bottom: 12px; }
.pk-item-price strong { font-size: 28px; font-weight: 900; letter-spacing: -0.5px; }
.pk-item-price strong em { font-style: normal; font-size: 18px; font-weight: 700; }
/* 레퍼런스: 취소선 가격은 판매가 아래 줄 */
.pk-item-price del { display: block; margin-top: 2px; color: var(--gray-l); font-size: 15px; }

.pk-item-badges { display: flex; gap: 5px; margin-bottom: 18px; }
.pk-item-badges span {
    background: var(--badge-bg); color: var(--badge-txt); font-size: 12px;
    padding: 4px 8px; border-radius: 4px;
}
.pk-item-badges span.new { background: #111; color: #fff; }

.pk-item-rows { border-top: 1px solid var(--line); margin-bottom: 4px; }
.pk-item-rows li {
    display: flex; justify-content: space-between; padding: 12px 2px;
    border-bottom: 1px solid var(--line); font-size: 13px;
}
.pk-item-rows .lbl { color: #555; }
.pk-item-rows .lbl i { width: 18px; color: #999; }
.pk-item-rows .val b { font-weight: 700; }
.pk-item-rows li:first-child .val b { color: #2f6bff; } /* 레퍼런스: 포인트 값 파랑 */

/* 옵션 select (영카트 생성 select 리스타일) */
.pk-item-option { margin: 18px 0 0; }
.pk-item-option h3 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.pk-item-option select, .pk-item-option .it_option, .pk-item-option .it_supply {
    width: 100%; padding: 14px 16px; border: 1.5px solid #e2e2e2; border-radius: 10px;
    font-size: 14px; background: #f2f3f5; margin-bottom: 8px; color: #333;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' fill='none' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.pk-item-option select:focus { outline: none; border-color: #111; background-color: #fff; }

/* 선택된 옵션 목록 */
#sit_sel_option { margin-top: 14px; }
/* 선택된 옵션 카드 — 레퍼런스: 옵션명 좌상 / X 우상 / 수량 좌하 / 가격 우하 */
#sit_opt_added .sit_opt_list, #sit_opt_added .sit_spl_list {
    position: relative; background: #f2f3f5; border-radius: 12px;
    padding: 16px 16px 14px; margin-bottom: 8px; font-size: 13px;
    display: grid; grid-template-columns: 1fr auto; grid-row-gap: 16px; align-items: end;
}
#sit_opt_added .sit_opt_subj { grid-column: 1 / -1; font-weight: 600; font-size: 13px; color: #222; padding-right: 24px; }
#sit_opt_added .sit_opt_prc { grid-column: 2; grid-row: 2; font-size: 17px; font-weight: 800; color: #111; text-align: right; }
#sit_opt_added > li > div { grid-column: 1; grid-row: 2; display: flex; align-items: center; gap: 0; }
/* 수량 스테퍼 (shop.js 생성 input은 .frm_input) */
#sit_opt_added .num_input, #sit_opt_added > li > div input, .pk-opt-qty input.num_input {
    width: 40px !important; height: 30px; text-align: center; border: 1px solid #ddd; border-left: 0; border-right: 0;
    font-size: 13px; font-weight: 600; background: #fff; padding: 0; order: 2;
}
#sit_opt_added .sit_qty_minus, #sit_opt_added .sit_qty_plus, .pk-qty-dn, .pk-qty-up {
    width: 28px; height: 30px; border: 1px solid #ddd; background: #fff; color: #555;
    font-size: 14px; line-height: 1; overflow: hidden; text-indent: -99px;
}
.pk-qty-dn, .pk-qty-up { text-indent: 0; }
#sit_opt_added .sit_qty_minus { border-radius: 0 6px 6px 0; order: 3; }
#sit_opt_added .sit_qty_plus { border-radius: 6px 0 0 6px; order: 1; }
#sit_opt_added .sit_qty_minus::before { content: '−'; text-indent: 0; float: left; width: 100%; }
#sit_opt_added .sit_qty_plus::before { content: '+'; text-indent: 0; float: left; width: 100%; }
#sit_opt_added > li > div .num_input { order: 2; }
/* 커스텀 스테퍼(무옵션 케이스) */
.pk-opt-qty { display: inline-flex; align-items: center; }
.pk-qty-dn { border-radius: 6px 0 0 6px; }
.pk-qty-up { border-radius: 0 6px 6px 0; }
/* X 삭제 버튼 우상단 */
#sit_opt_added .sit_opt_del {
    position: absolute; top: 12px; right: 12px; border: 0; background: none; color: #aaa;
    font-size: 0; width: 20px; height: 20px; order: 4;
}
#sit_opt_added .sit_opt_del::before { content: '\2715'; font-size: 14px; }
/* 무옵션 행(.pk-opt-row)도 동일 배치 */
.pk-opt-row { display: contents; }
.pk-opt-row .sit_opt_subj { grid-column: 1 / -1; }
.pk-opt-row .pk-opt-qty { grid-column: 1; grid-row: 2; }
.pk-opt-row .sit_opt_prc { grid-column: 2; grid-row: 2; font-size: 17px; font-weight: 800; color: #111; text-align: right; }

/* 총액 */
.pk-item-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 2px 16px; margin-top: 8px; border-top: 1px solid #111;
}
.pk-item-total > span { font-size: 14px; font-weight: 700; }
#sit_tot_price { font-size: 15px; font-weight: 700; color: var(--red); letter-spacing: -0.5px; }
#sit_tot_price span { display: none; } /* '총 금액:' 라벨 숨김 — 좌측 라벨과 중복 */
#sit_tot_price strong { font-size: 26px; font-weight: 900; margin-right: 2px; }

/* 버튼 */
.pk-item-btns { display: flex; gap: 8px; margin-bottom: 22px; }
.pk-item-btns .pk-btn { flex: 1; height: 54px; font-size: 16px; }
.pk-btn-wish-lg {
    width: 54px; height: 54px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 10px;
    font-size: 20px; color: #888; background: #fff;
}
.pk-btn-wish-lg:hover { color: var(--red); border-color: var(--red); }

/* 배송 정보 */
/* 배송 정보 — 레퍼런스: 소제목 + 라벨 좌 / 값 우측 정렬 */
.pk-item-delivery { border-top: 1px solid var(--line); }
.pk-item-delivery::before { content: '배송 정보'; display: block; font-size: 15px; font-weight: 800; padding: 18px 0 6px; letter-spacing: -0.5px; }
.pk-item-delivery li { display: flex; justify-content: space-between; gap: 14px; padding: 12px 2px; font-size: 13px; border-bottom: 1px solid var(--line); }
.pk-item-delivery .lbl { color: #333; font-weight: 600; min-width: 92px; }
.pk-item-delivery .lbl i { width: 20px; color: #f0a542; }
.pk-item-delivery .val { color: #555; text-align: right; }
/* 브랜드 링크 행 */
.pk-item-brandlink {
    display: flex; align-items: center; gap: 8px; padding: 16px 2px; font-size: 15px; font-weight: 700;
    border-bottom: 1px solid var(--line);
}
.pk-item-brandlink i { color: #999; }

/* 모바일 하단 고정바 */
.pk-item-fixbar { display: none; }

/* ── 상세 탭 ─────────────────────────────────────── */
.pk-item-detail { margin-top: 70px; }
.pk-tab-tit {
    display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 52px;
    background: #fff; z-index: 40;
}
.pk-tab-tit li { flex: 1; }
.pk-tab-tit button {
    width: 100%; padding: 15px 4px; font-size: 14px; font-weight: 600; color: #888;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.pk-tab-tit button.selected { color: #000; font-weight: 800; border-bottom-color: #000; }
.pk-tab-tit button span { color: var(--red); font-weight: 700; }
.pk-tab-con > li { padding: 36px 0 10px; }
.pk-item-explan { max-width: 860px; margin: 0 auto; line-height: 1.8; font-size: 14px; }
.pk-item-explan img { max-width: 100%; height: auto; }
.pk-detail-copy { text-align: center; padding: 30px 0; }
.pk-detail-copy h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.7px; margin-bottom: 12px; }
.pk-detail-copy p { color: var(--gray); }
.pk-item-subtit { font-size: 16px; font-weight: 800; letter-spacing: -0.5px; margin: 26px 0 14px; }
.pk-item-open th {
    text-align: left; background: var(--bg-soft); padding: 11px 14px; font-size: 13px;
    width: 180px; border: 1px solid var(--line); font-weight: 600;
}
.pk-item-open td { padding: 11px 14px; font-size: 13px; border: 1px solid var(--line); }
.pk-item-policy { line-height: 1.8; font-size: 13px; color: #444; margin-bottom: 20px; }

/* 반응형 */
@media (max-width: 1024px) {
    .pk-item-top { gap: 32px; }
    .pk-item-gallery { width: 46%; }
}
@media (max-width: 768px) {
    .pk-item { padding-top: 0; }
    .pk-item.inner { padding: 0; }
    .pk-item-top { display: block; }
    .pk-item-gallery { width: 100%; }
    .pk-item-gallery .swiper { border-radius: 0; }
    .pk-item-thumbs { padding: 0 14px; }
    .pk-item-info { max-width: none; padding: 18px 14px 0; }
    .pk-item-name { font-size: 18px; }
    .pk-item-price strong { font-size: 24px; }
    .pk-item-btns { display: none; } /* 하단 고정바로 대체 */
    .pk-item-fixbar {
        display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
        background: #fff; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 20px rgba(0,0,0,.08);
    }
    .pk-item-fixbar .pk-btn { flex: 1; height: 48px; font-size: 15px; }
    .pk-btn-wish-lg { width: 48px; height: 48px; }
    .pk-item-detail { margin-top: 40px; }
    .pk-tab-tit { top: 0; }
    .pk-tab-tit button { font-size: 13px; padding: 13px 2px; }
    .pk-tab-con > li { padding: 26px 14px 6px; }
    .pk-item-open th { width: 120px; }
    body { padding-bottom: 70px; } /* 고정바 공간 */
}
