/* ===== wrap ===== */
.wrap {
    background-color: var(--color-white);
    padding-bottom: 80px;
}

/* ===== 상세 헤더 ===== */
.detail-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background-color: var(--color-white);
    border-bottom: 1px solid #F0F0F0;
}

.btn-back {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    color: var(--color-text);
    font-weight: 400;
}

.detail-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

.btn-share {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    color: var(--color-text);
}

/* ===== 가맹점 이미지 ===== */
.store-image {
    position: relative;
    height: 220px;
    background-color: var(--color-primary);
    overflow: hidden;
}

.store-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 대표 이미지 갤러리 (여러 장 가로 스와이프) */
.store-gallery {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.store-gallery::-webkit-scrollbar {
    display: none;
}

.store-gallery-slide {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.store-gallery-slide img {
    user-select: none;
    -webkit-user-drag: none;
}

.store-gallery-count {
    position: absolute;
    right: 12px;
    bottom: 14px;
    padding: 3px 9px;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    pointer-events: none;
}

.store-gallery-dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.store-gallery-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: width 0.2s, background-color 0.2s;
}

.store-gallery-dot.active {
    width: 16px;
    background-color: #fff;
}

.store-image-emoji {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ===== 기본 정보 ===== */
.store-info {
    padding: 20px 16px 20px;
    border-bottom: 8px solid var(--color-bg);
}

.store-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 10px;
}

.store-category-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text);
    background-color: var(--color-primary);
    border-radius: 4px;
    padding: 3px 8px;
    margin-bottom: 12px;
}

.store-rating-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #F5A623;
    font-weight: 700;
    margin-bottom: 14px;
}

.store-rating-row .review-count {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 400;
}

.store-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-sub);
    margin-bottom: 9px;
    line-height: 1.5;
}

.store-detail-row:last-child {
    margin-bottom: 0;
}

.store-detail-row .row-text {
    flex: 1;
}

.store-detail-row.clickable {
    cursor: pointer;
    transition: background-color 0.15s;
    margin: 0 -16px 9px;
    padding: 9px 16px;
    border-radius: 0;
    background-color: rgba(255, 214, 10, 0.14);
}

.store-detail-row.clickable:active {
    background-color: rgba(255, 214, 10, 0.28);
}

.store-detail-row.clickable .row-text {
    color: var(--color-text);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--color-primary-dark);
    text-underline-offset: 3px;
}

.store-detail-row.clickable .row-cta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 20px;
    background-color: var(--color-primary);
    color: var(--color-text);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.row-cta-arrow {
    display: inline-block;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-2px);
}

.row-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.row-link {
    color: var(--color-text-sub);
    text-decoration: none;
    flex: 1;
}

.row-link:active {
    color: var(--color-text);
}

/* ===== 탭 메뉴 ===== */
.tab-menu {
    display: flex;
    border-bottom: 1px solid #EEEEEE;
    background-color: var(--color-white);
    position: sticky;
    top: 53px;
    z-index: 90;
}

.tab-menu-item {
    flex: 1;
    padding: 14px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.tab-menu-item.active {
    color: var(--color-text);
    border-bottom: 2px solid var(--color-primary);
}

/* ===== 탭 컨텐츠 ===== */
.tab-content {
    display: none;
    padding: 20px 16px;
}

.tab-content.active {
    display: block;
}

.tab-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--color-text-muted);
    font-size: 13px;
}

/* ===== 리뷰 카드 ===== */
.store-review-card {
    background-color: var(--color-white);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.store-review-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.store-review-nickname {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.store-review-grade {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
    padding: 2px 7px;
    border-radius: 9px;
    background-color: #FFF9D6;
    color: var(--color-text-sub);
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}

.store-review-stars {
    font-size: 13px;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.store-review-stars .empty {
    color: #DDDDDD;
}

.store-review-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.store-review-date {
    font-size: 12px;
    color: var(--color-text-muted);
}

.store-review-report {
    background: none;
    border: none;
    padding: 2px 0 2px 8px;
    font-size: 12px;
    color: var(--color-text-muted);
    cursor: pointer;
}

/* ===== 리뷰 신고 바텀시트 (오버레이·시트는 길찾기 시트 클래스 재사용) ===== */
#reportSheetOverlay .location-sheet {
    max-height: 90vh;
    overflow-y: auto;
}

.report-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

.report-reason {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background-color: var(--color-bg);
    font-size: 14px;
    color: var(--color-text);
    cursor: pointer;
}

.report-reason input {
    accent-color: #1A1A1A;
    margin: 0;
}

.report-detail {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
}

.report-submit {
    margin-top: 4px;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background-color: var(--color-primary);
    color: #1A1A1A;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.report-submit:disabled {
    opacity: 0.6;
}

.store-review-content {
    font-size: 14px;
    color: var(--color-text-sub);
    line-height: 1.5;
}

.store-review-photos {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.store-review-photo {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
}

/* ===== 쿠폰 카드 (상세용) ===== */
.detail-coupon-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ===== 제휴 혜택(패키지 쿠폰) ===== */
.detail-package-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #EEEEEE;
}

.detail-package-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 12px;
}

.detail-package-card {
    position: relative;
    background: linear-gradient(135deg, #2A2A3D 0%, #3D2E5C 100%);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.detail-package-card:active {
    transform: scale(0.98);
}

.detail-package-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 214, 10, 0.14);
}

