:root {
    --bg-main: #fafafa;
    --surface: #ffffff;
    --text-main: #262626;
    --text-muted: #737373;
    --primary: #0095f6;      /* Biru IG */
    --accent: #ff3040;
    --border: #dbdbdb;
    --card-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.main-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* PANEL KIRI */
.left-panel {
    flex: 3;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-right: 1px solid var(--border);
}

#map-container {
    flex: 1;
    position: relative;
    margin: 16px;
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid var(--border);
    z-index: 1; /* Pastikan di bawah modal z-index */
}

#map {
    width: 100%;
    height: 100%;
}

.horizontal-list-container {
    height: 200px;
    background: var(--surface);
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.horizontal-list-container h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.horizontal-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-behavior: smooth;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 5px;
}
.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #e6e6e6;
    border-radius: 10px;
}

.shop-card {
    min-width: 260px;
    max-width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-card:hover, .shop-card.active {
    border-color: #a8a8a8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.shop-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* PANEL KANAN */
.right-panel {
    flex: 1.3;
    min-width: 380px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
}

.store-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

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

.store-desc {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 16px;
}

.rating-box {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
}

.stars {
    color: #ffb400;
}

.reviews-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    overflow: hidden;
}

.reviews-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 18px;
    text-transform: uppercase;
}

.reviews-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reviews-container::-webkit-scrollbar {
    width: 6px;
}
.reviews-container::-webkit-scrollbar-thumb {
    background: #e6e6e6;
    border-radius: 10px;
}

.review-item {
    background: var(--bg-main);
    border-radius: var(--card-radius);
    padding: 14px 16px;
    border: 1px solid var(--border);
}

.review-user {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.review-text {
    font-size: 13px;
    color: #363636;
    line-height: 1.5;
}

/* ==========================================================================
   CSS BARU: INSTAGRAM MODAL POPUP SYSTEM
   ========================================================================== */
.modal-overlay {
    display: none; /* Tersembunyi sebelum dipicu */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65); /* Hitam transparan redup */
    z-index: 9999; /* Lapisan paling atas layar */
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 35px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 300;
}

/* Wadah Utama Frame Gabungan Foto + Deskripsi Komentar */
.modal-content-wrapper {
    display: flex;
    background: var(--surface);
    width: 100%;
    max-width: 935px; /* Standar lebar popup Instagram Web */
    height: calc(100vh - 80px);
    max-height: 600px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0,0,0,0.25);
}

/* Sisi Kiri: Tempat Gambar Penuh */
.modal-left-image {
    flex: 1.2;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-left-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Foto presisi penuh tanpa distorsi/gepeng */
}

/* Sisi Kanan: Panel Info Terpisah */
.modal-right-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
    background: var(--surface);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Tag Tag Harga Khusus */
.price-tag {
    background-color: #fef3c7;
    color: #d97706;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

#modal-rating {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.modal-desc-box {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background-color: #fafafa;
}

.modal-desc-box p {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
}

/* Area Gulung Komentar Pop-up */
.modal-comments-section {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-comments-section h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.modal-comments-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* MEDIA RESPONSIVE */
@media (max-width: 768px) {
    .main-container { flex-direction: column; overflow-y: auto; height: auto; }
    body { overflow: auto; height: auto; }
    .left-panel { height: 65vh; flex: none; border-right: none; }
    .right-panel { height: auto; flex: none; min-width: 100%; }
    
    /* Atur Modal jadi bentuk memanjang ke bawah jika di HP */
    .modal-overlay { padding: 10px; }
    .modal-content-wrapper { flex-direction: column; height: 90vh; max-height: none; }
    .modal-left-image { height: 250px; flex: none; }
}