/* =============================================================
   상품 상세 페이지 전용 스타일
   레퍼런스: tamushin-q.co.kr/product/...
============================================================= */

/* ─── 브레드크럼 ─── */
.sp-breadcrumb {
    background: #f7f7f7;
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
}
.sp-breadcrumb-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}
.sp-breadcrumb .woocommerce-breadcrumb {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
}
.sp-breadcrumb .woocommerce-breadcrumb a {
    color: var(--color-text-muted);
}
.sp-breadcrumb .woocommerce-breadcrumb a:hover {
    color: var(--color-primary);
}


/* ─── 상품 메인 레이아웃 ─── */
.sp-main {
    padding: 48px 0 64px;
}
.sp-main-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 56px;
    align-items: flex-start;
}


/* ─── 이미지 갤러리 ─── */
.sp-gallery {
    flex: 0 0 480px;
    max-width: 480px;
}
.sp-gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: #f9f9f9;
}
.sp-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.sp-gallery-main:hover .sp-main-img {
    transform: scale(1.03);
}
.sp-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.sp-gallery-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
}
.sp-gallery-thumb.is-active,
.sp-gallery-thumb:hover {
    border-color: var(--color-primary);
}


/* ─── 상품 정보 ─── */
.sp-info {
    flex: 1;
    min-width: 0;
}

/* 리뷰 평점 */
.sp-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.sp-stars {
    display: flex;
    gap: 2px;
}
.sp-star {
    font-size: 18px;
    color: #ddd;
}
.sp-star--on {
    color: #F5A623;
}
.sp-rating-score {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}
.sp-rating-count {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* 실시간 뷰어 */
.sp-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff4f4;
    border: 1px solid #ffcccc;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    color: #c0392b;
    margin-bottom: 16px;
}
.sp-live-dot {
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    animation: sp-pulse 1.6s infinite;
    flex-shrink: 0;
}
@keyframes sp-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
.sp-live-count {
    font-weight: 800;
    color: #c0392b;
}

/* 상품명 */
.sp-product-name {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.5px;
    color: var(--color-navy);
    margin-bottom: 20px;
}

/* 특징 체크리스트 */
.sp-features {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sp-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}
.sp-feature-check {
    color: var(--color-primary);
    font-weight: 800;
    flex-shrink: 0;
    font-size: 15px;
}

/* 구분선 */
.sp-divider {
    height: 1px;
    background: var(--color-border);
    margin: 20px 0;
}

/* 가격 */
.sp-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.sp-price-original {
    font-size: 16px;
    color: #aaa;
    text-decoration: line-through;
}
.sp-discount-rate {
    font-size: 22px;
    font-weight: 800;
    color: #e74c3c;
}
.sp-price-sale {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-navy);
    letter-spacing: -0.5px;
}

/* 배송비 */
.sp-shipping,
.sp-installment {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--color-text);
    margin-bottom: 8px;
}
.sp-shipping-label,
.sp-installment-label {
    color: var(--color-text-muted);
    min-width: 72px;
    flex-shrink: 0;
}
.sp-shipping-free {
    color: var(--color-text-muted);
    font-size: 13px;
}

/* 옵션 */
.sp-option {
    margin-bottom: 16px;
}
.sp-option-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}
.sp-option-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 15px;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.sp-option-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* 수량 */
.sp-qty-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}
.sp-qty-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
    font-weight: 300;
    color: var(--color-text);
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1;
}
.sp-qty-btn:hover {
    background: var(--color-border);
}
.sp-qty-input {
    width: 60px;
    height: 44px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    font-family: var(--font-sans);
}
.sp-qty-input:focus { outline: none; }

/* CTA 버튼 */
.sp-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.sp-btn {
    flex: 1;
    padding: 16px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.sp-btn-cart {
    background: #fff;
    color: var(--color-navy);
    border: 2px solid var(--color-navy);
}
.sp-btn-cart:hover {
    background: var(--color-navy);
    color: #fff;
}
.sp-btn-buy {
    background: var(--color-primary);
    color: #fff;
    border: 2px solid var(--color-primary);
}
.sp-btn-buy:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* 상품 설명 (info 하단) */
.sp-desc {
    margin-top: 24px;
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.8;
}


/* ─── 탭 섹션 ─── */
.sp-tabs-section {
    border-top: 1px solid var(--color-border);
    padding: 0 0 80px;
}
.sp-tabs-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}
.sp-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 40px;
}
.sp-tab-btn {
    padding: 18px 32px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
}
.sp-tab-btn.is-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.sp-tab-content {
    display: none;
}
.sp-tab-content.is-active {
    display: block;
}
.sp-long-desc {
    line-height: 1.9;
    font-size: 15px;
    color: #444;
}
.sp-long-desc img {
    max-width: 100%;
    width: 100%;
    display: block;
    margin: 0 auto;
}
.sp-no-content {
    color: var(--color-text-muted);
    font-size: 15px;
    padding: 40px 0;
    text-align: center;
}


/* ─── 반응형 ─── */
@media (max-width: 1024px) {
    .sp-gallery {
        flex: 0 0 380px;
        max-width: 380px;
    }
    .sp-main-inner {
        gap: 36px;
    }
}

@media (max-width: 768px) {
    .sp-main-inner {
        flex-direction: column;
        gap: 24px;
    }
    .sp-gallery {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
    .sp-product-name {
        font-size: 22px;
    }
    .sp-price-sale {
        font-size: 24px;
    }
    .sp-actions {
        flex-direction: column;
    }
    .sp-tab-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
}
