/* ========== DESIGN TOKENS ========== */
:root {
    --cream: #FAF7F2;
    --cream-dark: #F0EBE3;
    --ink: #1A1814;
    --muted: #7A756D;
    --accent: #C4704A;
    --accent-dark: #A85A38;
    --gold: #D4A853;
    --surface: #FFFFFF;
    --border: rgba(26, 24, 20, 0.1);
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: 'Source Serif 4', Georgia, serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--cream) !important;
    font-family: var(--font-display);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ========== RESTAURANT BANNER ========== */
.restaurant-banner {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 340px;
    max-height: 560px;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
}

.restaurant-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.restaurant-banner:hover img {
    transform: scale(1.03);
}

.overlay1 {
    position: absolute;
    inset: auto 0 0 0;
    height: 60%;
    background: linear-gradient(to top, rgba(26, 24, 20, 0.7), transparent);
    z-index: 1;
}

.overlay2 {
    position: absolute;
    inset: 0 0 auto 0;
    height: 25%;
    background: linear-gradient(to bottom, rgba(26, 24, 20, 0.3), transparent);
    z-index: 1;
}

.restaurant-category {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ========== RESTAURANT HEADER ========== */
.restaurant-body {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
    margin: -3rem auto 0;
    padding: 0 1.5rem;
    max-width: 1100px;
    position: relative;
    z-index: 10;
}

.body-details {
    background: var(--surface);
    border-radius: 20px;
    padding: 1.75rem;
    flex: 1;
    border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(26, 24, 20, 0.08);
}

.restaurant-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.body-details h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.body-details h3 strong {
    color: var(--accent);
    font-weight: 600;
}

.body-details h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    margin-top: 0.5rem;
}

.body-details p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--muted);
    margin-top: 1rem;
}

/* Score Card */
.scorecard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(26, 24, 20, 0.08);
    min-width: 120px;
}

.score-image {
    width: 48px;
    height: 48px;
}

.rest-card-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
}

/* ========== ACTION BUTTONS ========== */
.buttons {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

.restaurant-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.review-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 50px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.review-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 112, 74, 0.25);
}

.activity-btn,
.activity-btn2 {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    padding: 0.65rem 1.25rem;
    border-radius: 50px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.activity-btn:hover,
.activity-btn2:hover {
    background: var(--cream);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.button-logo {
    width: 18px;
    height: 18px;
}

/* ========== SECTION HEADERS ========== */
.store-information-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    margin: 2.5rem auto 1rem;
    max-width: 1100px;
}

.store-information-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.photos,
.rest-reviews,
.ratings,
.menu {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========== PHOTOS SECTION ========== */
.restaurant-photos {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0 1rem;
    scrollbar-width: none;
}

.restaurant-photos::-webkit-scrollbar {
    display: none;
}

.image-wrapper {
    flex: 0 0 240px;
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(26, 24, 20, 0.06);
    scroll-snap-align: start;
}

.review-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-wrapper:hover .review-photo-img {
    transform: scale(1.05);
}

.photo-description {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
}

.favorite-badge {
    color: var(--gold);
}

.view-more-button {
    flex: 0 0 180px;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 2px dashed var(--border);
    background: var(--cream);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-more-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.no-data-load,
.no-data-load2 {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
    font-family: var(--font-body);
    font-style: italic;
}

/* ========== REVIEWS SECTION ========== */
.rest-reviews {
    margin: 2rem auto;
}

.review-header {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 1rem;
}

#best-reviews {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reviews-cards-profile {
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(26, 24, 20, 0.05);
    transition: all 0.25s ease;
}

.reviews-cards-profile:hover {
    box-shadow: 0 12px 40px rgba(26, 24, 20, 0.1);
}

.review-row-first {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.review-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.dp-cards-container {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--cream);
    border: 2px solid var(--border);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cards-username a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s;
}

.cards-username a:hover {
    color: var(--accent);
}

.cards-username p {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: var(--muted);
}

/* Review Score Ring */
.review-card-score {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: conic-gradient(var(--accent) 0deg, var(--gold) 360deg);
    position: relative;
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
}

.review-card-score::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--surface);
    border-radius: 50%;
}

.review-card-score span {
    position: relative;
    z-index: 1;
}

.reviews-card-details {
    margin: 1rem 0 0.75rem;
}

.review-notes {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
}

/* Review Images */
.review-card-image-container-profile {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.review-card-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.review-card-image:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(26, 24, 20, 0.1);
}

/* Review Meta */
.additional-details {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.experience-type,
.budget-per-person,
.review-date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--cream);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.4rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ========== RATINGS SECTION ========== */
.restaurant-block-ratings {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(26, 24, 20, 0.05);
}

.restaurant-ratings {
    flex: 1;
}

.histogram-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.histogram-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.histogram-label {
    width: 60px;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}

.bar {
    flex: 1;
    height: 10px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
}

