/* 상품 상세 페이지 전용 */

.product-image-gallery {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
}

/* 황금비 φ ≈ 1.618 — 좌(메인) : 우(보조열) = φ : 1 (약 61.8% : 38.2%) */
.image-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr);
    /* 우측 열 상·하 = 1 : φ (위쪽이 더 작고 아래가 더 길게) */
    grid-template-rows: minmax(0, 1fr) minmax(0, 1.618fr);
    gap: 10px;
    width: 100%;
    min-height: 320px;
    height: clamp(340px, 38vw, 540px);
}

.image-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    min-height: 0;
}

.image-grid-item:first-child {
    grid-row: span 2;
    grid-column: 1;
}

.image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-grid-item:hover img {
    transform: scale(1.05);
}

.view-all-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: white;
    color: #1e293b;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.view-all-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark .view-all-btn {
    background: #1e293b;
    color: white;
    border-color: #334155;
}

.dark .view-all-btn:hover {
    background: #334155;
}

/* 전체보기 모달 */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    padding: 20px;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
}

.gallery-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: white;
    color: #1e293b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    z-index: 10;
}

.gallery-modal-close:hover {
    background: #f1f5f9;
}

@media (max-width: 768px) {
    .image-grid {
        /* 모바일: 세로 스택 (황금비 2열은 좁아서 어색함) */
        grid-template-columns: 1fr;
        grid-template-rows: minmax(200px, 52vw) minmax(140px, 36vw) minmax(140px, 36vw);
        height: auto;
        min-height: 0;
        gap: 6px;
    }

    .image-grid-item:first-child {
        grid-row: auto;
    }

    .view-all-btn {
        padding: 8px 16px;
        font-size: 12px;
        bottom: 12px;
        right: 12px;
    }
}

.product-tab-content {
    display: block !important;
}

.product-tab-content + .product-tab-content {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgb(226 232 240);
}

.dark .product-tab-content + .product-tab-content {
    border-top-color: rgb(51 65 85);
}

