/* Hide saved addresses section - for future use */
#saved-addresses-section {
    display: none !important;
}

/* Hide location selector - for future use */
#location-selector,
.location-selector {
    display: none !important;
}

:root {
    /* Yellow/Gold Theme - Kidai Kari */
    --primary: #F59E0B;
    --primary-dark: #D97706;
    --primary-light: #FEF3C7;
    --secondary: #FBBF24;
    --secondary-dark: #F59E0B;
    --accent: #F59E0B;
    --dark: #1A1A2E;
    --dark-secondary: #16213E;
    --light: #F8FAFC;
    --gray: #64748B;
    --gray-light: #94A3B8;
    --light-gray: #E2E8F0;
    --border: #E2E8F0;
    --white: #FFFFFF;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

/* Performance: Optimize image rendering */
img {
    content-visibility: auto;
}

/* Performance: GPU acceleration for animations */
.product-card,
.category-card,
.banner-slide {
    will-change: transform;
    transform: translateZ(0);
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--white);
    position: relative;
}

/* ========================================
   MODERN HEADER
   ======================================== */
.app-header {
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 50%, #F59E0B 100%);
    color: var(--dark);
    padding: 0.4rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1001; /* Higher than product modal (99) to stay visible */
    box-shadow: var(--shadow-md);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.375rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.logo img {
    height: 46px;
    width: auto;
    object-fit: contain;
    filter: none;
}

.logo i {
    font-size: 1.75rem;
    background: rgba(0,0,0,0.1);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--dark);
}

.header-actions {
    display: flex;
    gap: 0.625rem;
}

.header-action-btn {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.15);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
    font-size: 1rem;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0); /* GPU acceleration to prevent jank */
}

.header-action-btn i {
    line-height: 1;
    display: block;
}

.header-action-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Only apply transform on desktop with pointer device (not touch) */
@media (hover: hover) and (pointer: fine) {
    .header-action-btn:hover {
        transform: translateY(-2px);
    }
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--error);
    color: white;
    border-radius: var(--radius-full);
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid var(--dark);
    box-shadow: var(--shadow);
}

.cart-badge:empty { display: none; }

.location-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
    transition: var(--transition);
    color: var(--dark);
}

.location-selector:hover {
    background: rgba(0, 0, 0, 0.15);
}

.location-selector i:first-child {
    color: #FFD93D;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.app-main {
    flex: 1;
    padding-bottom: 85px;
}

.screen { display: none !important; }
.screen.active {
    display: block !important;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   MODERN BANNER SLIDER
   ======================================== */
.banner-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--light) 0%, #E8EDF5 100%);
}

.banner-track {
    position: relative;
    width: 100%;
}

.banner-slide {
    display: none;
    width: 100%;
}

.banner-slide.active {
    display: block;
    animation: bannerFade 0.6s ease-out;
}

@keyframes bannerFade {
    from { opacity: 0; transform: scale(1.02); }
    to { opacity: 1; transform: scale(1); }
}

.banner-slide a {
    display: block;
    width: 100%;
}

.banner-slide img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 6;
    object-fit: cover;
}

/* Responsive Banner Images - Show only one image at a time */
/* Desktop: Show desktop image only - FULL HEIGHT */
.banner-img-desktop {
    display: block !important;
    width: 100%;
    height: auto;
}

.banner-img-mobile {
    display: none !important;
}

/* Mobile: Show mobile image only, hide desktop image */
@media (max-width: 768px) {
    .banner-img-desktop {
        display: none !important;
    }

    .banner-img-mobile {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: unset !important;
        object-fit: contain !important;
        max-height: none !important;
        min-height: unset !important;
    }

    .banner-slide img {
        aspect-ratio: unset !important;
        object-fit: contain !important;
    }
}

/* DESKTOP ONLY: Show full banner without cropping (1024px+) */
@media (min-width: 1024px) {
    .banner-slider {
        width: 100% !important;
        margin: 0 !important;
        overflow: hidden !important;
        line-height: 0 !important;
        min-height: 550px !important;
    }

    .banner-track {
        line-height: 0 !important;
    }

    .banner-slide {
        line-height: 0 !important;
        min-height: 550px !important;
    }

    .banner-slide img {
        aspect-ratio: unset !important;
        object-fit: cover !important;
        object-position: center !important;
        max-height: none !important;
        min-height: 550px !important;
        height: auto !important;
        width: 100% !important;
        display: block !important;
        vertical-align: bottom !important;
    }

    .banner-img-desktop {
        display: block !important;
        object-fit: cover !important;
        object-position: center !important;
        min-height: 550px !important;
        vertical-align: bottom !important;
    }
}

/* Larger Desktop - Increase banner height */
@media (min-width: 1440px) {
    .banner-slider {
        min-height: 650px !important;
    }

    .banner-slide {
        min-height: 650px !important;
    }

    .banner-slide img {
        min-height: 650px !important;
    }

    .banner-img-desktop {
        min-height: 650px !important;
    }
}

/* Extra Large Desktop - Even taller */
@media (min-width: 1920px) {
    .banner-slider {
        min-height: 750px !important;
    }

    .banner-slide {
        min-height: 750px !important;
    }

    .banner-slide img {
        min-height: 750px !important;
    }

    .banner-img-desktop {
        min-height: 750px !important;
    }
}

.banner-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-full);
    backdrop-filter: blur(8px);
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.banner-dot:hover { background: rgba(255, 255, 255, 0.7); }

.banner-dot.active {
    background: var(--white);
    width: 24px;
}

/* ========================================
   MODERN CATEGORIES
   ======================================== */
.categories {
    padding: 1.5rem 1.25rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title a {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-grid {
    display: flex;
    gap: 0.875rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.category-grid::-webkit-scrollbar { display: none; }

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 0.875rem;
    background: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--light-gray);
    min-width: 100px;
    max-width: 120px;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-card.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(22, 101, 52, 0.35);
}

.category-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-light), #F8E0E8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.category-card.active .category-icon {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
}

.category-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========================================
   MODERN PRODUCTS SECTION
   ======================================== */
.products-section {
    padding: 0 1.25rem 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 200px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--error);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
}

.product-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray);
}

.product-wishlist:hover {
    background: var(--error);
    color: white;
}

.out-of-stock-badge {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(2px);
}

.bogo-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
    animation: bogo-pulse 2s ease-in-out infinite;
}

.bogo-badge i {
    font-size: 0.75rem;
}

@keyframes bogo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.product-info, .product-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.product-rating i { color: #FFC107; }

.product-rating .rating-value {
    font-weight: 600;
    color: var(--dark);
}

.product-rating .rating-count {
    color: var(--gray);
    font-size: 0.7rem;
}

.product-name {
    font-weight: 600;
    margin-bottom: 0.375rem;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-unit {
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 0.75rem;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 0.75rem;
    flex-wrap: nowrap;
    padding-top: 0.5rem;
}

/* Button container for Add/Quantity - prevents collapse */
.product-footer .add-to-cart-btn,
.product-footer .quantity-controls {
    flex-shrink: 0;
}

.product-price {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.product-price .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.product-price .unit {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
}

.product-price .original-price {
    font-size: 0.75rem;
    color: var(--gray);
    text-decoration: line-through;
}

.add-to-cart-btn {
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(22, 101, 52, 0.4);
}

.add-to-cart-btn.added {
    background: linear-gradient(135deg, var(--success), #9C2E4E);
}

.add-to-cart-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.5rem;
    min-height: 36px;
}

.quantity-controls .qty-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.quantity-controls .qty-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.quantity-controls .qty-btn:active {
    transform: scale(0.95);
}

.quantity-controls .qty-value {
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 24px;
    text-align: center;
    line-height: 1;
}

/* ========================================
   BOTTOM NAVIGATION (Mobile Only)
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 0.625rem 0;
    padding-bottom: calc(0.625rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 100;
    border-top: 1px solid var(--light-gray);
}

/* Hide bottom nav on tablet and desktop */
@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--gray);
    transition: var(--transition);
    flex: 1;
    padding: 0.5rem 0;
    position: relative;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

.nav-item i {
    font-size: 1.25rem;
    transition: var(--transition);
}

.nav-item.active i {
    transform: scale(1.1);
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
}

/* ========================================
   MODERN MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal.active { display: flex; }

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.35s ease;
    box-shadow: var(--shadow-xl);
}

@keyframes modalSlideIn {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.modal-header h3 {
    font-weight: 600;
    font-size: 1.1rem;
}

.close-modal {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-modal:hover { background: rgba(255, 255, 255, 0.25); }

.modal-body { padding: 1.5rem; }

/* ========================================
   SEARCH MODAL
   ======================================== */
#search-modal .modal-content { max-width: 450px; }

#search-modal .modal-header {
    background: var(--white);
    color: var(--dark);
    border-bottom: 1px solid var(--light-gray);
    padding: 1rem 1.25rem;
}

#search-modal .close-modal {
    background: var(--light);
    color: var(--gray);
}

