/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding-bottom: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Color Variables */
:root {
    --primary-color: #f4d03f;
    --primary-dark: #f1c40f;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --background-light: #ffffff;
    --border-color: #ecf0f1;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 16px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.desktop-header {
    display: none;
}

@media (min-width: 1024px) {
    .mobile-header {
        display: none;
    }

    .desktop-header {
        display: flex;
        width: 100%;
        padding: 16px 0;
    }

    .desktop-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .header-left, .header-right {
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .header-center {
        flex-grow: 1;
        max-width: 600px;
    }

    .header-btn {
        background: none;
        border: none;
        font-size: 20px;
        color: var(--text-dark);
        cursor: pointer;
        position: relative;
    }

    .header-btn .badge {
        position: absolute;
        top: -5px;
        right: -10px;
        background: var(--accent-color);
        color: white;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        font-size: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .user-account-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 16px;
        font-weight: 500;
        padding: 8px 12px;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }

    .user-account-btn:hover {
        background-color: rgba(0,0,0,0.05);
    }

    .user-account-btn i {
        font-size: 20px;
    }

    .desktop-header .app-name span {
        font-size: 24px; /* Increased font size */
        font-weight: 700;
    }

    .user-menu {
        position: relative;
    }

    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border-radius: 8px;
        box-shadow: var(--shadow);
        overflow: hidden;
        z-index: 1001;
        width: 150px;
    }

    .dropdown-menu.show {
        display: block;
    }

    .dropdown-item {
        display: block;
        padding: 12px 16px;
        color: var(--text-dark);
        text-decoration: none;
        transition: background-color 0.2s ease;
    }

    .dropdown-item:hover {
        background-color: #f8f9fa;
    }
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.header-search {
    width: 100%;
}

.location-btn {
    background: white;
    border: none;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: var(--text-dark);
}

.location-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.location-btn i {
    color: var(--secondary-color);
    font-size: 14px;
}

.app-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-dark);
}

