﻿
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f9fafb;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
header {
    background: linear-gradient(90deg, #ff6600, #ff9933);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

    header h1 {
        font-size: 3em;
        margin: 0;
    }

    header p {
        margin: 5px 0 20px;
        font-size: 1.1em;
    }

.search-bar {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

    .search-bar select, .search-bar button {
        padding: 8px;
        border: none;
        outline: none;
        font-size: 1em;
    }

    .search-bar select {
        width: 240px;
    }

    .search-bar button {
        background: #ff6600;
        border-color: white;
        color: white;
        border-radius: 0 5px 5px 0;
        border-style: ridge;
        cursor: pointer;
        font-weight: bold;
    }

/* Search icon */
.search-icon {
    background-color: white;
    padding: 0 12px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px 0 0 5px;
    border-right: 1px solid #ddd;
}

    .search-icon i {
        color: #ff6600;
        font-size: 16px;
    }

/* Navigation */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10px;
    padding-left: 120px;
    padding-right: 120px;
    position: sticky;
    background-color: white;
    z-index: 10;
}

/* Filters Container */
.filters-container {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.filters-scrollable {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5px 0;
    margin-left: 10px;
    flex: 1;
    scroll-behavior: smooth;
}

    .filters-scrollable::-webkit-scrollbar {
        display: none;
    }

    .filters-scrollable button {
        padding: 8px 16px;
        border: 1px solid #ddd;
        border-radius: 20px;
        cursor: pointer;
        background: white;
        transition: all 0.3s;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
        margin-right: 8px;
    }

        .filters-scrollable button:hover {
            border-color: #ff9933;
        }

        .filters-scrollable button.active {
            background: #ff6600;
            color: white;
            border-color: #ff6600;
        }

.fixed-filter {
    position: sticky;
    left: 0;
    z-index: 5;
    background: white;
    flex-shrink: 0;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    margin-right: 8px;
}

    .fixed-filter.active {
        background: #ff6600;
        color: white;
        border-color: #ff6600;
    }

@media (min-width: 769px) {
    .filters-container {
        flex: 0 1 auto; /* Changed from flex: 1 */
        max-width: 720px; /* Increased width for 6 buttons */
    }

    .filters-scrollable {
        max-width: 500px; /* Increased width to show ~6 buttons */
    }

        .filters-scrollable button {
            min-width: 80px; /* Ensure consistent button width */
        }
}

/* Scroll indicators */
.scroll-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 4;
}

    .scroll-indicator.left {
        left: 120px;
    }

    .scroll-indicator.right {
        right: 1px;
        background: linear-gradient(270deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    }

    .scroll-indicator.visible {
        opacity: 1;
    }

    .scroll-indicator i {
        color: #ff6600;
        font-size: 35px;
        background: white;
        border-radius: 50%;
        padding: 15px;
    }

.sort-dropdown {
    display: flex;
    align-items: center;
}

    .sort-dropdown label {
        margin-right: 8px;
        white-space: nowrap;
    }

    .sort-dropdown select {
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 5px;
        cursor: pointer;
        font-size: 14px;
    }

/* Main Content */
.section-title {
    max-width: 1200px;
    margin: 20px auto 10px;
    padding: 0 20px;
}

    .section-title h2 {
        margin: 0;
        font-size: 1.8em;
    }

    .section-title p {
        margin: 5px 0;
        color: #666;
    }

.restaurant-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns by default */
    gap: 20px;
    padding: 10px;
    max-width: 1200px;
    margin: auto;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .restaurant-list {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on medium screens */
    }

    .top-bar {
        padding-left: 60px;
        padding-right: 60px;
    }
}

/* Tablet view with 2 columns */
@media (max-width: 900px) {
    .restaurant-list {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
        gap: 18px;
        padding: 18px;
    }

    .top-bar {
        padding-left: 40px;
        padding-right: 40px;
    }

    .sort-dropdown label {
        padding-left: 50px;
    }
}

/* Mobile view with 2 columns */
@media (max-width: 768px) {
    .restaurant-list {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 15px;
        padding: 15px;
    }

    .card {
        width: 100% !important;
        height: auto;
        min-height: 280px;
    }

        .card img {
            height: 130px;
        }

    .card-content {
        padding: 12px;
    }

        .card-content h3 {
            font-size: 1.2em;
        }

        .card-content .cuisine,
        .card-content .info {
            font-size: 0.85em;
        }

    /* Adjust header for mobile */
    header {
        padding: 30px 15px;
    }

        header h1 {
            font-size: 2.2em;
        }

        header p {
            font-size: 1em;
        }

    /* Adjust search bar for mobile */
    .search-bar {
        flex-direction: row;
        align-items: center;
        gap: 0;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .search-icon {
        border-radius: 5px 0 0 5px;
        border-right: 1px solid #ddd;
        height: 40px;
        width: auto;
        flex-shrink: 0;
    }

    .search-bar select {
        border-radius: 0;
        width: 100%;
        height: 40px;
        border-left: none;
        border-right: none;
    }

    .search-bar button {
        border-radius: 0 5px 5px 0;
        width: auto;
        height: 40px;
        white-space: nowrap;
        padding: 0 15px;
    }

    /* Adjust filters for mobile */
    .top-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 15px 10px;
    }

    .filters-container {
        width: 100%;
    }

    .fixed-filter {
        position: sticky;
        left: 0;
        z-index: 5;
    }

    .filters-scrollable {
        margin-left: 5px;
    }

    .sort-dropdown {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }

        .sort-dropdown label {
            padding-left: 0;
        }

        .sort-dropdown select {
            width: 50%;
        }
}

/* For very small screens, switch to 1 column */
@media (max-width: 600px) {
    .restaurant-list {
        grid-template-columns: 1fr; /* 1 column on very small screens */
    }

    .card {
        height: auto;
    }

    .scroll-indicator {
        display: none;
    }

    .top-bar {
        padding: 10px;
    }
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    position: relative;
    cursor: pointer;
    border: 1px solid #eee;
    height: 315px;
    width: 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

    .card:hover,
    .card:focus,
    .card.selected {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
        border-color: #d0d6dc;
        z-index: 10;
    }

    .card img {
        width: 100%;
        height: 160px;
        object-fit: cover;
    }


.card-content {
    padding-left: 18px;
    padding-right: 13px;
}

.restaurant-logo {
    padding-left: 32px;
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 1.4em;
    color: #dfa101;
    position: relative;
}

    .restaurant-logo::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Add subtle shadow */
    }

.card-content h3 {
    font-size: 20px;
    font-weight: 600;
}

.card-content .cuisine {
    margin: 4px 0;
    font-size: 1em;
    color: #555;
    font-weight: 500;
}

.card-content .info {
    display: flex;
    align-items: center;
    margin: 6px 0;
    color: #666;
    font-size: 0.9em;
}

    .card-content .info i {
        margin-right: 6px;
        color: #ff6600;
        width: 14px;
        font-size: 1.1em;
    }

/* Detail Page Styles */
#detail-page {
    display: none;
    max-width: 670px;
    margin: 0 auto;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: #ff6600;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.image-header-container {
    position: relative;
    margin-bottom: 20px;
}

.detail-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
}