#search-modal .modal-body { padding: 0; }

.search-input-container {
    position: relative;
    padding: 1rem 1.25rem;
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
}

.search-input-container .search-icon {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-input-container input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--light);
    transition: var(--transition);
}

.search-input-container input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.1);
}

#search-results {
    padding: 1rem 1.25rem;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover { background: var(--light); }

.search-result-item img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.search-result-info { flex: 1; min-width: 0; }

.search-result-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-category {
    font-size: 0.8rem;
    color: var(--gray);
}

.search-result-price {
    font-weight: 700;
    color: var(--primary);
}

.search-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
}

.search-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.search-empty .title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

/* ========================================
   LOCATION MODAL
   ======================================== */
#location-modal .modal-content {
    max-width: 450px;
}

#location-modal .modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

#location-modal .modal-body {
    padding: 1.25rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* ========================================
   LOCATION MAP MODAL (Google Maps)
   ======================================== */
/* ============================================
   LOCATION MAP MODAL
   ============================================ */
#location-map-modal {
    z-index: 9999 !important;
}

#location-map-modal .modal-content {
    max-width: 700px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
}

#location-map-modal .modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1rem 1.25rem;
    border-radius: 16px 16px 0 0;
}

#location-map-modal .modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

#location-map-modal .modal-body {
    padding: 0;
    overflow: visible;
}

#location-map-modal iframe {
    width: 100%;
    height: 300px;
    border: 0;
    display: block;
}

/* Store Info Section */
.store-info-section {
    padding: 1.25rem;
    background: #FAFAFA;
}

.store-info-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.store-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.store-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    color: #D97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.store-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.store-info-text strong {
    font-size: 0.8rem;
    color: #6B7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.store-info-text span,
.store-info-text a {
    font-size: 0.95rem;
    color: #1F2937;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
}

.store-info-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.store-directions-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.store-directions-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Desktop: wider layout */
@media (min-width: 768px) {
    #location-map-modal iframe {
        height: 350px;
    }

    .store-info-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .store-info-item {
        flex: 1;
        min-width: 180px;
    }

    .store-directions-btn {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* Mobile: compact */
@media (max-width: 480px) {
    #location-map-modal .modal-content {
        width: 96%;
        border-radius: 14px;
    }

    #location-map-modal iframe {
        height: 220px;
    }

    #location-map-modal .modal-header {
        padding: 0.85rem 1rem;
        border-radius: 14px 14px 0 0;
    }

    #location-map-modal .modal-header h3 {
        font-size: 1rem;
    }

    .store-info-section {
        padding: 1rem;
    }

    .store-info-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .store-info-text span,
    .store-info-text a {
        font-size: 0.9rem;
    }
}

/* Saved Address Items */
.saved-address-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.saved-address-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.saved-address-item.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.saved-address-item .address-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-light), #F8E0E8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.saved-address-item.selected .address-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

.saved-address-item .address-content {
    flex: 1;
    min-width: 0;
}

.saved-address-item .address-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.saved-address-item .address-text {
    font-size: 0.85rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-address-item .selected-icon {
    color: var(--primary);
    font-size: 1.1rem;
}

.saved-address-item .delete-address-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.saved-address-item:hover .delete-address-btn {
    opacity: 1;
}

.saved-address-item .delete-address-btn:hover {
    background: #FEE2E2;
    color: #EF4444;
}

/* Add Address Button */
.add-address-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    border: 2px dashed var(--primary);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.add-address-btn:hover {
    background: var(--primary-light);
}

/* Location Search Results */
.location-result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark);
    border-bottom: 1px solid #f3f4f6;
}

.location-result-item:last-child {
    border-bottom: none;
}

.location-result-item:hover,
.location-result-item:active {
    background: var(--primary-light);
}

.location-result-item i {
    color: var(--primary);
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.location-result-text {
    flex: 1;
    min-width: 0;
}

.location-result-text strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-result-text small {
    display: block;
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No Addresses State */
.no-addresses {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray);
}

.no-addresses i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

.no-results {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray);
}

.no-results i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.3;
}

/* Add Address Form */
.add-address-form {
    padding: 0.5rem 0;
}

.add-address-form h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1.25rem;
}

.address-type-selector {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.address-type-selector .type-option {
    flex: 1;
    min-width: 80px;
}

.address-type-selector .type-option input {
    display: none;
}

.address-type-selector .type-option span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray);
}

.address-type-selector .type-option span i {
    font-size: 1.25rem;
}

.address-type-selector .type-option input:checked + span {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.add-address-form .form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.add-address-form .form-actions .btn {
    flex: 1;
}

.add-address-form textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(22, 101, 52, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-block { width: 100%; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669) !important;
    color: var(--white) !important;
    transform: scale(1.02);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.1);
}

.form-control::placeholder {
    color: var(--gray-light);
}

/* ========================================
   LOGIN SCREEN
   ======================================== */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem;
    text-align: center;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--white) 100%);
}

.login-logo {
    margin-bottom: 2rem;
}

.login-logo img {
    height: 160px;
    width: auto;
    margin-bottom: 1.5rem;
}

.login-logo i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.login-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.login-logo p {
    color: var(--gray);
    margin-top: 0.5rem;
}

/* ========================================
   LOADING & UTILITIES
   ======================================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-overlay.active { display: flex; }

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.image-lightbox.active { display: flex; }

.image-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.1);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    color: var(--dark);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
}

.image-lightbox-close:hover {
    background: var(--white);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

.image-lightbox-close:active {
    transform: scale(0.95);
}

.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--error);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    z-index: 9998;
    display: none;
}

.offline-indicator.active { display: block; }

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--dark);
    color: var(--white);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.warning { background: var(--warning); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   RESPONSIVE - MOBILE FIRST
   ======================================== */
