@charset "utf-8";

/* B5 — 우측 스티키 예약 패널
   정본 규격: .claude/skills/style/item-detail-page.md */

/* 레거시 사이드바 컬럼의 인라인 sticky 를 대체한다.
   인라인으로 두면 ≤980 시트 전환(position:fixed)이 인라인에 밀려 시트가 올라오지 않는다. */
.item-detail #side-bar {
    position: sticky;
    top: 90px;
}

.item-book-panel {
    overflow: hidden;
    border: 1px solid var(--tp-line);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(20, 30, 55, .06);
    background: #fff;
}

/* 레거시 사이드바 안에 삽입되는 형태 — 바깥 박스가 이미 있으므로 테두리·그림자 제거 */
.item-book-panel--nohead {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.item-book-panel--nohead .item-book-panel__body { padding: 0; }

.item-book-panel__head {
    padding: 18px 18px 16px;
    border-bottom: 1px solid var(--tp-line);
}

.item-book-panel__head-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.item-book-panel__title { font-size: 15px; font-weight: 600; line-height:1.4;}

.item-book-panel__price {
    margin-top: 8px;
    color: var(--tp-gray);
    font-size: 13px;
}

.item-book-panel__price b {margin-left: 4px; color: var(--tp-text); font-size: 20px; }

.item-book-panel__icons { display: flex; flex-shrink: 0; gap: 8px; }

.item-book-panel__ic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--tp-line);
    border-radius: 50%;
    background: #fff;
    color: #555;
    font-size: 16px;
    cursor: pointer;
}

.item-book-panel__ic:hover { background: var(--tp-bg); }

.item-book-panel__ic img { display: block; }

/* 찜 — paw.php 핸들러가 button 에 .on 을 토글한다. 하트는 CSS 로만 그린다 */
.item-book-panel__ic.itemGreat { padding: 0; }

.item-book-panel__ic.itemGreat button {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--tp-gray);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.item-book-panel__ic.itemGreat button::before { content: '♡'; }
.item-book-panel__ic.itemGreat button.on { color: var(--tp-sun); }
.item-book-panel__ic.itemGreat button.on::before { content: '♥'; }

.item-book-panel__body { padding: 20px 16px; }

.item-book-panel__label {
    margin-bottom: 6px;
    color: var(--tp-gray);
    font-size: 12px;
    font-weight: 500;
}

.item-book-panel__date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
    background: var(--tp-bg);
    font-size: 14px;
}

.item-book-panel__date-val { font-weight: 700; }
.item-book-panel__date-val--empty { color: var(--tp-gray); font-weight: 500; }

.item-book-panel__date a {
    color: var(--tp-blue);
    font-size: 12px;
    font-weight: 600;
}

/* ===== 카트 ===== */
.item-book-panel__cart {
    display: flex;
    flex-direction: column;
    max-height: 240px;
    overflow-y: auto;
}

.item-book-panel__empty {
    padding: 16px 0;
    color: var(--tp-gray);
    font-size: 13px;
    text-align: center;
}

.item-book-panel__ci {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    font-size: 13px;
}
.item-book-panel__ci-l {max-width: 76%; line-height: 1.4;}

.item-book-panel__ci-l small {
    display: block;
    margin-top: 4px;
    color: var(--tp-gray);
    font-size: 12px;
}

.item-book-panel__ci-r { font-weight: 600; white-space: nowrap; }

.item-book-panel__ci-x {
    margin-left: 8px;
    border: 0;
    background: none;
    color: var(--tp-disabled);
    font-size: 12px;
    cursor: pointer;
}

.item-book-panel__ci-x:hover { color: var(--tp-sun); }

/* 현장 잔금(예약금 상품) — 온라인 결제액이 아니므로 합계 위에 별도 안내 박스로 분리한다.
   비어 있을 때 자리를 차지하지 않도록 --on 이 붙어야 보인다(JS 가 값이 있을 때만 붙인다). */
.item-book-panel__balance { display: none; }

.item-book-panel__balance--on {
    display: block;
    margin: 10px 0 0;
    padding: 9px 11px;
    border: 1px solid var(--tp-warn-line);
    border-radius: 9px;
    background: var(--tp-warn-bg);
    color: var(--tp-warn-text);
    font-size: 12px;
    line-height: 1.5;
}

/* ===== 합계 · CTA ===== */
.item-book-panel__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 14px 0 4px;
    border-top: 2px solid var(--tp-text);
}

.item-book-panel__total-lbl { font-size: 14px; font-weight: 500; }

.item-book-panel__total-amt { font-size: 24px; font-weight: 700; }
.item-book-panel__total-amt small { font-size: 13px; font-weight: 600; }

.item-book-panel__cta {
    width: 100%;
    margin-top: 16px;
    padding: 16px;
    border: 0;
    border-radius: 8px;
    background: var(--tp-blue);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

.item-book-panel__cta:disabled { background: var(--tp-disabled); cursor: not-allowed; }
.item-book-panel__cta:not(:disabled):hover { background: var(--tp-blue-dark); }

@media (max-width: 780px) {
    .item-book-panel__cta { min-height: 48px; }
    .item-book-panel__cta:active { background: var(--tp-blue-dark); }
}