.detail-header {
    position: absolute;
    bottom: 15px;
    left: 15px;
}

    .detail-header h2 {
        color: #f6fdff;
        margin-bottom: 5px;
        font-size: 1.5em;
    }

.detail-section {
    margin-bottom: 5px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: #ff6600;
}

    .detail-section h3 {
        color: #ff6600;
        font-size: 1.3em;
    }

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

    .info-item i {
        color: #ff6600;
        width: 20px;
    }

    .info-item strong {
        color: #555;
    }

/* #detail-phone {
        font-weight: 600;
        color: #333;
    } */

.menu-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: #ff6600;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s;
}

    .menu-button:hover {
        background-color: #e55a00;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(229, 90, 0, 0.2);
    }

.button-group {
    display: flex;
    gap: 15px;
    margin: 20px 0 5px;
}

    .button-group a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        flex: 1;
        padding: 12px;
        border: none;
        border-radius: 6px;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s;
        text-decoration: none;
    }

.primary-button {
    background-color: #ff6600;
    color: white;
}

    .primary-button:hover {
        background-color: #e55a00;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(229, 90, 0, 0.2);
    }

.secondary-button {
    background-color: #25D366;
    color: white;
}

    .secondary-button:hover {
        background-color: #128C7E;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(18, 140, 126, 0.2);
    }

