body.product-detail-page {
    background: #fff;
    padding-bottom: 0 !important;
}

/* item_style.css 등에서 header를 fixed로 두면 탭 sticky가 깨지므로 상세에서는 sticky로 고정 */
body.product-detail-page .header {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 414px !important;
    margin: 0 auto !important;
    z-index: 1000;
    background: #fff;
    padding: 0 !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    flex-direction: column;
    align-items: stretch !important;
}

/* 상품 상세: 올리브영형 상단바 (뒤로 | 검색·홈·장바구니) */
.header.header--product-detail {
    padding: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.header-product-detail-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 8px 0 4px;
}

.header-pd-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #111;
    cursor: pointer;
    padding: 0;
}

.header-pd-back .material-icons {
    font-size: 26px;
}

.header-pd-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-pd-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #111 !important;
    text-decoration: none;
}

.header-pd-icon .material-icons {
    font-size: 24px;
}

.header-pd-cart {
    position: relative;
}

.header-pd-cart-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}

/* 상품상세에서는 공통 하단 네비를 숨기고 구매바를 우선 노출 */
body.product-detail-page .bottom-nav {
    display: none !important;
}

body.product-detail-page #container {
    max-width: 414px;
    margin: 0 auto;
    background: #f8fafc;
    /* overflow-x: hidden 은 sticky(position: sticky) 조상에서 깨지므로 제거 */
    overflow-x: visible;
}

body.product-detail-page .prod-detail-product-gallery {
    margin-top: 0 !important;
}

body.product-detail-page #sct_location,
body.product-detail-page #sit_hhtml,
body.product-detail-page #sit_rel,
body.product-detail-page #sit_siblings,
body.product-detail-page .sit_admin {
    display: none !important;
}

body.product-detail-page #sit {
    margin: 0;
    padding: 0 0 150px;
}

body.product-detail-page #sit_ov_from,
body.product-detail-page #sit_ov_wrap,
body.product-detail-page #sit_ov {
    margin: 0;
    padding: 0;
    border: 0;
}

body.product-detail-page .prod-detail-product-info,
body.product-detail-page .prod-detail-seller-info,
body.product-detail-page .prod-detail-tab-navigation,
body.product-detail-page .prod-detail-tab-content {
    background: #fff;
}

.prod-detail-gallery-slides {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.prod-detail-gallery-slides::-webkit-scrollbar {
    display: none;
}

.prod-detail-gallery-slide {
    min-width: 100%;
    scroll-snap-align: start;
}

.prod-detail-gallery-slide img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f1f5f9;
}

.prod-detail-tab-content {
    display: none;
    background: #fff;
    margin-top: 8px;
}

.prod-detail-tab-content.active {
    display: block;
}

.prod-detail-product-description,
.prod-detail-product-specs,
.prod-detail-review-item,
.prod-detail-qa-item,
.prod-detail-delivery-content {
    padding: 16px;
}

.prod-detail-total-amount {
    font-weight: 700;
}

/* 상품설명·배송안내 본문: 에디터 삽입 대형 이미지/표가 뷰포트를 넘지 않도록 */
body.product-detail-page .prod-detail-product-description,
body.product-detail-page .prod-detail-delivery-content {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

body.product-detail-page .prod-detail-product-description img,
body.product-detail-page .prod-detail-product-description video,
body.product-detail-page .prod-detail-delivery-content img,
body.product-detail-page .prod-detail-delivery-content video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
    box-sizing: border-box;
}

body.product-detail-page .prod-detail-product-description iframe,
body.product-detail-page .prod-detail-product-description embed,
body.product-detail-page .prod-detail-product-description object,
body.product-detail-page .prod-detail-delivery-content iframe {
    max-width: 100% !important;
    width: 100% !important;
    display: block;
    box-sizing: border-box;
}

/* 동영상 임베드(유튜브 등): 가로 100% + 비율 유지 */
body.product-detail-page .prod-detail-product-description iframe[src*='youtube'],
body.product-detail-page .prod-detail-product-description iframe[src*='youtu.be'],
body.product-detail-page .prod-detail-delivery-content iframe[src*='youtube'] {
    aspect-ratio: 16 / 9;
    height: auto !important;
    min-height: 0;
}

body.product-detail-page .prod-detail-product-description svg,
body.product-detail-page .prod-detail-delivery-content svg {
    max-width: 100% !important;
    height: auto !important;
}