@media (max-width: 480px) {
    .app-header {
        padding: 0.3rem 0.75rem;
    }

    .header-top {
        margin-bottom: 0.25rem;
    }

    .logo {
        font-size: 1.1rem;
        gap: 0.4rem;
    }

    .logo img {
        width: auto;
        height: 36px;
    }

    .header-actions {
        gap: 0.4rem;
    }

    .header-action-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .location-selector {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }

    .categories {
        padding: 1rem 0 1rem 1rem;
    }

    .category-grid {
        gap: 0.75rem;
        padding-right: 1rem;
    }

    .category-card {
        min-width: 90px;
        max-width: 110px;
        padding: 0.75rem 0.5rem;
    }

    .category-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .category-name {
        font-size: 0.65rem;
    }

    .section-title {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .products-section {
        padding: 0 1rem 1.5rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-card {
        flex-direction: row;
        height: 140px;
    }

    .product-image {
        width: 130px;
        height: 100%;
        min-width: 130px;
    }

    .product-info, .product-details {
        flex: 1;
        padding: 0.75rem;
        justify-content: space-between;
    }

    .product-name {
        font-size: 0.9rem;
        min-height: auto;
        -webkit-line-clamp: 2;
    }

    .product-rating {
        margin-bottom: 0.25rem;
        display: none; /* Hide rating on very small screens to save space */
    }

    /* Mobile product footer - prevent collapse */
    .product-footer {
        flex-wrap: nowrap;
        gap: 0.375rem;
        align-items: center;
    }

    .product-price {
        flex: 1;
        min-width: 0;
    }

    .product-price .price {
        font-size: 0.95rem;
    }

    .product-price .original-price {
        font-size: 0.65rem;
    }

    .product-footer .add-to-cart-btn {
        padding: 0.4rem 0.625rem;
        font-size: 0.7rem;
        min-height: 30px;
        flex-shrink: 0;
    }

    .product-footer .add-to-cart-btn i {
        display: none; /* Hide icon on very small screens */
    }

    .quantity-controls {
        padding: 0.2rem 0.35rem;
        min-height: 30px;
        gap: 0.2rem;
        flex-shrink: 0;
    }

    .quantity-controls .qty-btn {
        width: 22px;
        height: 22px;
        min-width: 22px;
        min-height: 22px;
        font-size: 0.7rem;
    }

    .quantity-controls .qty-value {
        font-size: 0.75rem;
        min-width: 18px;
    }

    .bottom-nav {
        padding: 0.5rem 0;
    }

    .nav-item i {
        font-size: 1.15rem;
    }

    .nav-item span {
        font-size: 0.65rem;
    }
}

/* ========================================
   TABLET
   ======================================== */
@media (min-width: 481px) and (max-width: 767px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-card {
        flex-direction: column;
        height: auto;
    }

    .product-image {
        width: 100%;
        height: 220px;
        min-width: auto;
        padding: 15px;
        background: #FFFFFF;
    }

    .category-grid {
        gap: 1rem;
    }

    .category-card {
        min-width: 100px;
        max-width: 130px;
        padding: 1rem;
    }

    .category-icon {
        width: 50px;
        height: 50px;
    }

    .category-name {
        font-size: 0.75rem;
    }

    /* Tablet product footer styles - prevent collapse */
    .product-footer {
        gap: 0.5rem;
        flex-wrap: nowrap;
        align-items: center;
    }

    .product-price {
        flex: 1;
        min-width: 0;
    }

    .product-price .price {
        font-size: 1rem;
    }

    .product-footer .add-to-cart-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.75rem;
        min-height: 34px;
        flex-shrink: 0;
    }

    .quantity-controls {
        padding: 0.25rem 0.45rem;
        min-height: 34px;
        gap: 0.3rem;
        flex-shrink: 0;
    }

    .quantity-controls .qty-btn {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        font-size: 0.75rem;
    }

    .quantity-controls .qty-value {
        font-size: 0.85rem;
        min-width: 20px;
    }
}

/* ========================================
   TABLET VIEW (769px - 1024px)
   ======================================== */
@media (min-width: 769px) {
    /* Remove bottom padding since no mobile nav */
    .app-main {
        padding-bottom: 2rem;
    }

    .app-header {
        padding: 1rem 2rem;
    }

    /* Enhanced header for tablet/desktop */
    .header-top {
        margin-bottom: 0;
    }

    .location-selector {
        margin-top: 0;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo img {
        height: 70px;
    }

    .header-action-btn {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .categories {
        padding: 2rem;
    }

    .category-grid {
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 1.5rem;
        justify-content: flex-start;
    }

    .category-card {
        min-width: 120px;
        max-width: 150px;
        padding: 1.25rem;
    }

    .category-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg);
    }

    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }

    .category-name {
        font-size: 0.85rem;
    }

    .products-section {
        padding: 0 2rem 2.5rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
        padding: 0;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .product-card {
        flex-direction: column;
        height: auto;
    }

    .product-image {
        width: 100%;
        height: 240px;
        min-width: auto;
        padding: 15px;
        background: #FFFFFF;
    }

    .product-info, .product-details {
        padding: 1.25rem;
    }

    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-xl);
    }

    /* Tablet/Desktop product footer styles */
    .product-footer {
        gap: 0.75rem;
    }

    .product-footer .add-to-cart-btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
        min-height: 38px;
    }

    .quantity-controls {
        padding: 0.35rem 0.6rem;
        min-height: 38px;
        gap: 0.4rem;
    }

    .quantity-controls .qty-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 0.85rem;
    }

    .quantity-controls .qty-value {
        font-size: 0.95rem;
        min-width: 24px;
    }
}

/* ========================================
   LARGE DESKTOP (≥1024px)
   ======================================== */
@media (min-width: 1024px) {
    /* Full width for desktop screens */
    .app-container {
        max-width: 100%;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .app-header {
        padding: 1rem 3rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .header-top {
        flex: 1;
        margin-bottom: 0;
    }

    .location-selector {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

    .logo {
        font-size: 1.6rem;
    }

    .logo img {
        height: 75px;
    }

    .header-actions {
        gap: 0.875rem;
    }

    .header-action-btn {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
        border-radius: var(--radius);
    }

    .header-action-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

    .categories {
        padding: 2.5rem 3rem;
    }

    .category-grid {
        justify-content: center;
        gap: 2rem;
    }

    .products-section {
        padding: 0 3rem 3rem;
    }

    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.75rem;
    }

    .product-image {
        height: 260px;
        padding: 15px;
        background: #FFFFFF;
    }

    .banner-slider {
        margin: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        line-height: 0 !important;
        min-height: 550px !important;
    }

    .banner-slide img {
        aspect-ratio: unset !important;
        max-height: none !important;
        min-height: 550px !important;
        height: auto !important;
        width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        border-radius: 0 !important;
        display: block !important;
        vertical-align: bottom !important;
    }

    .category-card {
        min-width: 140px;
        max-width: 170px;
        padding: 1.5rem;
        cursor: pointer;
    }

    .category-card:hover {
        transform: translateY(-8px) scale(1.02);
    }

    .category-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .category-name {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    /* Enhanced product cards for desktop */
    .product-card {
        cursor: pointer;
        border-radius: var(--radius);
    }

    .product-card:hover .product-image img {
        transform: scale(1.05);
    }

    .product-image {
        overflow: hidden;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .product-image img {
        transition: transform 0.4s ease;
    }

    .add-to-cart-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(176, 51, 89, 0.4);
    }

    /* Large Desktop product footer styles */
    .product-footer {
        gap: 0.875rem;
    }

    .product-footer .add-to-cart-btn {
        padding: 0.6rem 1.125rem;
        font-size: 0.875rem;
        min-height: 40px;
    }

    .quantity-controls {
        padding: 0.4rem 0.65rem;
        min-height: 40px;
        gap: 0.45rem;
    }

    .quantity-controls .qty-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 0.9rem;
    }

    .quantity-controls .qty-value {
        font-size: 1rem;
        min-width: 26px;
    }
}

/* ========================================
   EXTRA LARGE DESKTOP (≥1400px)
   ======================================== */
@media (min-width: 1400px) {
    .app-header {
        padding: 1.25rem 4rem;
    }

    .logo {
        font-size: 1.75rem;
    }

    .categories {
        padding: 3rem 4rem;
    }

    .products-section {
        padding: 0 4rem 3rem;
    }

    .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2rem;
    }

    .product-image {
        height: 240px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Extra Large Desktop product footer styles */
    .product-footer {
        gap: 1rem;
    }

    .product-footer .add-to-cart-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
        min-height: 42px;
    }

    .quantity-controls {
        padding: 0.45rem 0.75rem;
        min-height: 42px;
        gap: 0.5rem;
    }

    .quantity-controls .qty-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        font-size: 0.95rem;
    }

    .quantity-controls .qty-value {
        font-size: 1.05rem;
        min-width: 28px;
    }
}

/* ========================================
   ULTRA WIDE DESKTOP (≥1800px)
   ======================================== */
@media (min-width: 1800px) {
    .app-header {
        padding: 1.25rem 5rem;
    }

    .categories {
        padding: 3rem 5rem;
    }

    .products-section {
        padding: 0 5rem 3rem;
    }

    .product-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .product-image {
        height: 260px;
    }

    /* Ultra Wide Desktop product footer styles */
    .product-footer {
        gap: 1.125rem;
    }

    .product-footer .add-to-cart-btn {
        padding: 0.7rem 1.375rem;
        font-size: 0.95rem;
        min-height: 44px;
    }

    .quantity-controls {
        padding: 0.5rem 0.8rem;
        min-height: 44px;
        gap: 0.55rem;
    }

    .quantity-controls .qty-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        font-size: 1rem;
    }

    .quantity-controls .qty-value {
        font-size: 1.1rem;
        min-width: 30px;
    }
}

/* ========================================
   MOBILE ONLY STYLES (≤768px)
   ======================================== */
