:root {
    --primary-color: #3b82f6;
    /* Blue like the screenshots */
    --secondary-color: #e5e7eb;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --header-height: 60px;
    --bottom-nav-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--card-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.shop-name {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
}

.header-icons {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
}

/* Category Tabs */
.category-tabs {
    background: var(--card-bg);
    padding: 10px 15px;
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    border-bottom: 1px solid var(--secondary-color);
    position: sticky;
    top: var(--header-height);
    z-index: 900;
}

.category-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.tab-btn {
    border: none;
    background: none;
    font-weight: 600;
    color: var(--text-muted);
    padding-bottom: 5px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 15px;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Sections */
.section-title {
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    background: var(--bg-color);
}

/* Carousel (Most Popular) */
.carousel {
    display: flex;
    gap: 15px;
    padding: 0 15px 15px 15px;
    overflow-x: auto;
    scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.popular-card {
    background: var(--card-bg);
    min-width: 140px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
    padding-bottom: 10px;
}

.popular-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.popular-name {
    font-size: 14px;
    font-weight: 600;
    margin: 8px 0 4px 0;
}

.popular-price {
    font-size: 13px;
    color: var(--text-muted);
}

/* Product List */
.product-list {
    background: var(--card-bg);
}

.product-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--secondary-color);
    gap: 15px;
    cursor: pointer;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.product-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-weight: 700;
    font-size: 15px;
}

.product-img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
}

.badge-popular {
    background: #f59e0b;
    /* Gold */
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: var(--card-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

/* Views (Tabs) */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Cart View */
.cart-view {
    padding: 15px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.cart-empty {
    text-align: center;
    margin-top: 50px;
    color: var(--text-muted);
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 15px;
}

.cart-empty h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    margin-top: 20px;
    cursor: pointer;
}

.cart-items {
    flex: 1;
}

.cart-item {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-details h4 {
    font-size: 15px;
    margin-bottom: 5px;
}

.cart-item-details p {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid var(--secondary-color);
    background: white;
    cursor: pointer;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.modal.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.add-to-cart-btn {
    background: var(--primary-color);
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
}

/* Floating Cart Bar (iFood Style) */
.floating-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ea1d2c;
    /* iFood Red or inherit Primary */
    color: white;
    padding: 15px;
    display: none;
    /* Hidden by default */
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    animation: slideUp 0.3s ease-out;
}

.floating-cart-bar.visible {
    display: flex;
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#floating-count {
    background: white;
    color: #ea1d2c;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.cart-text {
    font-weight: 600;
    font-size: 16px;
}

#floating-total {
    font-weight: 700;
    font-size: 16px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Premium Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* Product Item Hover */
.product-item {
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Neighborhood Badge */
.neighborhood-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}