/* ===============================
   Product Detail Page CSS (FINAL)
   =============================== */


/* ==================================================
   ✅ 리뷰 이미지 확대 모달 (Swiper 완전 분리)
   ================================================== */

.review-image-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;

    background: rgba(0, 0, 0, 0.7);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;
    cursor: zoom-out;
}

/* ✅ 줌 대응 최종 핵심 */
.review-image-modal img {
    /* 1️⃣ 화면 기준 */
    max-width: 90vw;
    max-height: 85vh;

    /* 2️⃣ 절대 상한선 (줌 무력화 핵심) */
    width: auto;
    height: auto;
    max-width: 900px;      /* ✅ PC에서 절대 이 이상 안 큼 */
    max-height: 700px;     /* ✅ 세로도 하드 컷 */

    object-fit: contain;

    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* ✅ 혹시 모를 내부 요소 강제 제한 (보험용) */
.review-image-modal * {
    max-width: 100%;
    max-height: 100%;
}



/* ==================================================
   ✅ 전체 컨테이너
   ================================================== */

.product-detail {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 80px;

    font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    background: #fff;

    min-height: 100vh;
    box-sizing: border-box;

    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}



/* ==================================================
   ✅ 상품 이미지 Swiper
   ================================================== */

.product-image-wrapper-fixed {
    width: 100%;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-swiper,
.product-image-swiper .swiper-wrapper,
.product-image-swiper .swiper-slide {
    width: 100%;
    height: 100%;
}

.slide-img-box {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-img-box img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    max-height: 360px;   /* ✅ PC에서 강제 제한 */
}

/* ✅ 모바일 비율 */
@media (max-width: 480px) {
    .product-image-wrapper-fixed {
        height: 70vw;
        max-height: 360px;
    }
}

/* ✅ Swiper 페이지네이션 */
.swiper-pagination-fraction {
    position: absolute !important;
    bottom: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;

    background: rgba(200, 200, 200, 0.8);
    color: #333;

    padding: 3px 10px;
    border-radius: 12px;

    font-size: 13px;
    font-weight: bold;
}



/* ==================================================
   ✅ 상품 정보
   ================================================== */

.product-info h2 {
    margin-left: 8px;
}

.product-info .price,
.product-info .description {
    margin-left: 8px;
}

.product-info .price {
    font-size: 20px;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 10px;
}

.product-info .description {
    font-size: 14px;
    color: #555;
}



/* ==================================================
   ✅ 업체 프로필
   ================================================== */

.product-shop {
    display: flex;
    align-items: center;
    padding: 12px 16px;

    background: #fff;
    border-top: 8px solid #f5f5f5;
    border-bottom: 1px solid #eee;
}

.product-shop .shop-link {
    display: flex;
    align-items: center;
    width: 100%;

    color: inherit;
    text-decoration: none;
}

.shop-logo {
    width: 48px;
    height: 48px;

    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.shop-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-text h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

.shop-text p {
    margin-top: 2px;
    font-size: 13px;
    color: #666;
}

.shop-text .contact {
    color: #d63384;
    font-weight: 500;
}



/* ==================================================
   ✅ 탭 메뉴
   ================================================== */

.detail-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
    margin-bottom: 12px;
}

.tab-btn {
    flex: 1;
    padding: 12px;

    border: none;
    background: none;
    cursor: pointer;

    font-weight: bold;
    font-size: 14px;
    color: #555;

    transition: background 0.2s;
}

.tab-btn:hover {
    background: #f1f1f1;
}

.tab-btn.active {
    border-bottom: 2px solid #007bff;
    color: #007bff;
    background: #fff;
}



/* ==================================================
   ✅ 함께 본 상품
   ================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 16px 100px;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 320px;

    background: #fff;
    border-radius: 12px;
    overflow: hidden;

    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.product-card:hover {
    transform: scale(1.02);
}



/* ==================================================
   ✅ 리뷰 요약
   ================================================== */

.product-rating {
    font-size: 12px;
    color: #555;

    display: flex;
    align-items: center;
    gap: 2px;

    margin-top: auto;
}

.rating-star {
    color: #ffb400;
}

.rating-value {
    font-weight: 600;
}

.review-count {
    color: #777;
}