.detail-package-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.detail-package-partner {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: #1a1a1a;
    background-color: var(--color-primary);
    border-radius: 20px;
    padding: 3px 10px;
}

.detail-package-arrow {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.detail-package-benefit {
    position: relative;
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.3;
    margin-bottom: 4px;
}

.detail-package-notice {
    position: relative;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.65);
}

.detail-coupon-card {
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.09), inset 0 0 0 1.5px #E8C94A;
    background-color: var(--color-white);
}

.detail-coupon-upper {
    background-color: #FFF8D6;
    border-radius: 12px 12px 0 0;
    padding: 18px 18px 16px;
}

.detail-coupon-upper .detail-coupon-name {
    color: #B8860B;
}

.detail-coupon-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 4px;
}

.detail-coupon-benefit {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    opacity: 0.9;
    margin-bottom: 4px;
}

.detail-coupon-condition {
    font-size: 12px;
    color: var(--color-text);
    opacity: 0.65;
}

.detail-coupon-issue-info {
    font-size: 11px;
    color: var(--color-text);
    opacity: 0.5;
    margin-top: 6px;
}

.detail-coupon-divider {
    height: 1px;
    margin: 0 14px;
    border-top: 1.5px dashed #D0D0D0;
    position: relative;
}

.detail-coupon-divider::before,
.detail-coupon-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-color: var(--color-bg);
    border-radius: 50%;
}

.detail-coupon-divider::before { left: -22px; }
.detail-coupon-divider::after  { right: -22px; }

.detail-coupon-lower {
    padding: 14px 18px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-coupon-expire {
    font-size: 12px;
    color: var(--color-text-muted);
}

.btn-coupon-receive {
    padding: 9px 20px;
    background-color: var(--color-primary);
    color: var(--color-text);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-coupon-receive:active { opacity: 0.8; }

.btn-coupon-receive:disabled {
    background-color: #CBD5E1;
    color: var(--color-white);
    cursor: not-allowed;
}

/* ===== 정보 탭 ===== */
.info-section { margin-bottom: 22px; }

.info-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 10px;
}

.info-desc {
    font-size: 13px;
    color: var(--color-text-sub);
    line-height: 1.75;
    white-space: pre-line;
    overflow-wrap: anywhere; /* 긴 URL 이 430px 폭을 넘지 않게 */
}

.info-desc-link {
    color: #1a73e8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.store-detail-row.clickable.info-address-row {
    margin-top: 14px;
}

.store-map {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-bg);
}

.map-placeholder {
    height: 120px;
    background-color: var(--color-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* ===== 길찾기 바텀시트 ===== */
.location-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    align-items: flex-end;
    justify-content: center;
}

.location-sheet-overlay.active {
    display: flex;
}

.location-sheet {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 0 0 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.location-sheet-overlay.active .location-sheet {
    transform: translateY(0);
}

.location-sheet-handle {
    width: 40px;
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    margin: 12px auto 0;
}

.location-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 4px;
}

.location-sheet-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

.location-sheet-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.location-sheet-address {
    padding: 4px 20px 16px;
    font-size: 13px;
    color: var(--color-text-sub);
    line-height: 1.5;
}

.location-sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

.loc-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.loc-action-btn:active {
    background-color: #ECECEC;
}

.loc-action-btn.kakao      { background-color: #FEE500; }
.loc-action-btn.kakao-nav  { background-color: #FFD60A; }
.loc-action-btn.naver      { background-color: #03C75A; color: #fff; }

.loc-action-icon {
    font-size: 18px;
    line-height: 1;
}

.loc-action-close {
    margin-top: 6px;
    padding: 14px 16px;
    background: none;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-sub);
    cursor: pointer;
}

.loc-action-close:active {
    background-color: var(--color-bg);
}