.app-name i {
    font-size: 20px;
    color: var(--secondary-color);
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-bar i.fa-search {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 1;
}

.search-bar input {
    width: 100%;
    padding: 14px 60px 14px 48px;
    border: none;
    border-radius: 12px;
    background: white;
    font-size: 16px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.voice-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.voice-search-btn:hover {
    background: #27ae60;
    transform: translateY(-50%) scale(1.05);
}

.voice-search-btn i {
    color: white;
    font-size: 16px;
}

/* App Container */
.app-container {
    margin-top: 120px;
    min-height: calc(100vh - 120px - 80px);
    padding-bottom: 80px;
}

@media (min-width: 1024px) {
    .app-container {
        margin-left: auto;
        margin-right: auto;
        width: 70%;
        margin-top: 90px; /* Adjusted for desktop header */
    }
}

/* Pages */
.page {
    display: none;
    padding: 20px 16px;
    min-height: 100%;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Banner Slider */
.banner-slider-container {
    position: relative;
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: visible;
    background: transparent;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
}

@media (min-width: 1024px) {
    .banner-slider {
        height: 300px; /* Adjusted height for desktop */
    }
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.banner-slide.active {
    opacity: 1;
}

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

.banner-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    color: white;
    padding: 20px;
    text-align: center;
}

.banner-slide-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.banner-slide-content p {
    font-size: 13px;
    opacity: 0.9;
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    background: transparent;
    margin-top: 8px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--primary-color);
    width: 24px;
    border-radius: 4px;
}

/* Sections */
.section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.see-all {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

/* Categories Scroll */
.categories-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

/* Products Scroll */
.products-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.products-scroll::-webkit-scrollbar {
    display: none;
}

.products-scroll .product-card {
    min-width: 180px;
    flex-shrink: 0;
}

/* Slider Container */
.slider-container {
    position: relative;
}

.slider-btn {
    display: none; /* Hidden by default, shown on desktop */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background-color: white;
    box-shadow: var(--shadow-hover);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev-btn {
    left: -20px;
    display: none; /* Initially hidden */
}

.slider-btn.next-btn {
    right: -20px;
}

.slider-btn i {
    color: var(--text-dark);
    font-size: 16px;
}

@media (min-width: 1024px) {
    .slider-btn {
        display: block;
    }

    .products-scroll {
        scrollbar-width: none; /* Hide scrollbar for Firefox */
        -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
    }

    .products-scroll::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
    }
}

/* Category Products Container */
.category-products-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.category-section {
    width: 100%;
}

.category-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.category-section-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.see-all-btn {
    background: none;
    border: none;
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.see-all-btn:hover {
    color: var(--secondary-color);
    transform: translateX(2px);
}

.see-all-btn i {
    font-size: 12px;
}

.back-to-all-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.back-to-all-btn:hover {
    color: var(--primary-dark);
    transform: translateX(-2px);
}

.back-to-all-btn i {
    font-size: 12px;
}

.category-item {
    min-width: 80px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.category-item:hover {
    transform: translateY(-4px);
}

/* Category Image Container */
.category-image {
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;
    position: relative;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.category-icon,
.category-icon-fallback {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.category-icon i {
    font-size: 24px;
    color: var(--primary-dark);
}

.category-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 16px 0;
}

/* Categories Grid for Home Page */
.categories-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    padding: 16px 0;
    max-width: 800px;
    margin: 0 auto;
}

/* Category Item for Home Page (No Card Style) */
.category-item-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.category-item-home:hover {
    transform: scale(1.05);
}

.category-image-home {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image-home img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.category-icon i,
.category-icon-fallback i {
    font-size: 40px;
    color: white;
}

.category-name-home {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.3;
    max-width: 120px;
}

.category-card {
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* Category Card Image */
.category-card-image {
    width: 100%;
    height: 180px; /* Default height for mobile */
    overflow: hidden;
    margin: 12px 0 8px 0;
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-image img {
    transform: scale(1.05);
}

.category-card-icon,
.category-card-icon-fallback {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-icon i,
.category-card-icon-fallback i {
    font-size: 40px;
    color: white;
}

/* Category Card Content */
.category-card-content {
    padding: 0 8px 12px 8px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.category-card h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2px;
    line-height: 1.2;
}

.category-card .product-count {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.product-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}

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

.image-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-light);
}

.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-color);
    color: white;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

.out-of-stock-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(220, 53, 69, 0.95);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.product-card.out-of-stock {
    opacity: 0.7;
}

.product-card.out-of-stock .product-image {
    position: relative;
}

.product-card.out-of-stock .product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.delivery-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(25, 118, 210, 0.95);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(4px);
}

.delivery-badge i {
    font-size: 8px;
}

.product-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-unit {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.original-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    border-radius: 12px;
    padding: 4px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary-dark);
    color: white;
}

.quantity-display {
    min-width: 32px;
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
}

.add-to-cart-btn {
    background: var(--primary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Cart Styles */
.cart-item {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-light);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--text-light);
    font-size: 14px;
}

.cart-summary {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--shadow);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.summary-row.total {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-dark);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 12px;
}

.checkout-btn {
    width: 100%;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

/* Order Styles */
.order-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-number {
    font-weight: 600;
    color: var(--text-dark);
}

.order-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.pending { background: #fff3cd; color: #856404; }
.order-status.confirmed { background: #d4edda; color: #155724; }
.order-status.preparing { background: #cce5ff; color: #004085; }
.order-status.out_for_delivery { background: #e2e3e5; color: #383d41; }
.order-status.delivered { background: #d1ecf1; color: #0c5460; }
.order-status.cancelled { background: #f8d7da; color: #721c24; }

.order-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-total {
    font-weight: 700;
    color: var(--text-dark);
}

.order-date {
    font-size: 12px;
    color: var(--text-light);
}

.order-actions {
    display: flex;
    gap: 12px;
}

.track-btn, .reorder-btn {
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background: white;
    color: var(--text-dark);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.track-btn:hover, .reorder-btn:hover {
    background: var(--primary-color);
}

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-hover);
    z-index: 999;
    transition: all 0.3s ease;
    width: auto;
    min-width: 160px;
}

.floating-cart:hover {
    transform: translateX(-50%) translateY(-4px);
}

@media (min-width: 1024px) {
    .floating-cart {
        display: none !important; /* Hide on desktop */
    }
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-count {
    background: white;
    color: var(--secondary-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.cart-text {
    font-weight: 600;
    font-size: 14px;
}

.cart-total {
    display: none;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

@media (min-width: 1024px) {
    .bottom-nav {
        display: none;
    }
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item i {
    font-size: 20px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item.active i,
.nav-item.active span {
    color: var(--primary-dark);
}

.nav-item .badge {
    position: absolute;
    top: 4px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2,
.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--border-color);
}

.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

/* Advanced Product Detail Modal */
.product-detail-advanced {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-gallery-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-placeholder-large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--text-light);
}

.discount-badge-large {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    z-index: 10;
}

.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail:hover {
    border-color: var(--primary-color);
}

.thumbnail.active {
    border-color: var(--primary-dark);
    box-shadow: 0 0 8px rgba(244, 208, 63, 0.4);
}

.product-detail-info-advanced {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    font-size: 14px;
    color: #ffc107;
}

.rating-text {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

.price-section-advanced {
    padding: 16px;
    background: linear-gradient(135deg, rgba(244, 208, 63, 0.1), rgba(46, 204, 113, 0.1));
    border-radius: 12px;
}

.price-display {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.current-price-large {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.original-price-large {
    font-size: 18px;
    color: var(--text-light);
    text-decoration: line-through;
}

.savings-text {
    font-size: 13px;
    color: var(--secondary-color);
    font-weight: 600;
    background: rgba(46, 204, 113, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.product-description-section {
    padding: 12px 0;
}

.product-description-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.product-description-section p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
}

.detail-value.low-stock {
    color: var(--accent-color);
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.stock-status i {
    font-size: 16px;
}

.product-actions-advanced {
    display: flex;
    gap: 12px;
    align-items: center;
}

.quantity-controls-advanced {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 10px;
}

.quantity-btn-advanced {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-dark);
    font-size: 14px;
}

.quantity-btn-advanced:hover {
    background: var(--primary-color);
    color: var(--text-dark);
}

.quantity-display-advanced {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
}

.btn-add-to-cart {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-dark);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(244, 208, 63, 0.3);
}

.btn-add-to-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 208, 63, 0.4);
}

.btn-add-to-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Utilities */
@media (max-width: 1023px) {
    .hide-on-mobile {
        display: none !important;
    }
}

.btn-wishlist {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.btn-wishlist:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(231, 76, 60, 0.05);
}

.additional-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-light);
}

.info-item i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 14px;
}

/* Auth Styles */
.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: none;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tab-btn.active {
    color: var(--text-dark);
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-dark);
    background: white;
    box-shadow: 0 0 0 3px rgba(244, 208, 63, 0.1);
    transform: translateY(-1px);
}

.form-group input[type="tel"] {
    letter-spacing: 1px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #6c757d;
    font-weight: 400;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Login Modal as Bottom Sheet */
#loginModal {
    align-items: flex-end;
    padding: 0;
}

#loginModal .modal-content {
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-radius: 24px 24px 0 0;
    max-height: 85vh;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

#loginModal.active .modal-content {
    transform: translateY(0);
}

#loginModal .modal-header {
    background: white;
    color: var(--text-dark);
    padding: 20px 24px 16px;
    text-align: center;
    border-bottom: none;
    position: relative;
}

#loginModal .modal-header::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #d0d0d0;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

#loginModal .modal-header:hover::before {
    background: #b0b0b0;
}

#loginModal .modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 8px 0 0 0;
    color: var(--text-dark);
}

#loginModal .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f5f5f5;
    color: var(--text-light);
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 50%;
}

#loginModal .close-btn:hover {
    background: #e0e0e0;
    color: var(--text-dark);
}

#loginModal .modal-body {
    padding: 0 24px 32px;
    background: white;
    max-height: calc(85vh - 80px);
    overflow-y: auto;
}

/* Desktop adjustments */
@media (min-width: 768px) {
    #loginModal {
        align-items: center;
        padding: 20px;
    }
    
    #loginModal .modal-content {
        max-width: 420px;
        width: auto;
        border-radius: 24px;
        transform: scale(0.9) translateY(20px);
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    #loginModal.active .modal-content {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    
    #loginModal .modal-header::before {
        display: none;
    }
    
    #loginModal .modal-header {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: var(--text-dark);
        padding: 24px;
    }
    
    #loginModal .modal-header h3 {
        font-size: 22px;
        font-weight: 700;
        margin: 0;
    }
    
    #loginModal .close-btn {
        background: rgba(255,255,255,0.2);
        color: var(--text-dark);
    }
    
    #loginModal .close-btn:hover {
        background: rgba(255,255,255,0.3);
    }
    
    #loginModal .modal-body {
        padding: 32px 24px;
    }
}