.bar>span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: 50px;
    transition: width 0.4s ease;
}

.restaurant-ratings-text {
    width: 140px;
    min-width: 140px;
    text-align: center;
    border-left: 1px solid var(--border);
    padding-left: 2rem;
}

.ratings-score-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.restaurant-ratings-text p:last-child {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--muted);
}

/* ========== MENU SECTION ========== */
.menu-cover {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0 1rem;
    scrollbar-width: none;
}

.menu-cover::-webkit-scrollbar {
    display: none;
}

.restaurant-menu {
    display: flex;
    gap: 1rem;
}

.restaurant-menu-img {
    width: 200px;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(26, 24, 20, 0.06);
    transition: all 0.25s ease;
    cursor: pointer;
}

.restaurant-menu-img:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(26, 24, 20, 0.12);
}

#upload-menu-button {
    width: 200px;
    aspect-ratio: 3/4;
    border-radius: 16px;
    border: 2px dashed var(--border);
    background: var(--cream);
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

#upload-menu-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ========== INFO SECTION ========== */
.info-details {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--muted);
}

#restaurant-details {
    max-width: 1100px;
    margin: 1rem auto 5rem;
    padding: 0 1.5rem;
}

#restaurant-details table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(26, 24, 20, 0.05);
}

#restaurant-details th,
#restaurant-details td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

#restaurant-details tr:last-child th,
#restaurant-details tr:last-child td {
    border-bottom: 0;
}

#restaurant-details th {
    width: 200px;
    background: var(--cream);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ink);
}

#restaurant-details td {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
}

#restaurant-details td a {
    color: var(--accent);
    transition: color 0.2s;
}

#restaurant-details td a:hover {
    color: var(--accent-dark);
}

/* ========== HORIZONTAL ADS ========== */
.horizontal-google-ads {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    text-align: center;
}

hr {
    max-width: 1100px;
    margin: 2rem auto;
    border: none;
    border-top: 1px solid var(--border);
}

/* ========== MODALS ========== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow: auto;
    background: rgba(26, 24, 20, 0.85);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 5vh auto;
    background: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 80px rgba(26, 24, 20, 0.3);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content-image {
    display: block;
    max-width: 92%;
    max-height: 90vh;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 16px;
}

.modal-content-submit {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 10vh auto;
    background: var(--surface);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 24px 80px rgba(26, 24, 20, 0.3);
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cream);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.close:hover {
    background: var(--ink);
    color: white;
}

/* ========== FORMS ========== */
#review-margin {
    padding: 2rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--cream);
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--ink);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(196, 112, 74, 0.15);
}

#submit-button {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.5rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1.5rem;
}

#submit-button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 112, 74, 0.25);
}

.review-btn2,
.review-btn3 {
    background: var(--cream);
    color: var(--ink);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0.35rem 0.35rem 0 0;
}

.review-btn2.active,
.review-btn3.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.feedback-btn {
    border: none;
    background: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    transition: transform 0.1s;
}

.feedback-btn img {
    width: 64px;
    height: 64px;
}

.feedback-btn.selected {
    transform: scale(1.08);
}

#image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.image-preview-per {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
}

.image-preview {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.delete-button-preview {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: none;
    border-radius: 8px;
    background: rgba(26, 24, 20, 0.6);
    color: white;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.delete-button-preview:hover {
    background: rgba(26, 24, 20, 0.85);
}

.text-danger {
    background: #FEE2E2;
    color: #B91C1C;
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ========== TOAST ========== */
.popup-message {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 5vh;
    z-index: 2000;
    max-width: 90vw;
    background: var(--ink);
    color: white;
    border-radius: 14px;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 16px 48px rgba(26, 24, 20, 0.35);
    visibility: hidden;
}

.popup-message.show {
    visibility: visible;
    animation: toastIn 0.35s, toastOut 0.4s 2.5s;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ========== MISC ========== */
.bookmarked {
    background: var(--accent) !important;
    color: white !important;
    border-color: var(--accent) !important;
}

.login-div {
    padding: 2rem;
    text-align: center;
}

.login-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:hover {
    background: var(--accent-dark);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .restaurant-body {
        flex-direction: column;
        margin-top: -2rem;
    }

    .scorecard {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }

    .restaurant-block-ratings {
        flex-direction: column;
        text-align: center;
    }

    .restaurant-ratings-text {
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 1.5rem 0 0;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .restaurant-banner {
        height: 40vh;
        min-height: 280px;
        border-radius: 0 0 20px 20px;
    }

    .restaurant-title {
        font-size: 1.5rem;
    }

    .body-details {
        padding: 1.25rem;
    }

    .image-wrapper {
        flex: 0 0 200px;
    }

    .restaurant-menu-img,
    #upload-menu-button {
        width: 160px;
    }

    #restaurant-details th {
        width: 120px;
        font-size: 0.8rem;
    }

    .ratings-score-text {
        font-size: 2rem;
    }
}