@media (max-width: 768px) {
    /* Ensure bottom nav shows only on mobile */
    .bottom-nav {
        display: flex;
    }

    /* Add bottom padding for mobile nav */
    .app-main {
        padding-bottom: 85px;
    }

    /* Mobile header adjustments */
    .app-header {
        padding: 0.5rem 1rem;
    }

    .header-top {
        margin-bottom: 0;
    }

    .logo {
        font-size: 1.125rem;
    }

    .logo img {
        width: 55px;
        height: 50px;
    }

    .header-action-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .location-selector {
        font-size: 0.8rem;
        padding: 0.5rem 0.875rem;
    }

    /* Mobile product grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }

    .product-image {
        height: 180px;
        padding: 12px;
        background: #FFFFFF;
    }

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .product-name {
        font-size: 0.85rem;
    }

    .product-price .price {
        font-size: 1rem;
    }

    /* Mobile product footer - prevent collapse */
    .product-footer {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .product-footer .add-to-cart-btn {
        padding: 0.4rem 0.65rem;
        font-size: 0.75rem;
        min-height: 32px;
        flex-shrink: 0;
    }

    .quantity-controls {
        padding: 0.25rem 0.4rem;
        min-height: 32px;
        gap: 0.25rem;
        flex-shrink: 0;
    }

    .quantity-controls .qty-btn {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        font-size: 0.75rem;
    }

    .quantity-controls .qty-value {
        font-size: 0.8rem;
        min-width: 18px;
    }

    /* Mobile categories */
    .categories {
        padding: 1rem;
    }

    .category-grid {
        gap: 0.75rem;
    }

    .category-card {
        min-width: 85px;
        max-width: 100px;
        padding: 0.75rem 0.5rem;
    }

    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .category-name {
        font-size: 0.6rem;
    }

    .section-title {
        font-size: 1.1rem;
        padding: 0 0.25rem;
    }

    .products-section {
        padding: 0 1rem 1.5rem;
    }
}

/* ========================================
   LOCATION AUTOCOMPLETE DROPDOWN
   ======================================== */
.location-autocomplete-dropdown {
    position: fixed;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    max-height: 280px;
    overflow: hidden;
    z-index: 10001; /* Above modal (z-index: 10000) */
    display: none;
    min-width: 280px;
}

.location-autocomplete-dropdown.show {
    display: block;
    animation: dropdownSlideIn 0.2s ease-out;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-results {
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for autocomplete */
.autocomplete-results::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-results::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 3px;
}

.autocomplete-results::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 3px;
}

.autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* Autocomplete Item */
.autocomplete-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--light-gray);
    transition: background-color 0.15s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--primary-light);
}

.autocomplete-item.active {
    background: linear-gradient(135deg, var(--primary-light) 0%, #F5D0DC 100%);
}

.autocomplete-item i {
    color: var(--primary);
    font-size: 1rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.autocomplete-item-content {
    flex: 1;
    min-width: 0;
}

.autocomplete-item-main {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.3;
    word-wrap: break-word;
}

.autocomplete-item-sub {
    font-size: 0.8125rem;
    color: var(--gray);
    margin-top: 0.125rem;
    line-height: 1.3;
}

/* Highlighted matching text */
.autocomplete-item mark {
    background: transparent;
    color: var(--primary);
    font-weight: 600;
}

/* Loading State */
.autocomplete-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.autocomplete-loading i {
    color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* No Results State */
.autocomplete-no-results {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--gray);
}

.autocomplete-no-results i {
    font-size: 2rem;
    color: var(--gray-light);
    margin-bottom: 0.5rem;
    display: block;
}

.autocomplete-no-results .no-results-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.autocomplete-no-results .no-results-hint {
    font-size: 0.8125rem;
    color: var(--gray);
}

/* Error State */
.autocomplete-error {
    padding: 1.25rem 1rem;
    text-align: center;
    color: var(--error);
    font-size: 0.875rem;
}

.autocomplete-error i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
    .location-autocomplete-dropdown {
        left: 1rem !important;
        right: 1rem !important;
        width: auto !important;
        min-width: auto;
    }

    .autocomplete-item {
        padding: 0.75rem;
        gap: 0.625rem;
    }

    .autocomplete-item-main {
        font-size: 0.875rem;
    }

    .autocomplete-item-sub,
    .autocomplete-address {
        font-size: 0.75rem;
    }

    .autocomplete-distance {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
}

/* Autocomplete new class aliases (used by location.js API search) */
.autocomplete-icon {
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
    margin-top: 0.125rem;
}

.autocomplete-icon i {
    color: var(--primary);
    font-size: 1rem;
}

.autocomplete-content {
    flex: 1;
    min-width: 0;
}

.autocomplete-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.3;
    word-wrap: break-word;
}

.autocomplete-address {
    font-size: 0.8125rem;
    color: var(--gray);
    margin-top: 0.125rem;
    line-height: 1.3;
}

.autocomplete-distance {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    align-self: center;
    white-space: nowrap;
}

.autocomplete-no-results p {
    font-size: 0.8125rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

.autocomplete-no-results span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
    display: block;
    margin-bottom: 0.25rem;
}

/* ========================================
   PRODUCT DETAIL MODAL - PROFESSIONAL UI
   ======================================== */

/* Modal Container */
#product-detail-modal {
    padding: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: flex-end;
    z-index: 1200;
}

#product-detail-modal.active {
    display: flex !important;
}

#product-detail-modal .modal-content {
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: pdSlideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    background: #fff;
    display: flex;
    flex-direction: column;
}

@keyframes pdSlideUp {
    from { transform: translateY(100%); opacity: 0.5; }
    to { transform: translateY(0); opacity: 1; }
}

#product-detail-modal .modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Drag Handle */
#product-detail-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    z-index: 20;
}

/* Close Button */
#product-detail-modal .close-modal {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    -webkit-tap-highlight-color: transparent;
}

#product-detail-modal .close-modal:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#product-detail-modal .close-modal:active {
    transform: scale(0.95);
}

/* ===== Product Image ===== */
.pd-image-wrap {
    width: 100%;
    height: 300px;
    position: relative;
    background: #f8f9fa;
    cursor: pointer;
    overflow: hidden;
}

.pd-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.pd-image-wrap:hover img {
    transform: scale(1.03);
}

.pd-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

/* Image placeholder */
.pd-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #9ca3af;
}

.pd-image-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.pd-image-placeholder span {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.6;
}

/* Badges on image */
.pd-badge-row {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.pd-discount-badge {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.pd-type-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    border: 2px solid;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.pd-type-badge.nonveg {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #DC2626;
}

.pd-type-badge.veg {
    background: #F0FDF4;
    color: #16A34A;
    border-color: #16A34A;
}

.pd-zoom-btn {
    position: absolute;
    bottom: 20px;
    right: 14px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0.7;
    transition: all 0.2s ease;
    z-index: 5;
    border: none;
    cursor: pointer;
}

.pd-image-wrap:hover .pd-zoom-btn {
    opacity: 1;
}

/* Share Button on Image */
.pd-share-btn {
    position: absolute;
    bottom: 20px;
    left: 14px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0.7;
    transition: all 0.2s ease;
    z-index: 5;
    border: none;
    cursor: pointer;
}

.pd-share-btn:active {
    opacity: 1;
    transform: scale(0.92);
}

/* ===== Product Info ===== */
.pd-info {
    padding: 16px 20px 20px;
    background: #fff;
}

/* Info top row - category + rating */
.pd-info-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* Category tag */
.pd-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pd-category-tag i {
    font-size: 10px;
}

/* Product name */
.pd-info .pd-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 14px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* Rating row */
.pd-rating-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 2px 0;
}

.pd-rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #059669;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.pd-rating-pill i {
    font-size: 9px;
}

.pd-rating-stars {
    display: flex;
    gap: 2px;
}

.pd-rating-stars i {
    font-size: 14px;
    color: #F59E0B;
}

.pd-rating-count {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
}

.pd-rating-arrow {
    font-size: 10px;
    color: #9CA3AF;
    transition: transform 0.2s;
}

.pd-rating-row:active .pd-rating-arrow {
    transform: translateX(3px);
    color: #F59E0B;
}

/* ===== Price Section ===== */
.pd-price-section {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid #FDE68A;
}

