/* ===== FRESHCART OPTIMIZED CSS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(
        to bottom,
        rgba(105, 226, 103, 0.25) 0%,
        rgba(255, 255, 255, 1) 15%,
        white 100%
    );
     
    color: #333;
    padding-bottom: 70px;
    overflow-x: hidden;
}

/* ===== TOP NAVIGATION ===== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: transparent;
    /* Removed position: sticky */
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    padding: 8px 1px;
    /* Removed position: sticky */
}

.loc-left {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.loc-left i {
    color: #ff4d4f;
}

.loc-title {
    font-size: 12px;
    color: #6b7280;
}

.loc-address {
    font-weight: 600;
    font-size: 15px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-icons {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.nav-icons a {
    color: #555;
    text-decoration: none;
    font-size: 18px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding-left: 100px;
    margin-right: 4px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff9800;
    color: white;
    font-size: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop-specific styles */
@media (min-width: 992px) {
    .nav-icons a {
        padding-left: 1050px;
        font-size: 20px;
        width: 50px;
        height: 50px;
    }
}

/* ===== MAIN CONTENT ===== */
.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0px;
}

/* ===== SEARCH SECTION - NOW STICKY ===== */
.searc-section {
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px 26px;
    backdrop-filter: blur(4px);
    margin-bottom: 10px;
}

.searc-container {
    position: relative;
    max-width: 1600px;
    margin: 0 auto;
    height: 55px; /* Increased height */
}

.search-input {
    width: 100%;
    height: 100%; /* Take full height of container */
    padding: 18px 60px 18px 55px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    font-size: 30px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-weight: 500;
}

.search-input:focus {
    border-color: #4caf50;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.15);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 24px;
    transition: all 0.3s ease;
}

.mic-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 24px;
    transition: all 0.3s ease;
}

.mic-icon:hover {
    color: #4caf50;
    transform: translateY(-50%) scale(1.1);
}

/* ===== BANNER SLIDER ===== */
.banner-slider {
    padding: 10px 0 1px;
    overflow: hidden;
    position: relative;
}

.banner-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 1px;
    transition: transform 0.5s ease-in-out;
}

.banner-container::-webkit-scrollbar {
    display: none;
}

.banner-slide {
    flex: 0 0 95%;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.banner-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    border-radius: 0 0 12px 12px;
}

.banner-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.banner-subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

.banner-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff6b35;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(255, 109, 0, 0.4);
}

/* Banner Navigation Controls */
.banner-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-dot.active {
    background: white;
    transform: scale(1.2);
}

.banner-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.banner-nav-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.banner-prev {
    left: 10px;
}

.banner-next {
    right: 10px;
}

.banner-nav-btn i {
    color: #333;
    font-size: 16px;
}

   /* Category Section - IMPROVED */
        .categories {
            display: flex;
            overflow-x: auto;
            color: #666;
            gap: 15px;
            padding: 15px 5px;
            -ms-overflow-style: none;
            scrollbar-width: none;
            margin-bottom: 20px;
        }
        
        .categories::-webkit-scrollbar {
            display: none;
        }
        
        .category {
            min-width: 100px;
            text-align: center;
            cursor: pointer;
            padding: 5px;
            border-radius: 12px;
            transition: all 0.3s ease;
            flex-shrink: 0;
            position: relative;
            background: transparent;
            
        }
        
        .category.active {
            color: black;
            
        }
        
        .category.active::after {
            content: "";
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 70%;
            height: 3px;
            background-color: #ff6b35;
            border-radius: 20px;
        }
        
        
        
        .category-icon {
            width: 90px;
            height: 90px;
            border-radius: 50%;
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .category.active .category-icon {
            border-color: #ff6b35;
            
        }
        
        .category-icon img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            padding: 2px;
        }
        
        .category p {
            margin-top: 8px;
            font-size: 16px;
            font-style: #88888888;
            font-weight: 500;
            white-space: nowrap;
        }
/* ===== PRODUCTS SECTION ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 0 20px;
}

.product-card {
    position: relative;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    padding: 2px;
    overflow: visible;
}

.discount-badge {
    position: absolute;
    top: 2px;
    left: -6px;
    background: linear-gradient(135deg, #ff4d4f, #ff7a6e);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 4px;
    border-radius: 4px 4px 4px 0;
    text-transform: uppercase;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.discount-badge::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    border-width: 6px 6px 0 0;
    border-style: solid;
    border-color: #c0392b transparent transparent transparent;
}

.product-image {
    border-radius: 10px;
    height: 160px;
    width: 100%;
    object-fit: cover;
    margin-bottom: 2px;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #111;
    line-height: 1.4;
    height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
}

.product-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Price Styling */
.price-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.8rem;
}

