@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #ff6b00;
    --primary-dark: #e65100;
    --primary-soft: rgba(255, 107, 0, 0.08);
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --text-main: #1a1d1e;
    --text-muted: #6c757d;
    --border: #eaeff2;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.03);
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-float: 0 15px 35px rgba(255, 107, 0, 0.25);
    --radius: 20px;
    --navbar-height: 65px;
}

[data-theme="dark"] {
    --primary: #ff8533;
    --primary-dark: #ff6b00;
    --primary-soft: rgba(255, 133, 51, 0.15);
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --text-main: #ececec;
    --text-muted: #a0a0a0;
    --border: #2d2d2d;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-card: 0 10px 30px rgba(0,0,0,0.5);
    --shadow-float: 0 10px 30px rgba(255, 133, 51, 0.2);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 120px;
    padding-top: var(--navbar-height);
    overflow-x: hidden;
}

.navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--navbar-height);
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}
[data-theme="dark"] .navbar { background: rgba(30, 30, 30, 0.85) !important; }

.hero-section {
    position: relative; width: 100%; 
    height: 200px;
    background-size: cover; background-position: center;
    border-radius: 0 0 30px 30px; margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); overflow: hidden;
    transform: translateZ(0);
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%);
}

.search-container { 
    position: relative; z-index: 10; margin-top: -50px; padding: 0 24px; 
}
.search-box {
    background: var(--bg-card); border-radius: 18px; padding: 0 20px;
    display: flex; align-items: center; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border: 1px solid transparent;
    height: 58px; transition: 0.3s all;
}
.search-box:focus-within {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(255, 107, 0, 0.15);
}
.search-input {
    border: none; background: transparent; width: 100%; padding: 0 15px;
    font-size: 1.05rem; color: var(--text-main); outline: none; font-weight: 500;
}
.search-icon { color: var(--primary); font-size: 1.2rem; }

