:root {
    --primary-color: #f7941d;
    --primary-dark: #d58019;
    --secondary-color: #333;
    --accent-color: #ffbb33;
    --text-color: #555;
    --bg-color: #f4f6f8;
}

/* General Reset */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding-bottom: 0;
    position: relative;
    z-index: 100;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    gap: 15px;
}

/* Logo */
.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

/* Search Bar */
.search-bar-container {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
    order: 2;
    /* Middle on desktop */
}

.search-form {
    display: flex;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    overflow: hidden;
    background: white;
}

.search-input {
    border: none;
    padding: 12px 20px;
    flex: 1;
    outline: none;
    font-size: 0.95rem;
}

.search-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0 25px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #e68a00;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 25px;
    align-items: center;
    order: 3;
    /* Right on desktop */
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
    position: relative;
    cursor: pointer;
}

.action-item:hover {
    color: var(--primary-color);
}

.action-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
    color: #444;
}

.action-item:hover i {
    color: var(--primary-color);
}

.badge-count {
    position: absolute;
    top: -8px;
    right: -5px;
    background: #ff3b30;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    border: 2px solid white;
}

/* Navigation Menu */
.header-nav {
    padding: 0;
    background: white;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    display: block;
    padding: 15px 0;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Responsive Header */
@media (max-width: 768px) {
    .header-main {
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 10px;
    }

    .search-bar-container {
        margin: 10px 0;
        max-width: 100%;
        order: 3;
        /* Bottom on mobile top-section */
    }

    .header-actions {
        justify-content: space-between;
        margin-top: 10px;
        order: 2;
    }

    .header-nav {
        display: none;
    }

    /* Check if we want to hide or show as drawer */
}

/* Main Stylesheet */

/* Footer */
footer {
    background: #333;
    color: #eee;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.9rem;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    /* Hidden by default (Desktop) */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
}

.mobile-nav-item {
    text-decoration: none;
    color: #555;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    position: relative;
    transition: color 0.3s;
}

.mobile-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

.cart-badge-mobile {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 50%;
    font-weight: bold;
}

/* Media Query for Mobile Devices */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 60px;
        /* Prevent content from being hidden behind nav */
    }
}

/* Category Grid Layout - 4 Columns */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 10px 5px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.view-all {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 10px 5px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.product-image {
    width: 100%;
    height: 160px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info-mini {
    padding: 10px;
}

.product-title {
    font-size: 0.9rem;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 0 10px;
}

.btn-add {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary-color);
    color: white;
    padding: 8px 0;
    font-size: 0.8rem;
    border-radius: 5px;
    font-weight: 600;
}

.btn-add:hover {
    background: var(--primary-dark);
}