.discounted-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.1rem;
}

.regular-price {
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.1rem;
}

.add-to-cart {
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    touch-action: manipulation;
}

.add-to-cart:hover {
    background: #e55b2f;
    transform: scale(1.05);
}

.product-rating-small {
    font-size: 12px;
    color: #ffc107;
    margin-top: 5px;
}

.product-category-badge {
    background: #f0f0f0;
    color: #666;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 5px;
    display: inline-block;
    width: fit-content;
}

/* ===== PRODUCT DETAILS PAGE ===== */
.product-details-container {
    display: none;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4caf50;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    cursor: pointer;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.thumbnail.active {
    opacity: 1;
    border: 2px solid #4caf50;
}

.product-info-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.product-category {
    color: #666;
    font-size: 16px;
    text-transform: capitalize;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-stars {
    color: #ffc107;
}

.rating-count {
    color: #666;
    font-size: 14px;
}

/* Product Details Price Styling */
.price-container-large {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
}

.original-price-large {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
}

.discounted-price-large {
    font-size: 1.8rem;
    color: #e74c3c;
    font-weight: bold;
}

.regular-price-large {
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: bold;
}

.discount-badge-large {
    background: #ff4444;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

.product-description-details {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-features {
    list-style-type: none;
    margin-bottom: 20px;
}

.product-features li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-features li i {
    color: #4caf50;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.quantity-label {
    font-weight: 600;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    border-radius: 30px;
    padding: 8px 15px;
}

.quantity-btn {
    background: #e0e0e0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.quantity-btn:hover,
.quantity-btn:active {
    background: #d0d0d0;
}

.quantity {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-add-to-cart {
    flex: 2;
    background: #4caf50;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
}

.btn-add-to-cart:hover,
.btn-add-to-cart:active {
    background: #388e3c;
}

.btn-buy-now {
    flex: 1;
    background: #ff9800;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
}

.btn-buy-now:hover,
.btn-buy-now:active {
    background: #f57c00;
}

/* ===== SEARCH PAGE ===== */
.search-container {
    display: none;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-header {
    text-align: center;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 15px;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    background: #fff;
    padding: 12px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 13px;
    padding: 5px;
    touch-action: manipulation;
}

.nav-item.active {
    color: #4caf50;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

/* ===== MAP OVERLAY ===== */
#mapOverlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 1000; 
    background-color: #fff; 
    flex-direction: column;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #4caf50;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.map-header h2 {
    font-size: 1.3rem;
    margin: 0;
}

#map { 
    width: 100%; 
    height: 100%; 
    flex: 1;
}

.map-actions {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: white;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

#confirmBtn {
    padding: 12px 25px;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

#confirmBtn:hover {
    background: #388e3c;
}

#closeMap {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#closeMap:hover {
    background: #f8f8f8;
}

/* ===== CART NOTIFICATION ===== */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #2e7d32;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== CONTINUE SHOPPING BUTTON ===== */
.continue-shopping {
    background: #4caf50;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.continue-shopping:hover,
.continue-shopping:active {
    background: #388e3c;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1768px) {
    .top-nav {
        padding: 12px 10px;
    }
    
    .product-grid, .search-results {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .profile-details, .form-row, .checkout-content, .product-details {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }

    .main-image {
        height: 300px;
    }
    
    .map-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    #confirmBtn, #closeMap {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .banner-slide {
        flex: 0 0 90%;
        height: 220px;
    }

    .banner-nav-btn {
        width: 32px;
        height: 32px;
    }

    .banner-nav-btn i {
        font-size: 14px;
    }
    
    .searc-section {
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    .banner-slide {
        flex: 0 0 95%;
        height: 180px;
    }

    .banner-nav-btn {
        display: none;
    }
    
    .product-grid, .search-results {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }
    
    .category {
        min-width: 120px;
        margin-bottom: 20px;
    }
    
    .category-ico {
        width: 80px;
        height: 25px;
        font-size: 18px;
    }
    
    .container {
        padding: 6px;
    }
    
    
    
    .nav-item {
        font-size: 12px;
    }
    
    .nav-item i {
        font-size: 18px;
    }

    .search-input-large {
        padding: 15px;
        padding-left: 45px;
        font-size: 16px;
    }

    .search-input-large i {
        left: 20px;
        font-size: 18px;
    }

    .product-title {
        font-size: 24px;
    }

    .product-price-details {
        font-size: 20px;
    }

    .main-image {
        height: 250px;
    }
    
    .searc-section {
        padding: 5px 10px;
    }
    
    .search-input {
        padding: 12px 50px 12px 45px;
        font-size: 14px;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover,
    .add-to-cart:hover,
    .checkout-btn:hover {
        transform: none;
    }
    
    .product-card:active,
    .add-to-cart:active,
    .checkout-btn:active {
        transform: translateY(-2px);
    }
}

/* Image fallback */
img {
    max-width: 100%;
    height: auto;
}

/* ===== BOTTOM NAVIGATION STYLES ===== */
.bottom-nav-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 0 10px 10px;
    z-index: 1000;
    pointer-events: none;
}

.nav-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    width: 100%;
    max-width: 450px;
    pointer-events: auto;
}

/* Main Navigation Bar */
.bottom-nav {
    background: rgba(76, 175, 80, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(20px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 6px 10px;
    border-radius: 25px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    border-radius: 18px;
    position: relative;
    min-height: 65px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
    z-index: 1;
}

/* Black Icons & Text by Default */
.nav-icon {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-text {
    font-size: 11px;
    color: #333;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.2;
}

/* Green Active State */
.nav-item.active {
    background: rgb(205, 228, 206);
    transform: translateY(-4px);
}

.nav-item.active .nav-icon {
    color: #4CAF50;
    transform: scale(1.1) translateY(-2px);
}

.nav-item.active .nav-text {
    color: #4CAF50;
    font-weight: 700;
}

/* Active State Indicator */
.nav-item.active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 4px;
    background: #4CAF50;
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(1px);
}

/* Hover Effects */
@media (hover: hover) {
    .nav-item:hover:not(.active) {
        background: rgb(205, 228, 206);
        transform: translateY(-2px);
    }
    
    .nav-item:hover:not(.active) .nav-icon {
        color: #4CAF50;
        transform: translateY(-1px);
    }
    
    .nav-item:hover:not(.active) .nav-text {
        color: #4CAF50;
    }
}

/* Ripple Effect */
.nav-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s ease-out;
    pointer-events: none;
}

.nav-item:active::after {
    transform: translate(-50%, -50%) scale(2);
    transition: transform 0s;
}

/* Grocery Button */
.grocery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.grocery-icon-wrapper {
    width: 65px;
    height: 65px;
    border-radius: 20px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
    border: 2px solid #333;
}

.grocery-icon {
    font-size: 16px;
    color: #4CAF50;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.grocery-text {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.4px;
    white-space: nowrap;
    color: #333;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Grocery Hover & Active States */
@media (hover: hover) {
    .grocery-icon-wrapper:hover {
        background: #f4f7f4;
        border-color: #4CAF50;
        transform: translateY(-3px) scale(1.05);
        box-shadow: 
            0 12px 30px rgba(76, 175, 80, 0.25),
            0 4px 15px rgba(76, 175, 80, 0.15);
    }
    
    .grocery-icon-wrapper:hover .grocery-icon {
        transform: scale(1.1) rotate(-5deg);
    }
    
    .grocery-container:hover .grocery-text {
        color: #4CAF50;
        background: rgba(255, 255, 255, 0.95);
    }
}

.grocery-icon-wrapper:active {
    transform: translateY(0) scale(0.95);
}





.grocery-icon-wrapper:hover,
.grocery-icon-wrapper:active {
    animation: none;
}

/* Responsive Design */
@media (max-width: 480px) {
    .bottom-nav-container {
        padding: 0 10px 10px;
    }
    
    .nav-wrapper {
        gap: 12px;
    }
    
    .bottom-nav {
        padding: 6px 8px;
        border-radius: 22px;
    }
    
    .nav-item {
        padding: 4px 6px;
        min-height: 55px;
        border-radius: 16px;
    }
    
    .nav-icon {
        font-size: 16px;
    }
    
    .nav-text {
        font-size: 10px;
    }
    
    .grocery-icon-wrapper {
        width: 55px;
        height: 55px;
        border-radius: 18px;
    }
    
    .grocery-icon {
        font-size: 22px;
    }
    
    .grocery-text {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Small Mobile Devices */
@media (max-width: 360px) {
    .bottom-nav-container {
        padding: 0 8px 8px;
    }
    
    .nav-wrapper {
        gap: 10px;
    }
    
    .bottom-nav {
        padding: 4px 6px;
    }
    
    .nav-item {
        padding: 6px 4px;
        min-height: 55px;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    .nav-text {
        font-size: 9px;
    }
    
    .grocery-icon-wrapper {
        width: 55px;
        height: 55px;
    }
    
    .grocery-icon {
        font-size: 16px;
    }
    
    .grocery-text {
        font-size: 9px;
        padding: 1px 5px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(76, 175, 80, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-icon {
        color: #333;
    }
    
    .nav-text {
        color: #333;
    }
    
    .grocery-text {
        color: #ffffff;
        background: rgba(0, 0, 0, 0.7);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .grocery-icon-wrapper {
        animation: none;
    }
    
    .nav-item::after {
        display: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bottom-nav {
        background: rgba(76, 175, 80, 0.2);
        border: 2px solid #4CAF50;
    }
    
    .nav-item.active {
        background: #4CAF50;
    }
    
    .nav-item.active .nav-icon,
    .nav-item.active .nav-text {
        color: white;
    }
    
    .grocery-text {
        background: white;
        color: black;
        border: 1px solid black;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-item:active {
        background: rgba(76, 175, 80, 0.15);
        transform: scale(0.95);
    }
    
    .grocery-icon-wrapper:active {
        transform: scale(0.9);
    }
    
    /* Larger touch targets for mobile */
    .nav-item {
        min-height: 70px;
    }
    
    .grocery-icon-wrapper {
        width: 70px;
        height: 70px;
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .bottom-nav-container {
        padding: 0 10px 10px;
    }
    
    .nav-wrapper {
        gap: 8px;
    }
    
    .nav-item {
        min-height: 50px;
        padding: 6px 4px;
    }
    
    .nav-icon {
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .nav-text {
        font-size: 9px;
    }
    
    .grocery-icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .grocery-icon {
        font-size: 18px;
    }
    
    .grocery-text {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* Print Styles */
@media print {
    .bottom-nav-container {
        display: none;
    }
}
/* Mobile Devices (480px to 575px) */
@media (min-width: 480px) and (max-width: 575px) {
    body {
        padding-bottom: 65px;
    }
    
    .container {
        padding: 0 3px;
    }
    
    .top-nav {
        padding: 8px 10px;
    }
    
    .loc-left {
        gap: 6px;
    }
    
    .loc-title {
        font-size: 16px;
    }
    
    .loc-address {
        max-width: 120px;
        font-size: 20px;
    }
    
    .nav-icons {
        gap: 10px;
    }
    
    .nav-icons a {
        width: 50px;
        height: 50px;
        font-size: 15px;
    }
    
    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }
    
    .searc-section {
        padding: 10px 12px;
        margin-bottom: 8px;
    }
    
    .searc-container {
        height: 55px;
    }
    
    .search-input {
        font-size: 18px;
        padding: 12px 40px 12px 38px;
        border-radius: 14px;
    }
    
    .search-icon,
    .mic-icon {
        font-size: 18px;
    }
    
    .search-icon {
        left: 12px;
    }
    
    .mic-icon {
        right: 15px;
    }
    
    .banner-slider {
        padding: 8px 0 1px;
    }
    
    .banner-slide {
        height: 200px;
        flex: 0 0 88%;
    }
    
    .banner-content {
        padding: 15px;
    }
    
    .banner-title {
        font-size: 15px;
        margin-bottom: 4px;
    }
    
    .banner-subtitle {
        font-size: 12px;
    }
    
    .banner-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .banner-nav-btn {
        display: none;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 10px;
    }
    
    .product-card {
        border-radius: 10px;
    }
    
    .product-image {
        height: 130px;
        border-radius: 8px;
    }
    
    .product-name {
        font-size: 13px;
        height: 36px;
    }
    
    .product-description {
        font-size: 12px;
    }
    
    .discounted-price,
    .regular-price {
        font-size: 1rem;
    }
    
    .add-to-cart {
        padding: 5px 12px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .categories {
        gap: 8px;
        padding: 8px 5px;
        margin-bottom: 15px;
    }
    
    .category {
        min-width: 100px;
    }
    
    .category-icon {
        width: 100px;
        height: 100px;
    }
    
    .category p {
        font-size: 16px;
        margin-top: 6px;
    }
    
    .bottom-nav-container {
        padding: 0 px px;
    }
    
    .nav-wrapper {
        max-width: 500px;
        gap: 24px;
    }
    
    .bottom-nav {
        padding: 4px 10px;
        border-radius: 20px;
    }
    
    .nav-item {
        min-height: 65px;
        padding: 3px 8px;
        border-radius: 16px;
    }
    
    .nav-icon {
        font-size: 24px;
        margin-bottom: 4px;
    }
    
    .nav-text {
        font-size: 11px;
    }
    
    .grocery-icon-wrapper {
        width: 65px;
        height: 65px;
        border-radius: 16px;
    }
    
    .grocery-icon {
        font-size: 22px;
    }
    
    .grocery-text {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* Small Mobile Devices (320px to 479px) */
@media (max-width: 479px) {
    body {
        padding-bottom: 60px;
    }
    
    .container {
        padding: 0 3px;
    }
    
    .top-nav {
        padding: 6px 8px;
    }
    
    .loc-title {
        font-size: 14px;
    }
    
    .loc-address {
        max-width: 200px;
        font-size: 18px;
    }
    
    .nav-icons {
        gap: 8px;
    }
    
    .nav-icons a {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .cart-count {
        width: 19px;
        height: 19px;
        font-size: 15px;
        top: -5px;
        right: -5px;
    }
    
    .searc-section {
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    
    .searc-container {
        height: 55px;
    }
    
    .search-input {
        font-size: 16px;
        padding: 10px 35px 10px 32px;
        border-radius: 12px;
        border-width: 1.5px;
    }
    
    .search-icon,
    .mic-icon {
        font-size: 16px;
    }
    
    .search-icon {
        left: 10px;
    }
    
    .mic-icon {
        right: 12px;
    }
    
    .banner-slider {
        padding: 6px 0 1px;
    }
    
    .banner-slide {
        height: 180px;
        flex: 0 0 85%;
    }
    
    .banner-content {
        padding: 12px;
    }
    
    .banner-title {
        font-size: 14px;
    }
    
    .banner-subtitle {
        font-size: 11px;
    }
    
    .banner-badge {
        font-size: 10px;
        padding: 4px 8px;
        top: 10px;
        left: 10px;
    }
    
    .banner-controls {
        bottom: 10px;
    }
    
    .banner-dot {
        width: 8px;
        height: 8px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 8px;
    }
    
    .product-card {
        border-radius: 8px;
        padding: 1px;
    }
    
    .product-image {
        height: 120px;
        border-radius: 6px;
    }
    
    .product-info {
        padding: 6px;
    }
    
    .product-name {
        font-size: 12px;
        height: 34px;
        margin-bottom: 3px;
    }
    
    .product-description {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .discount-badge {
        font-size: 10px;
        padding: 3px 3px;
    }
    
    .discounted-price,
    .regular-price {
        font-size: 0.9rem;
    }
    
    .original-price {
        font-size: 0.7rem;
    }
    
    .add-to-cart {
        padding: 4px 10px;
        font-size: 11px;
        border-radius: 5px;
    }
    
    .categories {
        gap: 6px;
        padding: 6px 3px;
        margin-bottom: 12px;
    }
    
    .category {
        min-width: 90px;
        padding: 3px;
    }
    
    .category-icon {
        width: 90px;
        height: 90px;
    }
    
    .category p {
        font-size: 16px;
        margin-top: 6px;
    }
    
    .category.active::after {
        height: 2px;
        bottom: -6px;
    }
    
    .bottom-nav-container {
        padding: 0 6px 6px;
    }
    
    .nav-wrapper {
        max-width: 479px;
        gap: 4px;
    }
    
    .bottom-nav {
        padding: 3px 4px;
        border-radius: 18px;
    }
    
    .nav-item {
        min-height: 65px;
        padding: 2px 3px;
        border-radius: 14px;
    }
    
    .nav-icon {
        font-size: 20px;
        margin-bottom: 3px;
    }
    
    .nav-text {
        font-size: 10px;
        letter-spacing: 0.2px;
    }
    
    .grocery-icon-wrapper {
        width: 65px;
        height: 65px;
        border-radius: 14px;
    }
    
    .grocery-icon {
        font-size: 18px;
    }
    
    .grocery-text {
        font-size: 12px;
        padding: 1px 4px;
    }
}