/* Profile Styles */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 24px;
    border-radius: 20px;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar-container {
    position: relative;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-edit-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--secondary-color);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    border: 3px solid white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-avatar:hover .avatar-edit-overlay {
    opacity: 1;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.profile-email, .profile-phone {
    margin: 0;
    font-size: 14px;
    color: rgba(44, 62, 80, 0.8);
    font-weight: 500;
}

.profile-edit-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.profile-edit-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}


/* Profile Menu */
.profile-menu {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.menu-section {
    border-bottom: 1px solid var(--border-color);
}

.menu-section:last-child {
    border-bottom: none;
}

.menu-section h3 {
    padding: 16px 20px 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: #f8f9fa;
}

.menu-item.logout-item {
    color: var(--accent-color);
}

.menu-item.logout-item:hover {
    background: rgba(231, 76, 60, 0.05);
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 16px;
    color: var(--text-dark);
}

.logout-item .menu-icon {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-color);
}

.menu-content {
    flex: 1;
}

.menu-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.menu-subtitle {
    font-size: 13px;
    color: var(--text-light);
}

.menu-arrow {
    color: var(--text-light);
    font-size: 12px;
}

.logout-item .menu-arrow {
    display: none;
}

/* Help & About Modal Styles */
.help-section {
    margin-bottom: 24px;
}

.help-section h4 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 16px;
}

