@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #ff4757;
    --primary-alt: #e84118;
    --dark: #0f172a;
    --bg-light: #f8fafc;
    --bg-dark: #020617;
    --card-light: #ffffff;
    --card-dark: #1e293b;
    --text-light: #1e293b;
    --text-dark: #f8fafc;
    --text-muted: #64748b;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.9);
    --glass-dark: rgba(15, 23, 42, 0.9);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-light);
    color: var(--text-light);
    padding-bottom: 140px;
    transition: background 0.5s ease;
    overflow-x: hidden;
}

/* Luxury Header */
header {
    padding: 1.5rem;
    background: var(--glass);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: block;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode header {
    background: var(--glass-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.restaurant-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #ff6b81);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

/* Search Bar */
.search-container {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

body.dark-mode .search-container {
    background: rgba(255, 255, 255, 0.05);
}

.search-container input {
    background: none;
    border: none;
    outline: none;
    width: 100%;
    color: inherit;
    font-weight: 600;
    font-size: 1rem;
}

/* Categories Bar */
.category-nav {
    display: flex;
    overflow-x: auto;
    padding: 1.2rem 1rem;
    gap: 0.6rem;
    scrollbar-width: none;
    position: sticky;
    top: 135px;
    z-index: 999;
    background: var(--bg-light);
}

body.dark-mode .category-nav {
    background: var(--bg-dark);
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-item {
    white-space: nowrap;
    padding: 0.7rem 1.4rem;
    background: var(--card-light);
    border-radius: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .category-item {
    background: var(--card-dark);
    border-color: rgba(255, 255, 255, 0.05);
}

.category-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(255, 71, 87, 0.3);
    border-color: var(--primary);
}

/* Premium Product Cards */
.menu-section {
    padding: 0 1rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 2rem 0 1.2rem;
    letter-spacing: -0.5px;
}

.product-card {
    display: flex;
    background: var(--card-light);
    border-radius: 24px;
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}

body.dark-mode .product-card {
    background: var(--card-dark);
    border-color: rgba(255, 255, 255, 0.04);
}

.product-card:hover {
    transform: translateY(-4px) scale(1.01);
}

.product-img-wrapper {
    position: reltive;
    width: 110px;
    height: 110px;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.product-info {
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.add-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 8px 20px rgba(255, 71, 87, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.add-btn:active {
    transform: scale(0.8);
}

/* Unified Cart & Footer */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    padding: 1.5rem 2rem 2.5rem;
    border-radius: 30px 30px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    z-index: 1001;
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.cart-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon-box {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Checkout Modal Styling */
.cart-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 2.5rem 2.5rem 0 0;
    padding: 2.5rem 2rem;
    z-index: 1002;
    transform: translateY(100%);
    transition: var(--transition);
}

body.dark-mode .cart-modal {
    background: var(--card-dark);
}

.cart-modal.active {
    transform: translateY(0);
}

/* Animation for items */
@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pop 0.3s ease-out;
}