.pd-price-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.pd-price-offer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.pd-price-current {
    font-size: 1.85rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
    line-height: 1;
}

.pd-price-unit {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

.pd-price-original {
    font-size: 14px;
    color: #9CA3AF;
    text-decoration: line-through;
    font-weight: 500;
}

.pd-price-save {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #D1FAE5;
    color: #059669;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.pd-price-save i {
    font-size: 10px;
}

/* ===== Product Highlights ===== */
.pd-highlights {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.pd-highlight-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #F0FDF4;
    color: #166534;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #BBF7D0;
}

.pd-highlight-chip i {
    font-size: 11px;
    color: #16A34A;
}

/* ===== Description Section ===== */
.pd-desc-section {
    margin-bottom: 6px;
}

.pd-desc-title {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pd-desc-title i {
    font-size: 13px;
    color: #9CA3AF;
}

.pd-description {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ===== Sticky Footer (Qty + Add to Cart) ===== */
.pd-sticky-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid #F0F0F0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    gap: 12px;
}

.pd-footer-left {
    display: flex;
    align-items: baseline;
    gap: 2px;
    flex-shrink: 0;
}

.pd-footer-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #111827;
}

.pd-footer-unit {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
}

.pd-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
}

.pd-qty-selector {
    display: flex;
    align-items: center;
    background: #F3F4F6;
    border-radius: 12px;
    padding: 3px;
    flex-shrink: 0;
}

.pd-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    color: #F59E0B;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    -webkit-tap-highlight-color: transparent;
}

.pd-qty-btn:active {
    transform: scale(0.9);
    background: #F59E0B;
    color: #fff;
}

.pd-qty-input {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    font-family: inherit;
    -moz-appearance: textfield;
}

.pd-qty-input::-webkit-outer-spin-button,
.pd-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pd-add-cart-btn {
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.pd-add-cart-btn:active {
    transform: scale(0.96);
}

.pd-add-cart-btn i {
    font-size: 15px;
}

/* ===== Divider ===== */
.pd-divider {
    height: 8px;
    background: #F3F4F6;
    margin: 0 -20px;
}

/* ===== Responsive ===== */
@media (max-width: 360px) {
    .pd-image-wrap { height: 240px; }
    .pd-info { padding: 12px 16px 16px; }
    .pd-info .pd-name { font-size: 1.2rem; }
    .pd-price-current { font-size: 1.5rem; }
    .pd-highlight-chip { padding: 5px 10px; font-size: 10px; }
    .pd-sticky-footer { padding: 8px 12px; }
    .pd-footer-price { font-size: 1.1rem; }
    .pd-qty-btn { width: 32px; height: 32px; font-size: 12px; }
    .pd-qty-input { width: 28px; height: 32px; font-size: 14px; }
    .pd-add-cart-btn { padding: 10px 14px; font-size: 12px; }
}

@media (min-width: 768px) {
    #product-detail-modal {
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    #product-detail-modal .modal-content {
        max-width: 520px;
        border-radius: 20px;
        max-height: 85vh;
        animation: pdFadeScale 0.3s ease;
    }
    @keyframes pdFadeScale {
        from { transform: scale(0.9); opacity: 0; }
        to { transform: scale(1); opacity: 1; }
    }
    #product-detail-modal .modal-content::before { display: none; }
    .pd-image-wrap { height: 280px; }
    .pd-info { padding: 16px 24px 24px; }
    .pd-info .pd-name { font-size: 1.5rem; }
    .pd-price-current { font-size: 1.8rem; }
    .pd-sticky-footer { padding: 12px 20px; }
    .pd-footer-price { font-size: 1.4rem; }
}

@media (min-width: 1024px) {
    #product-detail-modal .modal-content {
        max-width: 680px;
        max-height: 80vh;
    }
    #product-detail-modal .modal-body {
        display: flex;
        flex-direction: row;
        overflow: hidden;
    }
    /* Left column: image - fills full height, image covers */
    .pd-image-wrap {
        width: 45%;
        min-width: 45%;
        height: auto !important;
        flex-shrink: 0;
        overflow: hidden;
    }
    .pd-image-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: static;
    }
    .pd-image-wrap::after {
        display: none;
    }
    /* Right column: info + reviews scrollable */
    .pd-info-scroll-wrap {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        min-width: 0;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .pd-info { padding: 20px 24px 24px; }
    .pd-info .pd-name { font-size: 1.5rem; }
    .pd-price-current { font-size: 1.8rem; }
    .pd-divider { margin: 0; height: 6px; }
    .pd-reviews-section { padding: 16px 20px; }
}

@media (min-width: 1280px) {
    #product-detail-modal .modal-content { max-width: 750px; }
}

/* ========================================
   CUSTOMER REVIEWS SECTION
   ======================================== */
.pd-reviews-section {
    padding: 20px;
    background: #F9FAFB;
}

.pd-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.pd-reviews-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.pd-reviews-title i {
    color: #F59E0B;
    font-size: 15px;
}

.pd-write-review-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.pd-write-review-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* Rating Summary Card */
.pd-rating-summary {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid #F0F0F0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.pd-rating-big {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
}

.pd-rating-big-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.pd-rating-big-stars {
    margin: 6px 0 4px;
    display: flex;
    gap: 2px;
}

.pd-rating-big-stars i {
    font-size: 12px;
    color: #F59E0B;
}

.pd-rating-big-total {
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 500;
}

.pd-rating-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.pd-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6B7280;
}

.pd-bar-row > span:first-child {
    width: 14px;
    text-align: center;
    font-weight: 600;
    flex-shrink: 0;
}

.pd-bar-track {
    flex: 1;
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}

.pd-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.pd-bar-pct {
    width: 34px;
    text-align: right;
    font-size: 11px;
    color: #9CA3AF;
    flex-shrink: 0;
}

/* Review Cards */
.pd-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pd-review-card {
    background: #fff;
    border: 1px solid #F0F0F0;
    border-radius: 14px;
    padding: 16px;
    transition: all 0.2s;
}

.pd-review-card:hover {
    border-color: #FDE68A;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pd-review-card.new-review {
    animation: pdHighlight 2s ease;
}