.help-section p {
    margin: 8px 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section i {
    width: 16px;
    color: var(--primary-dark);
}

.faq-item {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.faq-item strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 4px;
}

.about-content {
    text-align: center;
}

.app-logo {
    margin-bottom: 20px;
}

.app-logo i {
    font-size: 48px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.app-logo h2 {
    margin: 0;
    color: var(--text-dark);
}

.app-info {
    margin: 20px 0;
    text-align: left;
}

.app-info p {
    margin: 8px 0;
    color: var(--text-light);
}

.social-links {
    margin-top: 24px;
}

.social-links h4 {
    margin-bottom: 12px;
    color: var(--text-dark);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-icons i {
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.social-icons i:hover {
    color: var(--primary-dark);
}

/* Form Labels */
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .profile-edit-btn {
        position: absolute;
        top: 16px;
        right: 16px;
    }
    
    .menu-item {
        padding: 14px 16px;
    }
    
    .menu-icon {
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }
}

/* Delivery Progress Component */
.delivery-progress-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.delivery-progress-card.checkout {
    margin: 12px 0;
    padding: 16px;
    border-radius: 12px;
}

.delivery-progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.delivery-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.delivery-icon.success {
    background: linear-gradient(135deg, var(--secondary-color), #27ae60);
}

.delivery-message {
    flex: 1;
}

.delivery-message h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.delivery-message p {
    margin: 0;
    font-size: 13px;
    color: var(--text-light);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-20px); }
    100% { transform: translateX(20px); }
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.current-amount {
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
}

.free-delivery-label {
    background: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile responsive for delivery progress */
@media (max-width: 480px) {
    .delivery-progress-card {
        margin: 12px 0;
        padding: 16px;
    }
    
    .delivery-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .delivery-message h4 {
        font-size: 14px;
    }
    
    .delivery-message p {
        font-size: 12px;
    }
    
    .progress-labels {
        font-size: 11px;
    }
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-dark);
    font-weight: 600;
    font-size: 16px;
    padding: 16px 24px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(244, 208, 63, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #e6b800);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 208, 63, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(244, 208, 63, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn-outline {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--border-color);
}

/* Order Tracking Timeline */
.tracking-timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    width: 2px;
    height: calc(100% + 8px);
    background: var(--border-color);
}

.timeline-item.completed::after {
    background: var(--secondary-color);
}

.timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    position: relative;
}

.timeline-item.completed .timeline-icon {
    background: var(--secondary-color);
    color: white;
}

.timeline-content h4 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.timeline-content p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 4px;
}

.timeline-date {
    font-size: 12px;
    color: var(--text-light);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.loading-spinner.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-dark);
    color: white;
    padding: 12px 20px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

.toast.error {
    background: #f44336;
}

.toast.success {
    background: #4CAF50;
}

.toast.warning {
    background: #ff9800;
}

.toast.info {
    background: #2196F3;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.empty-state p {
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 12px 0;
    }
    
    .header-top {
        margin-bottom: 10px;
    }
    
    .app-name {
        font-size: 16px;
    }
    
    .app-name i {
        font-size: 18px;
    }
    
    .location-btn {
        padding: 6px 10px;
        font-size: 12px;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .location-btn span {
        display: inline;
    }
    
    .search-bar input {
        padding: 12px 55px 12px 40px;
        font-size: 14px;
    }
    
    .voice-search-btn {
        width: 36px;
        height: 36px;
        right: 6px;
    }
    
    .voice-search-btn i {
        font-size: 14px;
    }
    
    .app-container {
        margin-top: 100px;
        min-height: calc(100vh - 100px - 80px);
        padding-bottom: 80px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .products-scroll .product-card {
        min-width: 160px;
    }
    
    .category-products-container {
        gap: 20px;
    }
    
    .category-section-header h4 {
        font-size: 16px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
    
    .categories-grid-home {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        max-width: none;
        margin: 0;
        padding: 8px 0;
    }
    
    .category-image-home {
        width: 85px;
        height: 85px;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .category-name-home {
        font-size: 13px;
        max-width: 85px;
    }
    
    .category-card-image {
        height: 100px;
    }
    
    .category-card-content {
        padding: 12px;
    }
    
    .category-image {
        width: 56px;
        height: 56px;
    }
    
    .category-icon,
    .category-icon-fallback {
        width: 56px;
        height: 56px;
    }
    
    .modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .page {
        padding: 16px 12px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    
    .products-scroll .product-card {
        min-width: 140px;
    }
    
    .category-products-container {
        gap: 16px;
    }
    
    .category-section-header h4 {
        font-size: 15px;
    }
    
    .see-all-btn {
        font-size: 13px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .categories-grid-home {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .category-image-home {
        width: 85px;
        height: 85px;
        margin-bottom: 8px;
        border-radius: 6px;
    }
    
    .category-name-home {
        font-size: 13px;
        max-width: 85px;
    }
    
    .category-card-image {
        height: 60px;
        margin: 8px 0 4px 0;
    }
    
    .category-card h4 {
        font-size: 12px;
    }
    
    .category-card .product-count {
        font-size: 10px;
    }
    
    .category-card-content {
        padding: 0 4px 8px 4px;
    }
    
    .category-image {
        width: 48px;
        height: 48px;
    }
    
    .category-icon,
    .category-icon-fallback {
        width: 48px;
        height: 48px;
    }
    
    .product-card {
        padding: 12px;
    }
    
    .floating-cart {
        left: 50%;
        transform: translateX(-50%);
        padding: 12px 16px;
    }
    
    .floating-cart:hover {
        transform: translateX(-50%) translateY(-4px);
    }
}

/* Search Results Styles */
.search-results {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    margin-top: 0;
    box-shadow: var(--shadow);
}

.search-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.search-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.home-arrow-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.home-arrow-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.clear-search-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.search-no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    margin: 16px 0;
    box-shadow: var(--shadow);
}

.no-results-icon {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.search-no-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.search-no-results p {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 16px;
}

.search-no-results .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.search-no-results .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Location Modal Styles */
.location-modal {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.location-detect-section {
    margin-bottom: 24px;
}

.btn-detect-location {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--secondary-color), #27ae60);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-detect-location:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
}

.btn-detect-location:active {
    transform: translateY(0);
}

.location-search-section {
    margin-bottom: 24px;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(244, 208, 63, 0.1);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item i {
    color: var(--primary-color);
    font-size: 14px;
}

.suggestion-item-text {
    flex: 1;
}

.suggestion-item-main {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.suggestion-item-sub {
    font-size: 12px;
    color: var(--text-light);
}

.location-manual-section {
    margin-bottom: 24px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.location-manual-section .form-group {
    margin-bottom: 12px;
}

.location-manual-section .form-group:last-child {
    margin-bottom: 0;
}

.location-manual-section label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.location-manual-section input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.location-manual-section input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.selected-location-display {
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(244, 208, 63, 0.1));
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
}

.location-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.location-info p {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.location-coords {
    font-size: 12px;
    color: var(--text-light);
    font-family: 'Courier New', monospace;
}

.location-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.location-actions .btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.location-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #333;
}

.location-actions .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 208, 63, 0.3);
}

.location-actions .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.location-actions .btn-secondary {
    background-color: var(--border-color);
    color: var(--text-dark);
}

.location-actions .btn-secondary:hover {
    background-color: #ddd;
}

/* Desktop Footer */
.desktop-footer {
    display: none; /* Hidden on mobile by default */
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 20px;
}

@media (min-width: 1024px) {
    .desktop-footer {
        display: block;
    }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4, .footer-logo {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-logo i {
    margin-right: 8px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
    color: #bdc3c7;
}

.footer-section.about p {
    margin-bottom: 20px;
}

.social-icons a {
    color: #ecf0f1;
    font-size: 18px;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.footer-section.links ul {
    list-style: none;
}

.footer-section.links ul li {
    margin-bottom: 12px;
}

.footer-section.links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-section.links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.newsletter-form {
    display: flex;
    margin-top: 10px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 12px;
    border: none;
    border-radius: 8px 0 0 8px;
    background-color: #34495e;
    color: #ecf0f1;
    outline: none;
}

.newsletter-form button {
    padding: 12px 16px;
    border: none;
    background-color: var(--primary-color);
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: var(--primary-dark);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #7f8c8d;
}

.payment-methods i {
    font-size: 24px;
    margin-left: 12px;
    color: #7f8c8d;
}

/* Desktop-specific Product Detail Page Styles */
@media (min-width: 1024px) {
    #productDetailPage .product-detail-page-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        max-width: 1100px;
        margin: 40px auto;
        padding: 24px;
        background: white;
        border-radius: 16px;
        box-shadow: var(--shadow);
    }

    #productDetailPage .main-image-container {
        height: 450px;
    }

    #productDetailPage .product-detail-info-page {
        padding: 0;
    }

    #productDetailPage .product-actions-sticky {
        display: none; /* Hide mobile sticky footer on desktop */
    }

    .product-title-advanced {
        font-size: 28px;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 12px;
    }

    #productDetailPage .product-detail-info-page {
        display: flex;
        flex-direction: column;
    }

    #productDetailPage .product-actions-advanced {
        margin-top: 20px;
        margin-bottom: 20px;
    }

    #productDetailPage .additional-info {
        border-top: none;
        padding-top: 0;
    }

    #productDetailPage .btn-add-to-cart-sticky {
        width: auto;
        flex-grow: 1;
    }
}

/* Service Unavailable Modal */
.service-unavailable-modal {
    max-width: 400px;
}

.coming-soon-content {
    text-align: center;
    padding: 40px 20px;
}

.coming-soon-content i {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 20px;
    opacity: 0.8;
}

.coming-soon-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.coming-soon-content p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.service-info {
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 13px;
}

.service-info strong {
    color: var(--text-dark);
}

.coming-soon-content .btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #333;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.coming-soon-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 208, 63, 0.3);
}

/* Service Unavailable Page */
.service-unavailable-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px);
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(244, 208, 63, 0.05), rgba(46, 204, 113, 0.05));
}

