/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    --primary-color: #FFC107; /* Yellow */
    --secondary-color: #FFD54F; /* Lighter Yellow */
    --dark-color: #333333;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #ff9800;
    --danger-color: #dc3545;
    --white: #ffffff;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --partner-primary: #2196F3; /* Blue for partner mode */
}

/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Utility Classes */
.flex {
    display: flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none !important;
}

/* Typography */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-login {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
}

.btn-login:hover {
    background-color: var(--secondary-color);
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
}

.logo span {
    color: var(--primary-color);
}

.search-container {
    display: flex;
    align-items: center;
    width: 40%;
    min-width: 250px;
}

.search-container input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 30px 0 0 30px;
    outline: none;
    font-family: inherit;
}

.search-container button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-count {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: 5px;
}

.mobile-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 15px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Hero Section */
.hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #fff8f8 0%, #fff 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    padding-right: 40px;
    min-width: 300px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: var(--gray);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    min-width: 300px;
}

.hero-image img {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* How It Works */
.how-it-works {
    padding: 80px 0;
    background-color: var(--white);
}

.how-it-works h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    position: relative;
}

.how-it-works h2:after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
    padding: 30px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.step-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 107, 107, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 30px;
}

.step h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.step p {
    color: var(--gray);
}

/* Restaurants Section */
.restaurants {
    padding: 80px 0;
    background-color: var(--light-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 36px;
}

.see-all {
    color: var(--primary-color);
    font-weight: 500;
}

.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.restaurant-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.restaurant-img {
    height: 180px;
    overflow: hidden;
}

.restaurant-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.restaurant-card:hover .restaurant-img img {
    transform: scale(1.05);
}

.restaurant-info {
    padding: 20px;
}

.restaurant-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.restaurant-cuisine {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.restaurant-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--white);
    background-color: var(--success-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.delivery-time {
    color: var(--gray);
    font-size: 14px;
}

/* Cuisines Section */
.cuisines {
    padding: 80px 0;
    background-color: var(--white);
}

.cuisines h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
}

.cuisine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.cuisine-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 180px;
    cursor: pointer;
}

.cuisine-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cuisine-card:hover img {
    transform: scale(1.1);
}

.cuisine-card h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
    padding: 15px;
    margin: 0;
    font-size: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: modalopen 0.3s;
}

@keyframes modalopen {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    color: var(--gray);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--dark-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.restaurant-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--white);
    background-color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 16px;
}

.menu-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.menu-categories::-webkit-scrollbar {
    height: 5px;
}

.menu-categories::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 5px;
}

.menu-categories button {
    background-color: var(--light-gray);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-family: inherit;
}

.menu-categories button.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.menu-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--light-color);
    transition: all 0.3s ease;
    flex-wrap: wrap;
}

.menu-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.menu-item-info {
    flex: 1;
    min-width: 200px;
}

.menu-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.menu-item-desc {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 5px;
}

.menu-item-price {
    font-weight: 600;
    color: var(--primary-color);
}

.menu-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.quantity-btn:hover {
    background-color: var(--secondary-color);
}

.quantity {
    min-width: 20px;
    text-align: center;
}

.add-to-cart {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.add-to-cart:hover {
    background-color: var(--secondary-color);
}

/* Cart Modal Styles */
.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.cart-items::-webkit-scrollbar {
    width: 5px;
}

.cart-items::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 5px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
    flex-wrap: wrap;
}

.cart-item-info {
    flex: 1;
    min-width: 200px;
}

.cart-item-name {
    font-weight: 600;
}

.cart-item-price {
    color: var(--primary-color);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remove-item {
    color: var(--danger-color);
    cursor: pointer;
    transition: color 0.3s;
}

.remove-item:hover {
    color: #a71d2a;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--light-gray);
    flex-wrap: wrap;
    gap: 15px;
}

.cart-total {
    font-size: 18px;
    font-weight: 600;
}

.cart-total span:last-child {
    color: var(--primary-color);
    margin-left: 10px;
}

.empty-cart {
    text-align: center;
    padding: 30px;
    color: var(--gray);
}

/* Partner Dashboard Styles */
.partner-dashboard {
    padding: 80px 0;
    background-color: var(--light-color);
}

.partner-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: var(--gray);
    font-size: 18px;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.qr-code-section {
    text-align: center;
    padding: 30px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto;
}

.qr-code-section h3 {
    margin-bottom: 20px;
}

.qr-code-container {
    display: inline-block;
    padding: 20px;
    background-color: var(--white);
    border-radius: 10px;
}

.qr-code-container img {
    margin-bottom: 15px;
    border: 1px solid var(--light-gray);
    padding: 10px;
}

/* App Download Section */
.app-download {
    padding: 80px 0;
    background-color: var(--primary-color);
    color: var(--white);
}

.app-download .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.app-content {
    flex: 1;
    padding-right: 40px;
    min-width: 300px;
}

.app-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.app-content p {
    margin-bottom: 30px;
    font-size: 18px;
}

.app-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.app-buttons img {
    height: 50px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.app-buttons img:hover {
    transform: scale(1.05);
}

.app-image {
    flex: 1;
    text-align: center;
    min-width: 300px;
}

.app-image img {
    max-width: 300px;
    animation: float 3s ease-in-out infinite;
}

/* Footer */
footer {
    background-color: #222;
    color: var(--white);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #bbb;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #bbb;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Partner View Styles */
.partner-view .hero-content h1 span {
    color: var(--partner-primary);
}

.partner-view .btn-primary {
    background-color: var(--partner-primary);
    border-color: var(--partner-primary);
}

.partner-view .btn-primary:hover {
    color: var(--partner-primary);
    background-color: transparent;
}

.partner-view .btn-secondary {
    color: var(--partner-primary);
    border-color: var(--partner-primary);
}

.partner-view .btn-secondary:hover {
    background-color: var(--partner-primary);
    color: var(--white);
}

.partner-view .btn-login {
    background-color: var(--partner-primary);
}

.partner-view .btn-login:hover {
    background-color: #42A5F5;
}

.partner-view input:checked + .slider {
    background-color: var(--partner-primary);
}

.partner-view .step-icon {
    color: var(--partner-primary);
    background-color: rgba(33, 150, 243, 0.1);
}

.partner-view .see-all {
    color: var(--partner-primary);
}

.partner-view .rating {
    background-color: var(--partner-primary);
}

.partner-view .app-download {
    background-color: var(--partner-primary);
}

.partner-view .footer-col h3:after {
    background-color: var(--partner-primary);
}

.partner-view .social-icons a:hover {
    background-color: var(--partner-primary);
}

.partner-view .footer-links a:hover {
    color: var(--partner-primary);
}

.partner-view .stat-card p {
    color: var(--partner-primary);
}

/* Hide/show sections in partner view */
.partner-view .restaurants,
.partner-view .how-it-works,
.partner-view .cuisines,
.partner-view .app-download {
    display: none;
}

.partner-view .partner-dashboard {
    display: block;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero .container,
    .app-download .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content,
    .app-content {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .hero-buttons,
    .app-buttons {
        justify-content: center;
    }
    
    .search-container {
        width: 60%;
        margin: 15px auto;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 15px;
        margin-top: 15px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .search-container {
        width: 100%;
        order: 3;
        margin: 15px 0;
    }
    
    .hero {
        padding-top: 150px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .restaurant-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .menu-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .menu-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-bottom {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 15px;
    }
}