.product-tab-btn {
    position: relative;
    padding: 16px 24px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

.product-tab-btn.active {
    color: #007ACC;
    border-bottom-color: #007ACC;
}

.sticky-booking {
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

.sticky-tab-menu {
    position: sticky;
    top: 64px;
    z-index: 40;
    background: white;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.dark .sticky-tab-menu {
    background: #111827;
}

.sticky-tab-menu > div {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sticky-tab-menu > div::-webkit-scrollbar {
    display: none;
}

@media (max-width: 1024px) {
    .sticky-booking {
        position: relative;
        top: 0;
    }

    .sticky-tab-menu {
        top: 64px;
    }
}

.review-star {
    color: #e10000;
}

.tag-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.dark .tag-badge {
    background: #1e293b;
    color: #94a3b8;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #007ACC;
}

.dark .info-icon {
    background: #1e293b;
}

.price-strike {
    text-decoration: line-through;
    color: #94a3b8;
}

.gallery-swiper .swiper-slide {
    width: 100% !important;
}

/* 이미지 1~2장일 때 그리드 단순화 */
.image-grid.image-grid--1 {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(260px, 52vh);
    min-height: 260px;
    height: auto;
}

.image-grid.image-grid--1 .image-grid-item:first-child {
    grid-row: 1;
    grid-column: 1;
}

.image-grid.image-grid--2 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(220px, 42vh);
    min-height: 220px;
    height: auto;
}

.image-grid.image-grid--2 .image-grid-item:first-child {
    grid-row: 1;
    grid-column: 1;
}

.image-grid.image-grid--2 .image-grid-item:nth-child(2) {
    grid-row: 1;
    grid-column: 2;
}

.product-guide-content {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.65;
}

/* API에서 내려오는 HTML 본문 (guides 등) */
.prose-product-html img,
.product-guide-body img {
    max-width: 100%;
    height: auto;
}

/* 우측 예약 패널 (운영 product.view 우측박스 스타일) */
.product-sidebar-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.product-sidebar-badge-ticket {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
}

.product-sidebar-badge-coupon {
    background: #fff;
    color: #e10000;
    border-color: #e10000;
}

.product-sidebar-badge-img {
    height: 22px;
    width: auto;
    vertical-align: middle;
}

.product-sidebar-price-before {
    font-size: 15px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.product-sidebar-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
}

.product-sidebar-price-label {
    font-size: 13px;
    font-weight: 600;
    color: #007ACC;
}

.product-sidebar-price-main {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.dark .product-sidebar-price-main {
    color: #f8fafc;
}

.product-sidebar-price-unit,
.product-sidebar-price-from {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.dark .product-sidebar-price-unit,
.dark .product-sidebar-price-from {
    color: #cbd5e1;
}

.product-sidebar-price-percent {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #007ACC;
    font-size: 13px;
    font-weight: 700;
}

.product-sidebar-price-percent .material-icons-round {
    font-size: 16px;
}

.product-sidebar-coupon-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(90deg, #fff7ed, #ffedd5);
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
    cursor: pointer;
    text-align: left;
}

#productCouponDownload {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-sidebar-coupon-btn:hover {
    opacity: 0.92;
}

.dark .product-sidebar-coupon-btn {
    background: linear-gradient(90deg, rgba(154, 52, 18, 0.25), rgba(234, 88, 12, 0.15));
    border-color: #9a3412;
    color: #fdba74;
}

.product-partner-card {
    display: block;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.product-partner-card:hover {
    border-color: #007ACC;
    background: #f0f9ff;
}

.dark .product-partner-card {
    border-color: #334155;
    background: #0f172a;
}

.dark .product-partner-card:hover {
    border-color: #38bdf8;
    background: #172554;
}

.product-partner-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.product-partner-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}

.product-partner-img-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #64748b;
}

.product-partner-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.dark .product-partner-name {
    color: #f1f5f9;
}

.product-partner-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.product-partner-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
}

.product-partner-star {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 700;
    color: #f59e0b;
}

.product-partner-star .material-icons-round {
    font-size: 15px;
}

.product-partner-link {
    color: #007ACC;
    font-weight: 600;
    white-space: nowrap;
}

.product-sidebar-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.dark .product-sidebar-total {
    border-top-color: #334155;
}

.product-sidebar-total-label {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.dark .product-sidebar-total-label {
    color: #94a3b8;
}

.product-sidebar-total-price strong {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.dark .product-sidebar-total-price strong {
    color: #f8fafc;
}

.product-sidebar-total-price em {
    font-style: normal;
    font-size: 14px;
    font-weight: 600;
    margin-left: 2px;
    color: #334155;
}

.product-option-select {
    appearance: auto;
}

/* 상품 후기 */
.product-review-write-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid #1e293b;
    background: #fff;
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.product-review-write-btn:hover {
    background: #1e293b;
    color: #fff;
}

.dark .product-review-write-btn {
    border-color: #e2e8f0;
    background: transparent;
    color: #e2e8f0;
}

.dark .product-review-write-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.product-review-score-stars {
    position: relative;
    display: inline-block;
    width: 88px;
    height: 16px;
    vertical-align: middle;
}

.product-review-score-base,
.product-review-score-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
    mask-size: 18px 16px;
    mask-repeat: repeat-x;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
    -webkit-mask-size: 18px 16px;
    -webkit-mask-repeat: repeat-x;
}

.product-review-score-base {
    width: 100%;
    background: #cbd5e1;
}

.product-review-score-fill {
    background: #e10000;
}

.product-review-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 18px;
    background: #fff;
}

.dark .product-review-card {
    border-color: #334155;
    background: #0f172a;
}

.product-review-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.product-review-card-meta {
    font-size: 13px;
    color: #64748b;
}

.product-review-text {
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-word;
}

.dark .product-review-text {
    color: #cbd5e1;
}

.product-review-image-link {
    display: inline-block;
    margin-bottom: 12px;
}

.product-review-image-link img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    object-fit: cover;
}

.product-review-replies {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

.product-review-reply {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    color: #475569;
}

.dark .product-review-reply {
    background: #1e293b;
    color: #94a3b8;
}

.product-review-reply-head {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.product-review-delete {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
    text-decoration: underline;
}

.product-review-page-btn {
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.product-review-page-btn.active {
    border-color: #007ACC;
    background: #007ACC;
    color: #fff;
}

.product-review-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.product-review-modal.hidden {
    display: none;
}

.product-review-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.product-review-modal-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.dark .product-review-modal-panel {
    background: #111827;
}

.product-review-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.product-review-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #64748b;
}

.product-review-modal-close:hover {
    background: #f1f5f9;
}

.product-review-star-picker {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.product-review-star-btn {
    color: #cbd5e1;
    padding: 2px;
}

.product-review-star-btn.active {
    color: #e10000;
}

.prose-product-html table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}

.product-inquiry-btn {
    width: 100%;
    min-height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 15px;
    color: #000;
    background: #f5f5f5;
    border: 1px solid #ddd;
    transition: background 0.2s ease-out, border-color 0.2s ease-out;
}

.product-inquiry-btn:hover {
    background: #ececec;
    border-color: #ccc;
}

.dark .product-inquiry-btn {
    color: #f1f5f9;
    background: #334155;
    border-color: #475569;
}

.dark .product-inquiry-btn:hover {
    background: #3f4f66;
}

.product-chat-btn {
    width: 100%;
    min-height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 15px;
    color: #1e6fb4;
    background: #e1f4ff;
    border: 1px solid #b6dbe8;
    transition: background 0.2s ease-out, border-color 0.2s ease-out;
}

.product-chat-btn .material-icons-round {
    font-size: 18px;
}

.product-chat-btn:hover {
    background: #d4edfc;
    border-color: #9ccde3;
}

.dark .product-chat-btn {
    color: #7dd3fc;
    background: rgba(30, 111, 180, 0.15);
    border-color: rgba(182, 219, 232, 0.35);
}

.dark .product-chat-btn:hover {
    background: rgba(30, 111, 180, 0.25);
}

.product-wish-btn.is-active .product-wish-icon {
    color: #e11d48;
}

.dark .product-wish-btn.is-active .product-wish-icon {
    color: #fb7185;
}

/* 예약하기 → 달력 진입 로딩 (booking.css .v2-loading-center 와 동일) */
.v2-loading-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    align-items: center;
    gap: 16px;
    background: rgba(17, 17, 17, 0.92);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
    padding: 20px 28px;
    border-radius: 16px;
    white-space: nowrap;
    z-index: 99999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.v2-loading-center.show {
    display: inline-flex;
}

.v2-spin {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 4px solid rgba(41, 188, 240, 0.25);
    border-top-color: #29bcf0;
    animation: v2spin 0.7s linear infinite;
    display: inline-block;
    vertical-align: middle;
    flex: 0 0 auto;
}

@keyframes v2spin {
    to {
        transform: rotate(360deg);
    }
}