@keyframes pdHighlight {
    0%, 50% { background: #FFFBEB; border-color: #F59E0B; }
    100% { background: #fff; border-color: #F0F0F0; }
}

.pd-review-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.pd-review-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.pd-review-info {
    flex: 1;
}

.pd-review-name {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.pd-review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
}

.pd-review-meta .star-rating i {
    font-size: 11px;
    color: #F59E0B;
}

.pd-review-date {
    font-size: 12px;
    color: #9CA3AF;
}

.pd-review-text {
    font-size: 13px;
    color: #4B5563;
    line-height: 1.6;
    margin: 0;
}

.pd-review-helpful {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.pd-helpful-btn {
    padding: 5px 12px;
    font-size: 12px;
    background: #F3F4F6;
    color: #6B7280;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    font-family: inherit;
}

.pd-helpful-btn:hover { background: #FFFBEB; color: #D97706; }
.pd-helpful-btn.marked { background: #FFFBEB; color: #D97706; }

.pd-no-reviews {
    text-align: center;
    padding: 30px 20px;
    color: #9CA3AF;
    font-size: 14px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #F0F0F0;
}

.pd-no-reviews i {
    font-size: 28px;
    display: block;
    margin-bottom: 10px;
    color: #D1D5DB;
}

/* View All Reviews Button */
.pd-view-all-btn {
    width: 100%;
    padding: 12px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    color: #D97706;
    border: 2px solid #FDE68A;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.pd-view-all-btn:hover {
    background: #FFFBEB;
    border-color: #F59E0B;
}

.pd-view-all-btn i {
    transition: transform 0.2s;
}

.pd-view-all-btn:hover i {
    transform: translateX(4px);
}

/* Loading/Spinner in reviews */
.pd-loading-reviews {
    text-align: center;
    padding: 30px;
    color: #9CA3AF;
    font-size: 14px;
}

.pd-loading-reviews i {
    font-size: 22px;
    color: #F59E0B;
    display: block;
    margin-bottom: 10px;
}

/* Rating Arrow (kept for backwards compat) */
.product-rating { cursor: pointer; }
.rating-arrow { font-size: 0.7rem; color: var(--gray); margin-left: 4px; transition: transform 0.2s; }
.product-rating:hover .rating-arrow { transform: translateX(3px); }

/* Legacy class fallbacks */
.reviews-section { margin-top: 0; padding: 0; background: transparent; border: none; margin-left: 0; margin-right: 0; }
.reviews-header { display: none; }
.rating-summary { display: none; }
.reviews-list { display: none; }
.btn-add-review { display: none; }
.btn-view-all-reviews { display: none; }

/* ========================================
   ADD REVIEW MODAL
   ======================================== */
.add-review-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.add-review-modal.active {
    opacity: 1;
    visibility: visible;
}

.add-review-content {
    background: white;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.add-review-modal.active .add-review-content {
    transform: translateY(0);
}

.add-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.add-review-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.close-review-modal {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    color: var(--gray);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.close-review-modal:hover {
    background: #eee;
    color: var(--dark);
}

.add-review-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 70px);
}

.review-product-name {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.review-product-name strong {
    color: var(--dark);
}

.rating-input {
    margin-bottom: 20px;
}

.rating-input label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.star-rating-input {
    display: flex;
    gap: 8px;
}

.star-rating-input i {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.15s ease;
}

.star-rating-input i.fas {
    color: #F59E0B;
}

.star-rating-input i.hover {
    color: #FBBF24;
    transform: scale(1.1);
}

.review-input-group {
    margin-bottom: 16px;
}

.review-input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.review-input-group input,
.review-input-group textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: inherit;
    resize: none;
}

.review-input-group input:focus,
.review-input-group textarea:focus {
    border-color: var(--primary);
}

.review-input-group textarea {
    min-height: 100px;
}

/* Responsive for Reviews */
@media (max-width: 500px) {
    .rating-summary {
        flex-direction: column;
        gap: 16px;
    }

    .rating-big {
        flex-direction: row;
        gap: 12px;
        min-width: auto;
    }

    .rating-number {
        font-size: 2rem;
    }

    .review-item {
        padding: 12px;
    }

    .reviewer-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .btn-add-review {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .star-rating-input i {
        font-size: 1.75rem;
    }
}

@media (min-width: 768px) {
    .add-review-modal {
        align-items: center;
    }

    .add-review-content {
        border-radius: 20px;
        max-height: 85vh;
    }
}

/* ========================================
   LOGIN PROMPT (Profile Page)
   ======================================== */
.login-prompt {
    background: linear-gradient(135deg, #FDF0F4 0%, #F8E0E8 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin: 16px;
    border: 2px dashed var(--primary);
}

.login-prompt-icon {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 15px rgba(22, 101, 52, 0.15);
}

.login-prompt-icon i {
    font-size: 2.5rem;
    color: var(--primary);
}

.login-prompt h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px;
}

.login-prompt p {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0 0 16px;
    line-height: 1.5;
}

.login-prompt .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* Login Button Style in Profile */
.login-btn-style {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
}

.login-btn-style:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #7A1F3D 100%) !important;
}

/* ========================================
   DESKTOP RESPONSIVE DESIGN
   ======================================== */

/* Tablet View (768px and up) */
@media (min-width: 768px) {
    body {
        background: var(--white);
        padding: 0;
    }

    .app-container {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    .header {
        border-radius: 0;
    }

    .bottom-nav {
        border-radius: 0;
    }

    /* Category scroll */
    .category-scroll {
        padding: 0 2rem;
    }

    /* Products grid - 3 columns on tablet */
    .products-grid, .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
        padding: 1.25rem 2rem;
    }
}

/* Desktop View (1024px and up) */
@media (min-width: 1024px) {
    body {
        padding: 0;
        background: var(--white);
    }

    .app-container {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    /* Products grid - 4 columns on desktop */
    .products-grid, .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        padding: 1.5rem 3rem;
    }

    /* Header larger on desktop */
    .header {
        padding: 1.75rem 2.5rem;
    }

    .header-title {
        font-size: 1.75rem;
    }

    .location-text {
        font-size: 1rem;
    }

    .header-icons {
        gap: 1.25rem;
    }

    .icon-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    /* Search bar */
    .search-container {
        padding: 1.5rem 2.5rem;
    }

    .search-bar {
        height: 56px;
        font-size: 1.0625rem;
    }

    /* Banner slides */
    .banner-slide {
        height: 280px;
        border-radius: 20px;
    }

    /* Category items */
    .category-item {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Products grid - 3 columns on desktop */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        padding: 1.5rem 2.5rem;
    }

    .product-card {
        padding: 1.25rem;
    }

    .product-image {
        height: 200px;
    }

    .product-name {
        font-size: 1.125rem;
    }

    .product-price {
        font-size: 1.25rem;
    }

    .add-to-cart-btn {
        padding: 0.875rem;
        font-size: 1rem;
    }

    /* Bottom nav hidden, show as top bar */
    .bottom-nav {
        display: flex;
        position: static;
        border-radius: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
        justify-content: center;
        gap: 3rem;
        margin-top: 2rem;
    }

    .nav-item {
        flex-direction: row;
        gap: 0.75rem;
        padding: 1rem 2rem;
        background: white;
        border-radius: 50px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
    }

    .nav-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .nav-item.active {
        background: var(--primary);
        color: white;
    }

    .nav-label {
        display: block;
        font-size: 1rem;
        font-weight: 500;
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .app-container {
        max-width: 100%;
    }

    /* Products grid - 5 columns on large desktop */
    .products-grid, .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2rem;
        padding: 2rem 3rem;
    }

    .section-header {
        padding: 2rem 3rem 1rem;
    }

    .category-scroll {
        padding: 0 3rem;
    }

    .search-container {
        padding: 2rem 3rem;
    }
}

/* Extra Large Desktop (1536px and up) */
@media (min-width: 1536px) {
    body {
        padding: 0;
        background: var(--white);
    }

    .app-container {
        max-width: 100%;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }

    /* Products grid - 5 columns on extra large desktop */
    .products-grid, .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2rem;
        padding: 2.5rem 4rem;
    }

    .header {
        padding: 2rem 4rem;
    }

    .search-container {
        padding: 2rem 4rem;
    }

    .section-header {
        padding: 2rem 4rem 1rem;
    }

    .category-scroll {
        padding: 0 4rem;
    }
}

/* ========================================
   OUR STORY SECTION
   ======================================== */
.our-story-section {
    padding: 2rem 1.25rem 3rem;
    margin-bottom: 80px;
    background: linear-gradient(180deg, var(--white) 0%, var(--primary-light) 100%);
    display: none; /* Hidden by default, shown via story button */
}

.our-story-section.show {
    display: block;
}

.our-story-section .section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.our-story-section .section-title i {
    color: var(--primary);
}

.story-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--primary-light);
}

.story-intro {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed var(--primary-light);
}

.founders-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.founders-badge i {
    font-size: 1rem;
}

.story-lead {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark);
}

.story-lead strong {
    color: var(--primary);
}

/* Timeline Styles */
.story-timeline {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -1.25rem;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--white);
    border: 3px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gray);
}

.timeline-content p strong {
    color: var(--dark);
}

/* Story Footer */
.story-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--primary-light);
}

.quality-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border-radius: var(--radius);
    min-width: 80px;
}

.badge-item i {
    font-size: 1.25rem;
    color: var(--primary);
}

.badge-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.story-closing {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--gray);
    font-style: italic;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

/* Our Story - Tablet/Desktop Responsive */
@media (min-width: 768px) {
    .our-story-section {
        padding: 3rem 2rem 4rem;
    }

    .story-content {
        padding: 2.5rem;
        max-width: 900px;
        margin: 0 auto;
    }

    .story-lead {
        font-size: 1.1rem;
    }

    .story-timeline {
        padding-left: 3rem;
    }

    .timeline-icon {
        width: 3rem;
        height: 3rem;
        left: -1.5rem;
        font-size: 1.1rem;
    }

    .timeline-content h4 {
        font-size: 1.1rem;
    }

    .timeline-content p {
        font-size: 0.95rem;
    }

    .quality-badges {
        gap: 1.5rem;
    }

    .badge-item {
        padding: 1rem 1.5rem;
        min-width: 100px;
    }

    .badge-item i {
        font-size: 1.5rem;
    }

    .badge-item span {
        font-size: 0.85rem;
    }
}