body.product-detail-page .prod-detail-product-description table,
body.product-detail-page .prod-detail-delivery-content table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed;
    border-collapse: collapse;
    box-sizing: border-box;
}

body.product-detail-page .prod-detail-product-description table td,
body.product-detail-page .prod-detail-product-description table th,
body.product-detail-page .prod-detail-delivery-content table td,
body.product-detail-page .prod-detail-delivery-content table th {
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: top;
}

body.product-detail-page .prod-detail-product-description *,
body.product-detail-page .prod-detail-delivery-content * {
    word-break: break-word;
}

/* 하단 구매 영역 - 모바일 수량 선택 */
.prod-detail-qty-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
}

.prod-detail-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 18px;
    line-height: 1;
}

.prod-detail-qty-value {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    color: #0f172a;
}

body.product-detail-page .prod-detail-bottom-action {
    z-index: 1200;
    bottom: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    left: 50%;
    transform: translateX(-50%);
    max-width: 414px;
    width: 100%;
    box-sizing: border-box;
}

/* 옵션 상품: 카드형 하단바 (^ 로 레이어 오픈) */
body.product-detail-page .prod-detail-bottom-action--options {
    padding: 0;
    background: transparent;
    box-shadow: none;
    flex-direction: column;
    align-items: stretch;
}

.prod-detail-bottom-card {
    width: 100%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
    overflow: hidden;
}

.prod-detail-bottom-card--simple {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
}