.menu-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

    .menu-viewer.active {
        display: flex;
    }

.menu-viewer-header {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.close-menu-button {
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-viewer-content {
    width: 40%;
    height: 95%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

#menu-frame, #menu-image {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #ff6600;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

    .back-to-top.visible {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:hover {
        background: #e55a00;
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    }

    .back-to-top i {
        font-size: 20px;
    }

/* Responsive adjustments for back to top button */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Menu Viewer Responsive Styles */
@media (max-width: 1200px) {
    .menu-viewer-content {
        width: 60%;
        height: 90%;
    }
}

@media (max-width: 900px) {
    .menu-viewer-content {
        width: 70%;
        height: 85%;
    }

    .close-menu-button {
        width: 45px;
        height: 45px;
        font-size: 25px;
    }
}

@media (max-width: 768px) {
    .menu-viewer-content {
        width: 85%;
        height: 80%;
        border-radius: 8px;
    }

    .close-menu-button {
        width: 40px;
        height: 40px;
        font-size: 22px;
        top: 15px;
        right: 15px;
    }

    .menu-viewer-header {
        top: 15px;
        right: 15px;
    }

    #menu-frame, #menu-image {
        object-fit: contain;
    }
}

@media (max-width: 600px) {
    .menu-viewer-content {
        width: 95%;
        height: 75%;
    }

    .close-menu-button {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .menu-viewer-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .close-menu-button {
        width: 30px;
        height: 30px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }

    .menu-viewer-header {
        top: 10px;
        right: 10px;
    }

    #menu-frame, #menu-image {
        object-fit: contain;
    }
}

/* For very small screens */
@media (max-width: 320px) {
    .close-menu-button {
        width: 25px;
        height: 25px;
        font-size: 16px;
        top: 8px;
        right: 8px;
    }
}

/* Prevent body scroll when menu viewer is active */
body.menu-viewer-active {
    overflow: hidden;
}

/* Add smooth transition */
.menu-viewer {
    transition: opacity 0.3s ease;
}

.menu-viewer-content {
    transition: transform 0.3s ease;
}



/* Search-bar css */
.search-toggle-container {
    padding-right: 10px;
    /* margin-left: 400px; */
    position: relative;
    display: flex;
    align-items: center;
}

.search-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    transition: all 0.3s;
    white-space: nowrap;
    /* margin-left: 50px; */
}

    .search-toggle-btn:hover {
        border-color: #ff9933;
        color: #ff6600;
    }

    .search-toggle-btn.active {
        background: #ff6600;
        color: white;
        border-color: #ff6600;
    }

.search-text {
    display: none;
}

/* Search panel positioned to the RIGHT instead of below */
.search-panel {
    position: absolute;
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    background: white;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 11;
    min-width: 300px;
    margin-left: 10px;
}

    .search-panel.active {
        display: block;
    }

.search-panel-content {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-panel input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    min-width: 200px;
}

.search-panel button {
    padding: 10px 15px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* .search-panel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid white;
    filter: drop-shadow(-2px 0 1px rgba(0,0,0,0.1));
} */


/* Mobile responsive */
@media (max-width: 900px) {
    .search-panel {
        position: absolute;
        top: -56%;
        right: 0%;
        transform: none;
        margin-top: 10px;
        margin-left: 0;
        min-width: 250px;
    }

        .search-panel::before {
            top: -10px;
            left: 20px;
            transform: none;
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-bottom: 10px solid white;
            border-top: none;
            border-right: none;
            filter: drop-shadow(0 -2px 1px rgba(0,0,0,0.1));
        }
}

@media (max-width: 768px) {
    .search-toggle-container {
        order: 2;
        margin: 10px 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .search-panel {
        /* position: fixed; */
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        /* border-radius: 15px 15px 0 0; */
        margin-top: 0;
        min-width: unset;
    }

        .search-panel::before {
            display: none;
        }

    /* .search-panel-content {
        padding: 0 10px;
    } */

    .sort-dropdown {
        order: 3;
        width: 85%;
        justify-content: center;
        margin-left: 54px;
    }
}

@media (max-width: 480px) {
    /* .search-text {
        display: none;
    } */
    .search-text {
        font-size: 16px;
        display: none;
    }

    .search-toggle-btn {
        padding: 8px 12px;
    }

    .search-panel {
        left: -106%;
        width: 330px;
    }

        .search-panel input {
            min-width: unset;
        }
}


/* Header hide/show functionality */
header {
    background: linear-gradient(90deg, #ff6600, #ff9933);
    color: white;
    padding: 40px 20px;
    text-align: center;
    transition: transform 0.4s ease, opacity 0.4s ease;
    position: relative;
    z-index: 9;
}

    /* Hide header when scrolling down */
    header.hidden {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }

/* Make top-bar sticky at the top */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    padding-left: 120px;
    padding-right: 120px;
    background-color: white;
    z-index: 10;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease;
}

/* Adjust search container positioning */
.search-toggle-container {
    padding-right: 10px;
    position: relative;
    display: flex;
    align-items: center;
}

/* Mobile adjustments for sticky behavior */
@media (max-width: 768px) {
    header {
        padding: 30px 15px;
        position: relative;
    }

        header.hidden {
            transform: translateY(0); /* Keep header visible on mobile */
            opacity: 1;
            pointer-events: auto;
        }

    .top-bar {
        padding: 10px 5px;
        position: sticky;
        top: 0;
    }

    .search-toggle-container {
        margin-left: 0;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .top-bar {
        padding: 8px 3px;
    }
}

/* Header icon container */
.header-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.header-icon {
    width: 80px;
    height: 80px;
    object-fit: cover;
    /* border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); */
}

/* Adjust header layout for icon */
header h1 {
    margin: 0;
    font-size: 3em;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .header-icon-container {
        gap: 0px;
    }

    .header-icon {
        width: 100px;
        height: 100px;
    }

    header h1 {
        font-size: 2.2em;
    }
}

@media (max-width: 480px) {
    .header-icon-container {
        gap: 0px;
    }

    .header-icon {
        width: 70px;
        height: 70px;
    }

    header h1 {
        font-size: 25px;
    }
}

/* Filter for Popular Latest */
.filter-buttons {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    background: white;
    transition: all 0.3s;
    font-size: 16px;
    white-space: nowrap;
    margin-right: 8px;
}

    .filter-btn:hover {
        border-color: #ff9933;
    }

    .filter-btn.active {
        background: #ff6600;
        color: white;
        border-color: #ff6600;
    }

/* Responsive adjustments */
@media (max-width: 900px) {
    .filter-buttons {
        margin-left: 10px;
    }
}

@media (max-width: 768px) {
    .filter-buttons {
        order: 4;
        width: 100%;
        justify-content: center;
        margin: 10px 0 0 0;
    }
}

/* Filter status message */
.filter-status {
    text-align: center;
    padding: 10px;
    margin: 0 auto;
    max-width: 1200px;
    font-size: 1.2em;
    color: #666;
    display: none;
}

    .filter-status.active {
        display: block;
    }

    .filter-status h3 {
        color: #ff6600;
        /* margin-bottom: 10px; */
        font-size: 1.6em;
    }

/* No results message */
.no-results {
    text-align: center;
    padding: 40px 20px;
    margin: 0 auto;
    max-width: 1200px;
    display: none;
}

    .no-results.active {
        display: block;
    }

    .no-results i {
        font-size: 3em;
        color: #ddd;
        margin-bottom: 20px;
    }

    .no-results h3 {
        color: #666;
        margin-bottom: 10px;
    }

    .no-results p {
        color: #888;
    }
/* Search results message */
.search-results {
    text-align: center;
    padding: 20px;
    margin: 0 auto;
    max-width: 1200px;
    display: none;
}

    .search-results.active {
        display: block;
    }

    .search-results h3 {
        color: #ff6600;
        font-size: 1.4em;
        font-weight: normal;
        margin: 0;
    }
