/* ==========================================================================
   hs-item.css — 상품 상세(item.php) 공용 스타일 (2026-09-22, PC·모바일 같은 파일)
     .hs-modal          모달(로그인 안내·유입 계산 방법)
     .hs-guest-price    비회원 가격 자리('회원가 전용' 카드)
     .hs-days           구매 수량(하루 유입량 × 진행 일수)
   ⚠ 규칙은 위 클래스 안에서만 먹는다.
   ========================================================================== */

html.hs-modal-open, html.hs-modal-open body { overflow: hidden; }

/* ── 버튼 공용 ──────────────────────────────────────────────────────────── */
.hs-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.hs-btn-red { border: 0; background: #e63946; color: #fff !important; }
.hs-btn-red:hover { background: #cf2b38; }
.hs-btn-line { border: 1.5px solid #e5e7eb; background: #fff; color: #111827 !important; }
.hs-btn-line:hover { border-color: #d1d5db; background: #f9fafb; }
.hs-btn-kakao { border: 0; background: #fee500; color: #3c1e1e !important; }
.hs-btn-kakao:hover { background: #f5dc00; }

/* ── 모달 ──────────────────────────────────────────────────────────────── */
.hs-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 24, 39, .55);
    animation: hs-fade .15s ease;
}
.hs-modal[hidden] { display: none; }
@keyframes hs-fade { from { opacity: 0; } to { opacity: 1; } }
.hs-modal-card {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px 26px 24px;
    border-radius: 20px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
    word-break: keep-all;
    box-shadow: 0 24px 60px rgba(17, 24, 39, .25);
    animation: hs-pop .18s ease;
}
@keyframes hs-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.hs-modal-card * { box-sizing: border-box; }
.hs-modal-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9ca3af;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.hs-modal-x:hover { background: #f3f4f6; color: #111827; }
.hs-modal-title { margin: 0 0 8px; color: #111827; font-size: 20px; font-weight: 800; letter-spacing: -0.4px; }
.hs-modal-lead { margin: 0 0 18px; color: #4b5563; font-size: 14.5px; }
.hs-modal-lead b { color: #111827; }
.hs-modal-ok {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 18px;
    border: 0;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

/* 로그인 안내 */
.hs-login-card { text-align: center; }
.hs-login-card .hs-modal-lead { margin-bottom: 22px; }
.hs-login-card .hs-btn + .hs-btn { margin-top: 8px; }
.hs-login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 4px auto 14px;
    border-radius: 50%;
    background: #fdecee;
    color: #e63946;
}
.hs-login-icon svg { width: 26px; height: 26px; }
.hs-login-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; color: #9ca3af; font-size: 12.5px; }
.hs-login-or::before, .hs-login-or::after { content: ""; flex: 1; height: 1px; background: #e5e7eb; }

/* ── 비회원 가격 자리 ───────────────────────────────────────────────────── */
.hs-guest-price {
    box-sizing: border-box;
    margin: 4px 0;
    padding: 16px 18px;
    border: 1px solid #fbd5d9;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 70%);
    text-align: left;
    word-break: keep-all;
}
.hs-guest-price * { box-sizing: border-box; }
.hs-guest-price .hgp-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.hs-guest-price .hgp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e63946;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.hs-guest-price .hgp-badge svg { width: 12px; height: 12px; }
.hs-guest-price .hgp-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
}
.hs-guest-price .hgp-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9ca3af; }
.hs-guest-price .hgp-price { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 6px; }
.hs-guest-price .hgp-blur {
    color: #111827;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    filter: blur(7px);
    user-select: none;
}
.hs-guest-price .hgp-vat { color: #9ca3af; font-size: 12px; }
.hs-guest-price .hgp-text { margin: 0 0 14px; color: #4b5563; font-size: 13.5px; line-height: 1.6; }
.hs-guest-price .hgp-text b { color: #111827; }
.hs-guest-price .hgp-btns { display: flex; gap: 8px; }
.hs-guest-price .hgp-btns .hs-btn { height: 44px; font-size: 14px; border-radius: 10px; }
.hs-guest-price .hgp-btns .hs-btn-red { flex: 1.6; }
.hs-guest-price .hgp-btns .hs-btn-line { flex: 1; }

/* ── 구매 수량(하루 유입량 × 진행 일수) ─────────────────────────────────── */
.hs-days {
    box-sizing: border-box;
    margin: 14px 0;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    text-align: left;
    word-break: keep-all;
}
.hs-days * { box-sizing: border-box; }
.hs-days .hd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hs-days .hd-title { color: #111827; font-size: 16px; font-weight: 800; }
.hs-days .hd-help {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 11px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.hs-days .hd-help span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e63946;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}
.hs-days .hd-help:hover { border-color: #e63946; color: #e63946; }
.hs-days .hd-field + .hd-field { margin-top: 16px; }
.hs-days .hd-label { margin-bottom: 8px; color: #111827; font-size: 13.5px; font-weight: 700; }
.hs-days .hd-label small { margin-left: 4px; color: #9ca3af; font-size: 12px; font-weight: 500; }

.hs-days .hd-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hs-days .hd-seg button,
.hs-days .hd-chips button {
    height: 40px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .12s ease;
}
.hs-days .hd-seg button:hover,
.hs-days .hd-chips button:hover { border-color: #d1d5db; color: #111827; }
.hs-days .hd-seg button.is-on,
.hs-days .hd-chips button.is-on { border-color: #e63946; background: #fdecee; color: #cf2b38; font-weight: 800; }

.hs-days .hd-days-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hs-days .hd-chips { display: flex; gap: 6px; }
.hs-days .hd-chips button { padding: 0 12px; }
.hs-days .hd-stepper {
    display: inline-flex;
    align-items: center;
    height: 40px;
    margin-left: auto;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.hs-days .hd-stepper button {
    width: 38px;
    height: 100%;
    border: 0;
    background: #f9fafb;
    color: #111827;
    font-size: 18px;
    cursor: pointer;
}
.hs-days .hd-stepper button:disabled { color: #d1d5db; cursor: not-allowed; }
.hs-days .hd-stepper input {
    width: 46px;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: #fff;
    color: #111827;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
}
.hs-days .hd-stepper input:focus { outline: none; background: #fff7f7; }
.hs-days .hd-unit { padding: 0 8px 0 3px; color: #6b7280; font-size: 14px; }

.hs-days .hd-summary {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f9fafb;
}
.hs-days .hd-calc { color: #4b5563; font-size: 14px; }
.hs-days .hd-calc b { color: #111827; }
.hs-days .hd-calc strong { color: #e63946; font-weight: 800; }
.hs-days .hd-total {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
    color: #6b7280;
    transition: opacity .15s ease;
}
.hs-days .hd-total.is-loading { opacity: .5; }
.hs-days .hd-total-label { color: #111827; font-size: 14px; font-weight: 700; }
.hs-days .hd-total strong { margin-left: auto; color: #e63946; font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.hs-days .hd-vat { flex-basis: 100%; color: #9ca3af; font-size: 12.5px; text-align: right; }
.hs-days .hd-err { color: #cf2b38; font-size: 13px; font-weight: 600; }
.hs-days .hd-note {
    margin: 10px 0 0;
    padding: 9px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #fbd5d9;
    color: #4b5563;
    font-size: 12.5px;
    line-height: 1.6;
}
.hs-days .hd-note b { color: #cf2b38; }
.hs-days .hd-note[hidden] { display: none; }

/* 유입 계산 방법(모달 안) */
.hd-formula {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff5f5;
    border: 1px solid #fbd5d9;
    color: #374151;
    font-size: 15px;
    text-align: center;
}
.hd-formula b { color: #e63946; }
.hd-ex { width: 100%; margin: 0 0 14px; border-collapse: collapse; font-size: 13px; }
.hd-ex th { padding: 8px 6px; border-bottom: 1.5px solid #111827; color: #111827; font-weight: 700; text-align: left; }
.hd-ex td { padding: 8px 6px; border-bottom: 1px solid #f3f4f6; color: #4b5563; }
.hd-ex td:last-child, .hd-ex th:last-child { text-align: right; }
.hd-ex td:last-child { color: #111827; font-weight: 700; }
.hd-points { margin: 0; padding: 0 0 0 16px; color: #4b5563; font-size: 13px; line-height: 1.7; }
.hd-points li + li { margin-top: 4px; }
.hd-points b { color: #111827; }

@media (max-width: 560px) {
    .hs-modal { align-items: flex-end; padding: 0; }
    .hs-modal-card { max-width: none; max-height: 88vh; padding: 26px 20px 22px; border-radius: 20px 20px 0 0; animation: hs-up .2s ease; }
    @keyframes hs-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
    .hs-days { padding: 16px; }
    .hs-days .hd-stepper { margin-left: 0; }
    .hs-days .hd-days-row { justify-content: space-between; }
    .hs-guest-price .hgp-btns { flex-direction: column; }
}