/* ^ 옵션 레이어 열기 */
.prod-detail-option-launch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    padding: 4px 0 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.prod-detail-option-launch-icon .material-icons {
    font-size: 30px;
    color: #cbd5e1;
    line-height: 1;
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

body.prod-detail-option-open .prod-detail-option-launch-icon .material-icons {
    transform: rotate(180deg);
    color: #94a3b8;
}

.prod-detail-bottom-btns {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 4px 16px 12px;
}

.prod-detail-icon-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.prod-detail-icon-act {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.prod-detail-icon-act .material-icons {
    font-size: 24px;
}

.prod-detail-wish-btn .prod-detail-wish-ico-full {
    display: none;
}

.prod-detail-wish-btn.is-active {
    border-color: #ec4899;
    color: #ec4899;
}

.prod-detail-wish-btn.is-active .prod-detail-wish-ico-empty {
    display: none;
}

.prod-detail-wish-btn.is-active .prod-detail-wish-ico-full {
    display: inline;
}

body.product-detail-page .prod-detail-bottom-action--options .prod-detail-purchase-buttons {
    flex: 1;
    min-width: 0;
}

.prod-detail-sit-tot-offscreen {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

/* 탭: 헤더 바로 아래 고정 */
.prod-detail-tab-navigation {
    position: sticky;
    top: var(--sd-header-height, 52px);
    z-index: 900;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.prod-detail-tab-nav-list {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prod-detail-tab-nav-item {
    flex: 1;
    text-align: center;
    padding: 12px 6px;
    font-size: 13px;
    color: #64748b;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.prod-detail-tab-nav-item.active {
    color: #111;
    border-bottom-color: #111;
    font-weight: 700;
}

/* 하단 구매바 (옵션 없는 상품) */
.prod-detail-bottom-action-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

body.product-detail-page .prod-detail-purchase-buttons {
    flex: 1;
    display: flex;
    gap: 8px;
    min-width: 0;
}

body.product-detail-page .prod-detail-cart-btn {
    flex: 1;
    height: 48px;
    border: 1px solid #8b5cf6 !important;
    border-radius: 8px;
    background: #fff !important;
    color: #8b5cf6 !important;
}

body.product-detail-page .prod-detail-buy-btn {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%) !important;
    color: #fff !important;
}

body.product-detail-page .prod-detail-buy-btn:hover {
    transform: none;
    box-shadow: none;
    opacity: 0.92;
}

/* 옵션 바텀시트 */
.prod-detail-option-sheet {
    position: fixed;
    inset: 0;
    z-index: 1400;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.prod-detail-option-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.prod-detail-option-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.prod-detail-option-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(88vh, 640px);
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    max-width: 414px;
    margin: 0 auto;
}

.prod-detail-option-sheet.is-open .prod-detail-option-sheet-panel {
    transform: translateY(0);
}

.prod-detail-option-sheet-handle {
    display: block;
    width: 100%;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.prod-detail-option-sheet-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 10px;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    background: #e2e8f0;
    border-radius: 2px;
}

.prod-detail-option-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 12px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.prod-detail-option-sheet-head strong {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.prod-detail-option-sheet-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 0;
}

.prod-detail-option-sheet-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
}

.prod-detail-option-sheet-footer {
    flex-shrink: 0;
    border-top: 1px solid #f1f5f9;
    background: #fff;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.prod-detail-option-sheet-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    font-size: 14px;
    color: #334155;
}

.prod-detail-sheet-total {
    font-weight: 500;
}

.prod-detail-sheet-total strong {
    font-weight: 800;
    color: #111;
}

.prod-detail-sheet-qty strong {
    font-weight: 700;
    color: #111;
}

.prod-detail-bottom-btns--sheet {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
}

.prod-detail-option-selects .get_item_options,
.prod-detail-option-selects .get_item_supply {
    margin-bottom: 14px;
}

.prod-detail-option-selects .label-title,
.prod-detail-option-selects label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.prod-detail-option-selects select.it_option,
.prod-detail-option-selects select.it_supply {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 1px solid #111;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #111;
    box-sizing: border-box;
}

.prod-detail-option-selected-label {
    margin: 16px 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #111;
}

.prod-detail-option-selected-block #sit_sel_option ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.prod-detail-option-selected-block .sit_opt_list,
.prod-detail-option-selected-block .sit_spl_list {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 14px 12px;
    margin-bottom: 10px;
    font-size: 14px;
    background: #f3f4f6;
    box-sizing: border-box;
}

.prod-detail-option-selected-block .sd-opt-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.prod-detail-option-selected-block .sd-opt-card-titles {
    flex: 1;
    min-width: 0;
}

.prod-detail-option-selected-block .sit_opt_subj {
    display: block;
    font-weight: 600;
    color: #111;
    line-height: 1.35;
}

.prod-detail-option-selected-block .sit_opt_prc {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #ef4444;
}

.prod-detail-option-selected-block .sd-opt-del {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
}

.prod-detail-option-selected-block .sd-opt-del:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #111;
}

.prod-detail-option-selected-block .sd-opt-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.prod-detail-option-selected-block .sd-opt-qty-seg {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    /* border: 1px solid #e2e8f0; */
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.prod-detail-option-selected-block .sd-opt-qty-seg .sd-opt-qty-btn {
    width: 40px;
    min-width: 40px;
    margin: 0;
    padding: 0;
    border: none;
    background: #fff;
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    color: #111;
    cursor: pointer;
}

.prod-detail-option-selected-block .sd-opt-qty-seg .sit_qty_minus {
    border-right: 1px solid #e2e8f0;
}

.prod-detail-option-selected-block .sd-opt-qty-seg .sit_qty_plus {
    border-left: 1px solid #e2e8f0;
}

.prod-detail-option-selected-block .sd-opt-qty-input {
    width: 48px;
    margin: 0;
    padding: 8px 4px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #111;
    background: #fff;
    box-sizing: border-box;
}

.prod-detail-option-selected-block .sd-opt-line-total {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
}

body.prod-detail-option-open {
    overflow: hidden;
    touch-action: none;
}

.prod-detail-form-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* 리뷰/문의 스킨 모바일 보정 */
#itemuse, #itemqa {
    padding: 12px;
}

#sit_use_list > h3,
#sit_qa_list > h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #0f172a;
}

#sit_use_wbtn,
#sit_qa_wbtn {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

#itemuse .btn01,
#itemuse .btn02,
#itemqa .btn01,
#itemqa .btn02 {
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
}

#sit_use_ol,
#sit_qa_ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sit_use_li,
.sit_qa_li {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 10px;
    padding: 12px;
}

.sit_use_li_title,
.sit_qa_li_title {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    color: #334155;
    font-weight: 600;
    padding: 8px 0;
}

.sit_use_con,
.sit_qa_con {
    display: none;
    margin-top: 8px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
}

#itemuse img,
#itemqa img {
    max-width: 100% !important;
    height: auto !important;
}

#itemuse .sit_empty,
#itemqa .sit_empty {
    padding: 18px 12px;
    text-align: center;
    color: #94a3b8;
}

/* 페이지네이션 */
#itemuse .pg,
#itemqa .pg {
    margin: 12px 0 0;
    text-align: center;
}

#itemuse .pg_page,
#itemqa .qa_page {
    display: inline-block;
    min-width: 32px;
    line-height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
}