.unavailable-content {
    text-align: center;
    max-width: 400px;
    padding: 40px 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.5s ease;
}

.unavailable-content i {
    font-size: 72px;
    color: var(--primary-color);
    margin-bottom: 24px;
    display: block;
    opacity: 0.9;
}

.unavailable-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.unavailable-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.unavailable-content p {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.delivery-radius-info {
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    border-left: 4px solid var(--primary-color);
}

.delivery-radius-info strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 4px;
}

.delivery-radius-info span {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.unavailable-content .btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #333;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(244, 208, 63, 0.3);
}

.unavailable-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 208, 63, 0.4);
}

.unavailable-content .btn:active {
    transform: translateY(0);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Search Results */
@media (max-width: 768px) {
    .search-header {
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
    }
    
    .home-arrow-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .clear-search-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .search-no-results {
        padding: 40px 16px;
    }
    
    .no-results-icon {
        font-size: 36px;
    }
    
    .search-no-results h3 {
        font-size: 18px;
    }
    
    .search-no-results p {
        font-size: 14px;
    }
}

/* Product Detail Page Styles */
#productDetailPage {
    display: none;
    flex-direction: column;
    height: 100vh;
    background: #f8f9fa;
    padding-bottom: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
}

#productDetailPage.active {
    display: flex;
}