@media (min-width: 1024px) {
    .our-story-section {
        padding: 4rem 3rem 5rem;
    }

    .story-content {
        padding: 3rem;
    }

    .founders-badge {
        font-size: 0.95rem;
        padding: 0.625rem 1.25rem;
    }

    .story-closing {
        font-size: 1rem;
        padding: 1.25rem;
    }
}

/* ========================================
   RESPONSIVE PRODUCT CARDS - Complete System
   Professional e-commerce layout for all screen sizes
   ======================================== */

/* === MOBILE VIEW (Default - up to 480px) - 2 columns === */
@media (max-width: 480px) {
    .products-section {
        padding: 0 0.75rem 1.5rem;
    }

    .product-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        width: 100%;
    }

    .product-card {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 280px;
        border-radius: 12px;
        overflow: hidden;
        background: var(--white);
        border: 1px solid #eee;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .product-image {
        width: 100%;
        height: 120px;
        min-height: 120px;
        padding: 10px;
        background: #f9f9f9;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .product-info, .product-details {
        padding: 10px;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .product-name {
        font-size: 0.85rem;
        font-weight: 600;
        line-height: 1.3;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.2em;
    }

    .product-rating {
        margin-bottom: 4px;
        font-size: 0.7rem;
    }

    .product-unit {
        margin-bottom: 6px;
        font-size: 0.7rem;
        display: none; /* Hide unit on mobile to save space */
    }

    .product-footer {
        margin-top: auto;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding-top: 6px;
    }

    .product-price {
        display: flex;
        align-items: baseline;
        gap: 4px;
    }

    .product-price .price {
        font-size: 1rem;
        font-weight: 700;
    }

    .product-price .unit {
        font-size: 0.75rem;
    }

    .add-to-cart-btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 0.8rem;
        min-height: 40px;
        border-radius: 8px;
    }

    .quantity-controls {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        min-width: unset;
        padding: 4px 12px;
        gap: 10px;
        border-radius: 8px;
    }

    .quantity-controls .qty-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        flex-shrink: 0;
    }

    .quantity-controls .qty-value {
        min-width: 28px;
        font-size: 1rem;
    }
}

/* === SMALL MOBILE (375px - 480px) - 2 columns optimized === */
@media (min-width: 375px) and (max-width: 480px) {
    .product-grid {
        gap: 0.875rem;
    }

    .product-card {
        min-height: 290px;
    }

    .product-image {
        height: 130px;
        min-height: 130px;
    }

    .product-info, .product-details {
        padding: 12px;
    }
}

/* === LARGE MOBILE / PHABLET (481px - 639px) - 2 columns === */
@media (min-width: 481px) and (max-width: 639px) {
    .products-section {
        padding: 0 1rem 1.5rem;
    }

    .product-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-card {
        min-height: 320px;
    }

    .product-image {
        height: 150px;
        min-height: 150px;
        padding: 12px;
    }

    .product-info, .product-details {
        padding: 14px;
    }

    .product-name {
        font-size: 0.9rem;
    }

    .product-unit {
        display: block;
    }

    .product-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .add-to-cart-btn {
        width: auto;
        min-width: 80px;
        padding: 10px 16px;
    }

    .quantity-controls {
        width: auto;
        min-width: 100px;
    }
}

/* === SMALL TABLET (640px - 767px) - 3 columns === */
@media (min-width: 640px) and (max-width: 767px) {
    .products-section {
        padding: 0 1.25rem 2rem;
    }

    .product-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .product-card {
        min-height: 310px;
        border-radius: 12px;
    }

    .product-image {
        height: 140px;
        min-height: 140px;
        padding: 12px;
        background: #f8f8f8;
    }

    .product-info, .product-details {
        padding: 12px;
    }

    .product-name {
        font-size: 0.88rem;
        margin-bottom: 5px;
    }

    .product-rating {
        font-size: 0.7rem;
        margin-bottom: 5px;
    }

    .product-unit {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }

    .product-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .product-price .price {
        font-size: 0.95rem;
    }

    .product-price .unit {
        font-size: 0.72rem;
    }

    .add-to-cart-btn {
        padding: 8px 14px;
        font-size: 0.78rem;
        min-width: 70px;
        height: 36px;
    }

    .quantity-controls {
        height: 36px;
        min-width: 90px;
        padding: 4px 8px;
        gap: 5px;
    }

    .quantity-controls .qty-btn {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }

    .quantity-controls .qty-value {
        min-width: 20px;
        font-size: 0.85rem;
    }
}

/* === TABLET (768px - 1023px) - 3 columns === */
@media (min-width: 768px) and (max-width: 1023px) {
    .products-section {
        padding: 0 1.5rem 2rem;
    }

    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.25rem !important;
    }

    .product-card {
        display: flex !important;
        flex-direction: column !important;
        min-height: 340px !important;
        border-radius: 12px !important;
        background: var(--white);
        border: 1px solid #e8e8e8;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    }

    .product-image {
        height: 160px !important;
        min-height: 160px !important;
        padding: 15px !important;
        background: #f8f8f8 !important;
    }

    .product-image img {
        object-fit: contain !important;
    }

    .product-info, .product-details {
        padding: 14px !important;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .product-name {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        margin-bottom: 6px !important;
    }

    .product-rating {
        font-size: 0.75rem !important;
        margin-bottom: 6px !important;
    }

    .product-unit {
        font-size: 0.75rem !important;
        margin-bottom: 8px !important;
    }

    .product-footer {
        margin-top: auto !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        flex-wrap: nowrap !important;
    }

    .product-price {
        flex: 1;
        min-width: 0;
    }

    .product-price .price {
        font-size: 1.05rem !important;
    }

    .product-price .unit {
        font-size: 0.8rem !important;
    }

    .add-to-cart-btn {
        padding: 10px 18px !important;
        font-size: 0.85rem !important;
        min-width: 80px !important;
        height: 40px !important;
        flex-shrink: 0 !important;
    }

    .quantity-controls {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 40px !important;
        min-width: 105px !important;
        flex-shrink: 0 !important;
        padding: 4px 10px !important;
        gap: 6px !important;
    }

    .quantity-controls .qty-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        flex-shrink: 0 !important;
    }

    .quantity-controls .qty-value {
        min-width: 24px !important;
        font-size: 0.9rem !important;
        text-align: center !important;
    }
}

/* === DESKTOP (1024px - 1279px) - 4 columns === */
@media (min-width: 1024px) and (max-width: 1279px) {
    .products-section {
        padding: 0 2rem 2.5rem;
    }

    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.25rem !important;
    }

    .product-card {
        display: flex !important;
        flex-direction: column !important;
        min-height: 380px !important;
        border-radius: 12px !important;
        background: var(--white);
        border: 1px solid #e8e8e8;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 28px rgba(0,0,0,0.1);
    }

    .product-image {
        height: 160px !important;
        min-height: 160px !important;
        padding: 14px !important;
        background: #f8f8f8 !important;
    }

    .product-image img {
        object-fit: contain !important;
    }

    .product-info, .product-details {
        padding: 14px !important;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .product-name {
        font-size: 0.92rem !important;
        line-height: 1.35 !important;
        margin-bottom: 5px !important;
    }

    .product-rating {
        font-size: 0.73rem !important;
        margin-bottom: 5px !important;
    }

    .product-unit {
        font-size: 0.73rem !important;
        margin-bottom: 8px !important;
    }

    .product-footer {
        margin-top: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .product-price {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline !important;
        gap: 4px !important;
    }

    .product-price .price {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
    }

    .product-price .unit {
        font-size: 0.8rem !important;
        color: var(--gray) !important;
    }

    .add-to-cart-btn {
        width: 100% !important;
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        height: 40px !important;
        flex-shrink: 0 !important;
        border-radius: 8px !important;
    }

    .quantity-controls {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 40px !important;
        flex-shrink: 0 !important;
        padding: 4px 12px !important;
        gap: 10px !important;
        border-radius: 8px !important;
    }

    .quantity-controls .qty-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        flex-shrink: 0 !important;
    }

    .quantity-controls .qty-value {
        min-width: 28px !important;
        font-size: 1rem !important;
        text-align: center !important;
    }
}

