:root {
    --primary-color: #0d1b2a;
    /* Dark Blue */
    --secondary-color: #1b263b;
    /* Lighter Blue */
    --accent-color: #415a77;
    --text-color: #e0e1dd;
    --bg-color: #f8f9fa;
    /* White-ish background for content */
    --card-bg: #ffffff;
    --text-dark: #333333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --bottom-nav-height: 60px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    /* Mobile friendly font */
    background-color: var(--bg-color);
    color: var(--text-dark);
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    /* Space for bottom nav */
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    padding: 15px;
    max-width: 100%;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px;
    margin-bottom: 15px;
}

/* Navbar */
.top-navbar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.user-greeting {
    font-size: 1rem;
    font-weight: 500;
}

.cart-icon {
    position: relative;
    font-size: 1.2rem;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e63946;
    color: white;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 50%;
}

/* Search Bar */
.search-container {
    background-color: var(--primary-color);
    padding: 0 15px 15px 15px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    outline: none;
    font-size: 0.9rem;
}

.search-wrapper {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f8f8;
}

.search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 12px;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.search-result-price {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}


/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: rgba(13, 27, 42, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast i {
    color: #5cb85c;
}

.product-card-inline {
    display: inline-block;
    width: 160px;
    margin-right: 15px;
    vertical-align: top;
    white-space: normal;
    scroll-snap-align: start;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background-color: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
    flex: 1;
    height: 100%;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

/* Sliders */
.slider-container {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    margin-bottom: 20px;
    scroll-behavior: smooth;
    /* Native smooth scroll */
    cursor: grab;
    /* Show grab cursor */
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.slider-container.active {
    cursor: grabbing;
    scroll-behavior: auto;
    /* Disable smooth scroll while dragging */
}

.slider-item {
    display: inline-block;
    width: 100%;
    /* Full Width */
    margin-right: 0;
    overflow: hidden;
    vertical-align: top;
    scroll-snap-align: start;
}

.slider-item:first-child {
    margin-left: 0;
}

.slider-item img {
    width: 100%;
    height: 200px;
    /* Slight Increase height */
    object-fit: cover;
    display: block;
    border-radius: 0;
    /* Remove radius for full width look? Or keep it? User said full width, usually means no radius on sides. Let's keep it clean. */
}

.slider-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.dot {
    height: 8px;
    width: 8px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    margin: 0 4px;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--primary-color);
}

/* Categories Scroll */
.category-scroll {
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE/Edge */
    scroll-snap-type: x mandatory;
}

.category-scroll::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.category-item {
    display: inline-block;
    text-align: center;
    margin-right: 15px;
    width: 80px;
    scroll-snap-align: start;
}

.category-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
    box-shadow: var(--shadow);
}

.category-name {
    font-size: 0.8rem;
    color: var(--text-dark);
    white-space: normal;
    line-height: 1.2;
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.product-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.product-details {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.product-price {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 5px;
}

.btn-add {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    width: 100%;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Sections */
.section-title {
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-title h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.see-all {
    font-size: 0.8rem;
    color: var(--accent-color);
}

/* Cart Styles */
.cart-items {
    margin-bottom: 15px;
}

.cart-item-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 20px;
}

.qty-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: background 0.3s;
}

.qty-btn:hover {
    background: var(--secondary-color);
}

.qty-display {
    min-width: 25px;
    text-align: center;
    font-weight: bold;
    color: var(--text-dark);
}

.remove-btn {
    color: #e63946;
    font-size: 1.1rem;
    padding: 5px;
    transition: color 0.3s;
}

.remove-btn:hover {
    color: #d62828;
}

.cart-total-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-dark);
}

.total-amount {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.cart-actions {
    margin-bottom: 20px;
}

.btn-whatsapp {
    display: block;
    text-align: center;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    background-color: #25D366;
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s;
}

.btn-whatsapp:hover {
    background-color: #20bd5a;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.btn-whatsapp i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.empty-cart {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-cart i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-cart p {
    color: #999;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.empty-cart .btn-add {
    display: inline-block;
    width: auto;
    padding: 12px 30px;
    margin-top: 10px;
}

/* Subcategory Filters */
.subcategory-filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 15px;
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.subcategory-filters::-webkit-scrollbar {
    display: none;
}

.subcategory-btn {
    display: inline-block;
    padding: 8px 20px;
    background: white;
    color: var(--text-dark);
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.subcategory-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.subcategory-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive */
@media (min-width: 768px) {

    .container,
    .bottom-nav,
    .top-navbar {
        max-width: 480px;
        /* Mobile View on Desktop */
        margin: 0 auto;
        left: 0;
        right: 0;
    }

    body {
        background-color: #333;
        /* Dark outside the app */
    }

    .app-root {
        background-color: var(--bg-color);
        min-height: 100vh;
        max-width: 480px;
        margin: 0 auto;
        position: relative;
    }
}