/* ============================================
   product_view.css  — 전체
============================================ */

/* ── 기본 레이아웃 ── */
.prd-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* ── 상단: 이미지 + 정보 ── */
.prd-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
}
@media (max-width: 860px) {
    .prd-top { grid-template-columns: 1fr; gap: 28px; }
}

/* 이미지 */
.prd-image {
    /* position: sticky; */
    top: 80px;
}
.prd-image img {
    width: 100%;
    border-radius: 16px;
    display: block;
    object-fit: contain;
    aspect-ratio: 1 / 1;
    background: #f9fafb;
}
.prd-no-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #9ca3af;
    gap: 10px;
    font-size: 13px;
}

/* 정보 */
.prd-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.prd-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.prd-cat {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.prd-title {
    font-size: 26px;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}
.share-btn {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s, color 0.15s;
}
.share-btn:hover { border-color: #111; color: #111; }
.share-btn svg   { width: 18px; height: 18px; }

.prd-sub {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 6px;
}

/* 가격 */
.prd-price-wrap { margin: 14px 0 0; }
.prd-price-origin {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-bottom: 4px;
}
.prd-price-sale {
    font-size: 28px;
    font-weight: 800;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.prd-price-normal {
    font-size: 28px;
    font-weight: 800;
    color: #111;
}
.prd-discount {
    font-size: 13px;
    font-weight: 700;
    color: #ef4444;
    background: #fef2f2;
    padding: 3px 9px;
    border-radius: 6px;
}
.prd-vat {
    font-size: 12px;
    color: #9ca3af;
    margin: 6px 0 0;
}
.prd-stock-warn  { font-size: 12px; color: #f59e0b; margin-left: 10px; }
.prd-stock-empty { font-size: 12px; color: #ef4444; margin-left: 10px; font-weight: 700; }

/* 구분선 */
.line {
    border: none;
    border-top: 1px solid #f3f4f6;
    margin: 18px 0;
}

/* 수량 행 */
.prd-row {
    display: flex;
    align-items: center;
    gap: 20px;
}
.prd-row .left {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    min-width: 46px;
}
.prd-row .right {
    display: flex;
    align-items: center;
    flex: 1;
}

.qty-box {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.qty-box button {
    width: 40px;
    height: 40px;
    border: none;
    background: #fff;
    font-size: 18px;
    cursor: pointer;
    color: #374151;
    transition: background 0.15s;
    flex-shrink: 0;
}
.qty-box button:hover { background: #f3f4f6; }
.qty-box input {
    width: 56px;
    text-align: center;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    padding: 0;
    height: 40px;
    outline: none;
    background: #fff;
}

/* 합계 */
.prd-total {
    font-size: 24px;
    font-weight: 800;
    color: #111;
}

/* 버튼 영역 */
.prd-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}
.btn-wish {
    width: 48px;
    height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s;
}
.btn-wish:hover { border-color: #ef4444; }
.btn-wish svg   { width: 22px; height: 22px; }
.btn-wish.wished svg path { fill: #ef4444; stroke: #ef4444; }

.btn-cart {
    flex: 1;
    height: 52px;
    border: 2px solid #111;
    background: #fff;
    color: #111;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-cart:hover { background: #111; color: #fff; }
.btn-cart:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-buy {
    flex: 1;
    height: 52px;
    border: none;
    background: #111;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-buy:hover   { background: #333; }
.btn-buy:disabled{ opacity: 0.4; cursor: not-allowed; }

.btn-inquiry {
    flex: 1;
    height: 52px;
    border: none;
    background: #111;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
}
.btn-inquiry:hover { background: #333; }

/* ── 탭 ── */
.prd-tabs {
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 50;
    margin-bottom: 0;
}
.tabs-inner {
    display: flex;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.tab-link {
    padding: 16px 24px;
    font-size: 20px;
    font-weight: 600;
    color: #9ca3af;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.tab-link:hover  { color: #111; }
.tab-link.active { color: #111; border-bottom-color: #111; }

/* ── 섹션 공통 ── */
.prd-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px;
    border-bottom: 1px solid #f3f4f6;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.section-head h2 {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin: 0;
}
.sec-buttons {
    display: flex;
    gap: 8px;
}
.btn-light {
    padding: 7px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: #374151;
    transition: background 0.15s;
}
.btn-light:hover { background: #f9fafb; }
.btn-dark {
    padding: 7px 14px;
    border: none;
    border-radius: 7px;
    background: #111;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-dark:hover { background: #333; }

.detail-box img { max-width: 100%; height: auto; }
.empty {
    text-align: center;
    padding: 48px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* ── 문의 폼 ── */
.inquiry-form { max-width: 720px; margin-top: 24px; }
.inq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) { .inq-grid { grid-template-columns: 1fr; }
                          .prd-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px 80px;
}
                          }
.inq-group      { display: flex; flex-direction: column; gap: 6px; }
.inq-group.full { grid-column: 1 / -1; }
.inq-group label { font-size: 13px; font-weight: 600; color: #374151; }
.inq-group input,
.inq-group textarea {
    padding: 10px 13px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
    background: #fff;
}
.inq-group input:focus,
.inq-group textarea:focus { border-color: #111; }
.inq-group textarea { resize: vertical; }
.inq-agree {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
}
.inq-agree a { color: #111; }
.req { color: #ef4444; }
.inq-submit { margin-top: 18px; }
.btn-inq-submit {
    display: inline-flex;
    align-items: center;
    padding: 13px 32px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.btn-inq-submit:hover { background: #333; }

.inquiry-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 14px 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}
.inquiry-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 14px 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ── 장바구니 팝업 ── */
.cart-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-dim {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.cart-popup-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    text-align: center;
    min-width: 300px;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: popIn 0.2s ease;
}
@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.cart-popup-icon { margin-bottom: 14px; }
.cart-popup-msg  { font-size: 16px; font-weight: 600; color: #111; margin-bottom: 20px; }
.cart-popup-btns { display: flex; gap: 10px; }
.btn-continue {
    flex: 1;
    padding: 11px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
}
.btn-go-cart {
    flex: 1;
    padding: 11px;
    background: #111;
    color: #fff;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* ── 용량/포장 라벨 (제품명과 설명 사이, 별도 라인) ── */
.prd-unit {
    display: inline-block;
    margin: 8px 0 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    letter-spacing: 0.3px;
}
@media (max-width: 480px) {
    .prd-unit { font-size: 11px; padding: 3px 8px; }
}