.sticky-category-bar {
    position: sticky; top: var(--navbar-height); z-index: 900;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 12px 0; margin-top: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
[data-theme="dark"] .sticky-category-bar { background: rgba(18, 18, 18, 0.9); }

.category-nav {
    display: flex; gap: 15px; overflow-x: auto; padding: 5px 20px; 
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.category-nav::-webkit-scrollbar { display: none; }

.cat-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    cursor: pointer; min-width: 76px; opacity: 0.6; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.cat-item.active { opacity: 1; transform: translateY(-3px); }

.cat-img-box {
    width: 68px; height: 68px; border-radius: 22px;
    border: 2px solid transparent;
    padding: 3px; background: var(--bg-card); overflow: hidden; 
    transition: 0.3s; box-shadow: var(--shadow-sm);
}
.cat-item.active .cat-img-box { 
    border-color: var(--primary); 
    box-shadow: 0 8px 20px var(--primary-soft);
    transform: scale(1.05);
}
.cat-img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.cat-name { 
    font-size: 0.85rem; font-weight: 600; color: var(--text-main); 
    text-align: center; white-space: nowrap; max-width: 80px; overflow: hidden; text-overflow: ellipsis;
}
.cat-item.active .cat-name { color: var(--primary); font-weight: 700; }

.product-grid { display: none; animation: fadeInUp 0.5s ease backwards; }
.product-grid.active { display: flex; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-card {
    background: var(--bg-card); border-radius: var(--radius); overflow: hidden;
    border: none; box-shadow: var(--shadow-card);
    transition: all 0.3s ease; height: 100%; display: flex; flex-direction: column;
    position: relative;
}
.menu-card:active { transform: scale(0.97); } 

.card-img-wrapper {
    width: 100%; 
    padding-top: 75%;
    position: relative;
    background-color: var(--border);
}
.card-img-top { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; transition: 0.5s;
}

.card-body { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { 
    font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--text-main);
    line-height: 1.3;
}
.card-text { 
    font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; flex-grow: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.5;
}
.card-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: auto; padding-top: 0; border: none; background: transparent;
}
.price { font-size: 1.15rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; }
.add-btn {
    width: 42px; height: 42px; border-radius: 14px; background: var(--text-main);
    color: white; display: flex; align-items: center; justify-content: center;
    transition: 0.2s; cursor: pointer; border: none; font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.add-btn:active { background: var(--primary); transform: scale(0.9); }
[data-theme="dark"] .add-btn { background: var(--bg-body); color: var(--text-main); border: 1px solid var(--border); }
[data-theme="dark"] .add-btn:active { background: var(--primary); border-color: var(--primary); color: white; }

.cart-fab, .fab-garson, .fab-top {
    position: fixed; right: 24px;
    width: 60px; height: 60px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-float); z-index: 990;
    cursor: pointer; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}
.cart-fab { bottom: 100px; background: #1a1d1e; color: white; font-size: 1.5rem; display: none; }
.cart-fab:hover { transform: translateY(-5px); }
.cart-fab:active { transform: scale(0.9); }

.fab-garson { bottom: 30px; background: var(--primary); color: white; font-size: 1.6rem; }
.fab-garson:hover { box-shadow: 0 20px 40px rgba(255, 107, 0, 0.4); transform: translateY(-3px); }

.fab-top { 
    bottom: 30px; left: 24px; right: auto; 
    background: var(--bg-card); color: var(--text-main); 
    border: 1px solid var(--border); font-size: 1.3rem;
    box-shadow: var(--shadow-sm); display: none; 
}

.cart-badge {
    position: absolute; top: -6px; right: -6px; background: #ff3b30;
    color: white; font-size: 0.8rem; font-weight: 700; min-width: 24px; height: 24px;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    border: 3px solid var(--bg-body); padding: 0 5px;
}

@media (max-width: 768px) {
    .modal.fade .modal-dialog {
        position: fixed; bottom: 0; left: 0; right: 0; margin: 0;
        transform: translateY(100%); transition: transform 0.3s ease-in-out;
    }
    .modal.show .modal-dialog { transform: translateY(0); }
    .modal-content {
        border-radius: 30px 30px 0 0;
        border: none; padding-bottom: 20px;
    }
    .modal-header {
        border-bottom: none; padding-bottom: 0;
        display: flex; justify-content: center; position: relative;
    }
    .modal-header::before {
        content: ''; width: 50px; height: 5px; background: var(--border);
        border-radius: 10px; position: absolute; top: 15px;
    }
    .modal-title { margin-top: 15px; width: 100%; text-align: center; }
    .btn-close { position: absolute; right: 20px; top: 20px; z-index: 10; }
}

.modal-content {
    background: var(--bg-card); color: var(--text-main);
    border-radius: 24px; border: none; box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}
.cart-item-row { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px 0; border-bottom: 1px dashed var(--border); 
}
.cart-controls { 
    display: flex; align-items: center; gap: 10px; 
    background: var(--bg-body); padding: 5px 8px; border-radius: 12px; 
}
.qty-btn { 
    width: 28px; height: 28px; border-radius: 8px; background: var(--bg-card); 
    display: flex; align-items: center; justify-content: center; cursor: pointer; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); color: var(--text-main);
}
.order-btn {
    background-color: #25d366; color: white; font-weight: 700; font-size: 1.1rem;
    padding: 16px; border-radius: 18px; width: 100%; border: none;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3); margin-top: 15px;
    transition: 0.3s;
}
.order-btn:active { transform: scale(0.98); }

.theme-toggle { border: none; background: transparent; color: var(--text-main); font-size: 1.4rem; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.2s; }
.theme-toggle:active { background: var(--border); }

.whatsapp-btn { 
    background-color: #25d366; color: #fff !important; 
    display: flex; align-items: center; gap: 8px; padding: 0 18px; height: 42px; 
    border-radius: 50px; font-weight: 600; font-size: 0.9rem; text-decoration: none; margin-right: 5px; 
    box-shadow: 0 8px 15px rgba(37, 211, 102, 0.2); transition: 0.2s;
}
.whatsapp-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3); }

@media (max-width: 576px) {
    .whatsapp-btn span { display: none; }
    .whatsapp-btn { padding: 0; width: 42px; justify-content: center; }
    .hero-section { height: 180px; }
    .container { padding-left: 20px; padding-right: 20px; }
    .product-item { padding-left: 6px; padding-right: 6px; }
    .row.g-3 { --bs-gutter-x: 12px; }
}