/* Scroll Header for Product Detail */
.product-detail-scroll-header {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 300;
    height: 56px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.product-detail-scroll-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
    text-align: center;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.product-detail-scroll-header .back-btn,
.product-detail-scroll-header .share-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 18px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.product-detail-scroll-header .back-btn:hover,
.product-detail-scroll-header .share-btn:hover {
    background-color: #f0f0f0;
}

.product-detail-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px;
}

.product-detail-page-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-gallery-section {
    background: white;
    padding: 0;
}

.main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.image-placeholder-large {
    font-size: 48px;
    color: #ccc;
}

.discount-badge-large {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--accent-color);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

.out-of-stock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.product-detail-info-page {
    background: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.stars {
    display: flex;
    gap: 4px;
    color: #ffc107;
    font-size: 16px;
}

.rating-text {
    font-size: 14px;
    color: var(--text-light);
}

.price-section-advanced {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.price-display {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.current-price-large {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.original-price-large {
    font-size: 18px;
    color: var(--text-light);
    text-decoration: line-through;
}

.savings-text {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 600;
}

.product-description-section {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.product-description-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.product-description-section p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.product-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
}

.detail-value {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
}

.detail-value.low-stock {
    color: var(--accent-color);
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f0f8f4;
    border-radius: 8px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 14px;
}

.stock-status i {
    font-size: 18px;
}

.additional-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-light);
}

.info-item i {
    color: var(--primary-color);
    font-size: 16px;
    min-width: 20px;
}

/* Sticky Footer for Product Detail */
.product-detail-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    z-index: 200;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.product-actions-sticky {
    display: flex;
    gap: 12px;
    align-items: center;
}

.quantity-controls-sticky {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 4px;
    flex: 1;
}

.quantity-btn-sticky {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 16px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.quantity-btn-sticky:hover {
    background-color: #e0e0e0;
}

.quantity-display-sticky {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
}

.btn-add-to-cart-sticky {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-dark);
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-add-to-cart-sticky:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 208, 63, 0.3);
}

.btn-add-to-cart-sticky:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-wishlist-sticky {
    width: 48px;
    height: 48px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 20px;
    transition: all 0.2s ease;
}

.btn-wishlist-sticky:hover {
    background-color: #e0e0e0;
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .product-detail-header h2 {
        font-size: 16px;
    }
    
    .product-detail-info-page {
        padding: 16px;
        gap: 16px;
    }
    
    .current-price-large {
        font-size: 24px;
    }
    
    .product-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }
    
    .product-actions-sticky {
        gap: 10px;
    }
    
    .btn-add-to-cart-sticky {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Order Details Modal */
.order-details-modal {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    display: flex;
    flex-direction: column;
}

.order-details-header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-detail-item .label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

.order-detail-item .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.order-items-section {
    margin-bottom: 24px;
}

.order-items-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    align-items: flex-start;
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: white;
    border: 1px solid #e0e0e0;
}

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

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 24px;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.item-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.item-unit {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.item-price .quantity {
    font-size: 12px;
    color: var(--text-muted);
}

.item-price .price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.order-address-section {
    margin-bottom: 24px;
}

.order-address-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.address-box {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.address-box i {
    color: var(--primary-color);
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.address-box p {
    margin: 0;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.5;
}

.order-summary-section,
.payment-info-section,
.order-notes-section {
    margin-bottom: 24px;
}

.order-summary-section h3,
.payment-info-section h3,
.order-notes-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.summary-row,
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.summary-row:last-child,
.info-row:last-child {
    border-bottom: none;
}

.summary-row span:first-child,
.info-row span:first-child {
    color: var(--text-muted);
    font-weight: 500;
}

.summary-row span:last-child,
.info-row span:last-child {
    color: var(--text-dark);
    font-weight: 500;
}

.summary-row.total {
    padding: 12px 0;
    border-top: 2px solid #e0e0e0;
    border-bottom: none;
    font-weight: 600;
    font-size: 15px;
}

.summary-row.total span:first-child {
    color: var(--text-dark);
}

.summary-row.total span:last-child {
    color: var(--primary-color);
    font-size: 16px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.confirmed {
    background: #cfe2ff;
    color: #084298;
}

.status-badge.preparing {
    background: #e2e3e5;
    color: #383d41;
}

.status_for_delivery,
.status-badge.out_for_delivery {
    background: #cff4fc;
    color: #055160;
}

.status-badge.delivered {
    background: #d1e7dd;
    color: #0f5132;
}

.status-badge.cancelled {
    background: #f8d7da;
    color: #842029;
}

.status-badge.unpaid {
    background: #f8d7da;
    color: #842029;
}

.status-badge.paid {
    background: #d1e7dd;
    color: #0f5132;
}

.capitalize {
    text-transform: capitalize;
}

.order-notes-section p {
    margin: 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.modal-footer .btn {
    min-width: 120px;
}

/* Order Details Page Content */
.order-details-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.order-details-content > div {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.order-details-content > div:last-child {
    border-bottom: none;
    padding-bottom: 80px;
}

@media (max-width: 768px) {
    .order-details-header {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
        background: linear-gradient(135deg, var(--primary-color) 0%, #f4d03f 100%);
        border-radius: 0;
        margin-bottom: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .order-detail-item {
        gap: 6px;
    }

    .order-detail-item .label {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.8);
        text-transform: uppercase;
    }

    .order-detail-item .value {
        font-size: 15px;
        color: white;
    }

    .order-detail-item .status-badge {
        display: inline-block;
        width: fit-content;
    }

    .order-items-section {
        margin-bottom: 0;
        padding: 16px;
        background: white;
    }

    .order-items-section h3 {
        font-size: 15px;
        margin-bottom: 12px;
        margin-top: 0;
    }

    .order-items-list {
        gap: 10px;
    }

    .order-item {
        display: flex;
        gap: 12px;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 8px;
        align-items: flex-start;
        flex-direction: row;
        text-align: left;
    }

    .item-image {
        width: 70px;
        height: 70px;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .item-details {
        flex: 1;
        gap: 4px;
    }

    .item-details h4 {
        font-size: 13px;
        margin: 0;
    }

    .item-unit {
        font-size: 11px;
    }

    .item-price {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 6px;
        flex-direction: row;
    }

    .item-price .quantity {
        font-size: 11px;
    }

    .item-price .price {
        font-size: 13px;
    }

    .order-address-section {
        margin-bottom: 0;
        padding: 16px;
        background: white;
    }

    .order-address-section h3 {
        font-size: 15px;
        margin-bottom: 12px;
        margin-top: 0;
    }

    .address-box {
        display: flex;
        gap: 12px;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 8px;
        border-left: 4px solid var(--primary-color);
    }

    .address-box i {
        font-size: 16px;
        margin-top: 0;
    }

    .address-box p {
        font-size: 13px;
    }

    .delivery-schedule-info {
        margin-top: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .schedule-detail {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
        background: #f0f7ff;
        border-radius: 6px;
        border-left: 3px solid #1976d2;
    }

    .schedule-detail i {
        color: #1976d2;
        font-size: 14px;
        margin-top: 2px;
        flex-shrink: 0;
    }

    .schedule-detail span {
        font-size: 12px;
        color: var(--text-dark);
        line-height: 1.4;
    }

    .order-summary-section {
        margin-bottom: 0;
        padding: 16px;
        background: white;
    }

    .order-summary-section h3 {
        font-size: 15px;
        margin-bottom: 12px;
        margin-top: 0;
    }

    .summary-row,
    .info-row {
        padding: 10px 0;
        font-size: 13px;
    }

    .summary-row.total {
        padding: 12px 0;
        font-size: 14px;
        margin-top: 8px;
    }

    .payment-info-section {
        margin-bottom: 0;
        padding: 16px;
        background: white;
    }

    .payment-info-section h3 {
        font-size: 15px;
        margin-bottom: 12px;
        margin-top: 0;
    }

    .order-notes-section {
        margin-bottom: 0;
        padding: 16px;
        background: white;
    }

    .order-notes-section h3 {
        font-size: 15px;
        margin-bottom: 12px;
        margin-top: 0;
    }

    .order-notes-section p {
        font-size: 13px;
        padding: 12px;
    }

    #orderDetailsPage .page-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: white;
        border-bottom: 1px solid #f0f0f0;
        padding: 0;
        display: flex;
        align-items: center;
    }

    #orderDetailsPage .page-header .header-title-wrapper {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 12px 16px;
    }

    #orderDetailsPage .page-header h2 {
        font-size: 18px;
        margin: 0;
        color: var(--text-dark);
    }

    #orderDetailsPage .page-header .back-btn {
        padding: 8px;
        font-size: 20px;
        color: var(--text-dark);
        flex-shrink: 0;
    }

    .order-details-header {
        background: white !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        grid-template-columns: none !important;
    }

    .order-header-top {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }

    .order-header-top .order-detail-item {
        flex: 1;
    }

    .order-header-top .status-item {
        text-align: right;
    }

    .order-details-header .order-detail-item .label {
        color: var(--text-muted) !important;
    }

    .order-details-header .order-detail-item .value {
        color: var(--text-dark) !important;
    }

    .item-price .price {
        color: var(--text-dark) !important;
        font-weight: 600 !important;
    }

    .summary-row.total span:last-child {
        color: var(--text-dark) !important;
    }
}

/* Order Tracking Page */
.order-tracking-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tracking-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.order-info-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #f4d03f 100%);
    padding: 16px;
    border-radius: 12px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-number {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.order-status-text {
    font-size: 14px;
    opacity: 0.95;
}

.order-status-text .status-value {
    font-weight: 600;
    text-transform: capitalize;
}

.tracking-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px 0;
    position: relative;
}

.tracking-steps::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 50px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color) 0%, var(--primary-color) 100%);
    z-index: 0;
}

.tracking-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    position: relative;
    z-index: 1;
}

.tracking-step .step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #999;
    flex-shrink: 0;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.tracking-step.completed .step-icon {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(244, 208, 63, 0.2), 0 2px 8px rgba(244, 208, 63, 0.3);
    animation: iconPulse 1.2s ease-in-out infinite;
}

.tracking-step.animate .step-icon {
    animation: stepPulse 0.6s ease-out, iconPulse 1.2s ease-in-out 0.6s infinite;
}

.tracking-step .step-content {
    flex: 1;
    padding-top: 6px;
}

.tracking-step .step-label {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    transition: color 0.4s ease;
    margin-bottom: 4px;
    display: block;
}

.tracking-step.pending .step-label {
    color: #666;
}

.tracking-step.completed .step-label {
    color: var(--text-dark);
}

.tracking-step .step-timestamp {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.tracking-step .step-message {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 400;
}

.step-connector {
    position: absolute;
    left: 24px;
    top: 50px;
    width: 2px;
    height: 32px;
    background: var(--primary-color);
    transition: background 0.4s ease;
    z-index: 0;
}

.tracking-step.completed .step-connector {
    background: var(--primary-color);
    animation: lineGrow 0.6s ease-out;
}

.tracking-step:last-child .step-connector {
    display: none;
}

@keyframes stepPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(244, 208, 63, 0.2), 0 2px 8px rgba(244, 208, 63, 0.3);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 8px rgba(244, 208, 63, 0.1), 0 4px 12px rgba(244, 208, 63, 0.5);
    }
}

@keyframes lineGrow {
    from {
        background: var(--primary-color);
        box-shadow: 0 0 8px rgba(244, 208, 63, 0.6);
    }
    to {
        background: var(--primary-color);
        box-shadow: none;
    }
}

.tracking-details {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #f0f0f0;
}

.detail-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    flex: 0 0 auto;
}