/* === LARGE DESKTOP (1280px - 1535px) - 5 columns === */
@media (min-width: 1280px) and (max-width: 1535px) {
    .products-section {
        padding: 0 2.5rem 3rem;
    }

    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1.25rem !important;
    }

    .product-card {
        display: flex !important;
        flex-direction: column !important;
        min-height: 370px !important;
        border-radius: 12px !important;
        background: var(--white);
        border: 1px solid #e8e8e8;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 28px rgba(0,0,0,0.1);
    }

    .product-image {
        height: 150px !important;
        min-height: 150px !important;
        padding: 12px !important;
        background: #f8f8f8 !important;
    }

    .product-image img {
        object-fit: contain !important;
    }

    .product-info, .product-details {
        padding: 12px !important;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .product-name {
        font-size: 0.88rem !important;
        line-height: 1.3 !important;
        margin-bottom: 5px !important;
    }

    .product-rating {
        font-size: 0.7rem !important;
        margin-bottom: 5px !important;
    }

    .product-unit {
        font-size: 0.7rem !important;
        margin-bottom: 6px !important;
    }

    .product-footer {
        margin-top: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .product-price {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline !important;
        gap: 4px !important;
    }

    .product-price .price {
        font-size: 1.05rem !important;
        font-weight: 700 !important;
    }

    .product-price .unit {
        font-size: 0.78rem !important;
        color: var(--gray) !important;
    }

    .add-to-cart-btn {
        width: 100% !important;
        padding: 9px 14px !important;
        font-size: 0.82rem !important;
        height: 38px !important;
        flex-shrink: 0 !important;
        border-radius: 8px !important;
    }

    .quantity-controls {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 38px !important;
        flex-shrink: 0 !important;
        padding: 4px 10px !important;
        gap: 8px !important;
        border-radius: 8px !important;
    }

    .quantity-controls .qty-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        flex-shrink: 0 !important;
    }

    .quantity-controls .qty-value {
        min-width: 24px !important;
        font-size: 0.95rem !important;
        text-align: center !important;
    }
}

/* === EXTRA LARGE DESKTOP (1536px - 1919px) - 6 columns === */
@media (min-width: 1536px) and (max-width: 1919px) {
    .products-section {
        padding: 0 3rem 3rem;
    }

    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 1.5rem !important;
    }

    .product-card {
        display: flex !important;
        flex-direction: column !important;
        min-height: 380px !important;
        border-radius: 14px !important;
        background: var(--white);
        border: 1px solid #e8e8e8;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    }

    .product-image {
        height: 160px !important;
        min-height: 160px !important;
        padding: 14px !important;
        background: #f8f8f8 !important;
    }

    .product-image img {
        object-fit: contain !important;
    }

    .product-info, .product-details {
        padding: 14px !important;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .product-name {
        font-size: 0.9rem !important;
        line-height: 1.35 !important;
        margin-bottom: 5px !important;
    }

    .product-rating {
        font-size: 0.72rem !important;
        margin-bottom: 5px !important;
    }

    .product-unit {
        font-size: 0.72rem !important;
        margin-bottom: 6px !important;
    }

    .product-footer {
        margin-top: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .product-price {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline !important;
        gap: 4px !important;
    }

    .product-price .price {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
    }

    .product-price .unit {
        font-size: 0.8rem !important;
        color: var(--gray) !important;
    }

    .add-to-cart-btn {
        width: 100% !important;
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        height: 40px !important;
        flex-shrink: 0 !important;
        border-radius: 8px !important;
    }

    .quantity-controls {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 40px !important;
        flex-shrink: 0 !important;
        padding: 4px 12px !important;
        gap: 10px !important;
        border-radius: 8px !important;
    }

    .quantity-controls .qty-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        flex-shrink: 0 !important;
    }

    .quantity-controls .qty-value {
        min-width: 28px !important;
        font-size: 1rem !important;
        text-align: center !important;
    }
}

/* === ULTRA WIDE (1920px+) - 6 columns with max width === */
@media (min-width: 1920px) {
    .products-section {
        padding: 0 4rem 3.5rem;
        max-width: 2200px;
        margin: 0 auto;
    }

    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 1.75rem !important;
    }

    .product-card {
        display: flex !important;
        flex-direction: column !important;
        min-height: 400px !important;
        border-radius: 14px !important;
        background: var(--white);
        border: 1px solid #e8e8e8;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 14px 36px rgba(0,0,0,0.1);
    }

    .product-image {
        height: 180px !important;
        min-height: 180px !important;
        padding: 16px !important;
        background: #f8f8f8 !important;
    }

    .product-image img {
        object-fit: contain !important;
    }

    .product-info, .product-details {
        padding: 16px !important;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .product-name {
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
        margin-bottom: 6px !important;
    }

    .product-rating {
        font-size: 0.75rem !important;
        margin-bottom: 6px !important;
    }

    .product-unit {
        font-size: 0.75rem !important;
        margin-bottom: 8px !important;
    }

    .product-footer {
        margin-top: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .product-price {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline !important;
        gap: 5px !important;
    }

    .product-price .price {
        font-size: 1.15rem !important;
        font-weight: 700 !important;
    }

    .product-price .unit {
        font-size: 0.85rem !important;
        color: var(--gray) !important;
    }

    .add-to-cart-btn {
        width: 100% !important;
        padding: 12px 18px !important;
        font-size: 0.9rem !important;
        height: 44px !important;
        flex-shrink: 0 !important;
        border-radius: 10px !important;
    }

    .quantity-controls {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 44px !important;
        flex-shrink: 0 !important;
        padding: 4px 14px !important;
        gap: 12px !important;
        border-radius: 10px !important;
    }

    .quantity-controls .qty-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        flex-shrink: 0 !important;
    }

    .quantity-controls .qty-value {
        min-width: 30px !important;
        font-size: 1.1rem !important;
        text-align: center !important;
    }
}

/* ========================================
   DESKTOP BANNER - Increased Height
   ======================================== */

/* Tablet View (769px - 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
    .banner-slider {
        width: 100%;
        margin: 0;
    }

    .banner-slide img {
        width: 100%;
        height: auto;
        min-height: 300px;
        max-height: 350px;
        aspect-ratio: 16 / 6;
        object-fit: cover;
    }
}

/* Desktop View (1024px+) - Show FULL banner without cropping */
@media (min-width: 1024px) {
    .banner-slider {
        width: 100%;
        margin: 0;
    }

    .banner-slide img {
        width: 100%;
        height: auto;
        min-height: unset;
        max-height: unset;
        aspect-ratio: unset;
        object-fit: fill;
    }

    .banner-dots {
        bottom: 24px;
        padding: 10px 18px;
    }

    .banner-dot {
        width: 10px;
        height: 10px;
    }

    .banner-dot.active {
        width: 28px;
    }
}

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), #D97706);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(176, 51, 89, 0.4);
    z-index: 999;
    -webkit-tap-highlight-color: transparent;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(176, 51, 89, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

/* Scroll to top icon animation */
.scroll-to-top i {
    animation: bounceUpDown 2s infinite;
}

@keyframes bounceUpDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 70px;
        right: 15px;
        font-size: 1.3rem;
    }
}

/* ========================================
   LOCATION ICON ANIMATION
   ======================================== */
#location-btn {
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#location-btn i {
    color: var(--white) !important;
    font-size: 1rem;
    animation: pulsate 2s infinite;
    pointer-events: none;
}

@keyframes pulsate {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

#location-btn:hover i,
#location-btn:active i {
    animation: none;
    transform: scale(1.15);
}

/* Mobile touch optimization */
@media (max-width: 768px) {
    #location-btn {
        width: 38px;
        height: 38px;
    }

    #location-btn i {
        font-size: 0.9rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    #location-btn {
        width: 46px;
        height: 46px;
    }

    #location-btn i {
        font-size: 1.1rem;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    #location-btn {
        width: 48px;
        height: 48px;
    }

    #location-btn i {
        font-size: 1.15rem;
    }
}

/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 145px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.whatsapp-float:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    background: #128C7E;
}

.whatsapp-float:active {
    transform: translateY(-1px);
}

.whatsapp-float i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 135px;
        right: 15px;
        font-size: 1.8rem;
    }
}