.detail-row .value {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
    text-align: right;
    flex: 1;
}

@keyframes stepPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#orderTrackingPage .page-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 0;
    display: flex;
    align-items: center;
}

#orderTrackingPage .page-header .header-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
}

#orderTrackingPage .page-header h2 {
    font-size: 18px;
    margin: 0;
    color: var(--text-dark);
}

#orderTrackingPage .page-header .back-btn {
    padding: 8px;
    font-size: 20px;
    color: var(--text-dark);
    flex-shrink: 0;
}

/* Coming Soon Page */
.coming-soon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
}

.coming-soon-content {
    text-align: center;
    max-width: 400px;
    animation: slideUp 0.6s ease-out;
}

.coming-soon-icon {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 24px;
    animation: bounce 2s infinite;
}

.coming-soon-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.coming-soon-content > p:first-of-type {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

.coming-soon-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    text-align: left;
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-dark);
}

.feature-item i {
    color: var(--primary-color);
    font-size: 18px;
    flex-shrink: 0;
}

.coming-soon-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    animation: pulse 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@media (max-width: 768px) {
    .coming-soon-container {
        min-height: calc(100vh - 150px);
        padding: 30px 16px;
    }
    
    .coming-soon-content {
        max-width: 100%;
    }
    
    .coming-soon-icon {
        font-size: 60px;
        margin-bottom: 20px;
    }
    
    .coming-soon-content h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .coming-soon-content > p:first-of-type {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .coming-soon-features {
        gap: 12px;
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .feature-item {
        font-size: 14px;
    }
    
    .coming-soon-text {
        font-size: 16px;
    }
}

/* Delivery Schedule Info Styling */
.delivery-schedule-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-dark);
}

.schedule-detail i {
    color: var(--primary-color);
    font-size: 16px;
    min-width: 20px;
}

.schedule-detail strong {
    font-weight: 600;
    color: var(--text-dark);
}
