* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Remove tap highlights and shadows on mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Remove all tap highlights and shadows for interactive elements */
button, 
input, 
textarea, 
select, 
a, 
.category-item,
.product-card,
.cart-btn,
.menu-toggle,
.close-cart,
.close-checkout,
.add-to-cart-btn,
.checkout-btn,
.place-order-btn,
.quantity-btn {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-appearance: none !important;
    outline: none !important;
    background-clip: padding-box !important;
}

/* Remove borders only from buttons, not inputs */
button,
.cart-btn,
.menu-toggle,
.close-cart,
.close-checkout,
.add-to-cart-btn,
.checkout-btn,
.place-order-btn,
.quantity-btn {
    border: none;
}

/* Remove focus outlines and shadows */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus,
*:focus {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Remove active state highlights */
button:active,
input:active,
textarea:active,
select:active,
a:active,
*:active {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* iOS and Mobile specific tap highlight removal */
@media (hover: none) and (pointer: coarse) {
    * {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        outline: none !important;
    }
    
    button,
    input,
    textarea,
    select,
    a,
    div,
    span {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-appearance: none !important;
        -webkit-touch-callout: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
    
    /* Remove any system-generated highlights */
    *:focus,
    *:active,
    *:hover {
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
        box-shadow: none !important;
    }
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    display: none;
}

.logo {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d5a27 !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10;
}

.logo-icon {
    background: #2d5a27 !important;
    color: white !important;
    padding: 0.4rem;
    border-radius: 6px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    max-width: 2rem;
    height: 2rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.logo-icon i {
    color: white !important;
    font-size: 1rem;
    display: block !important;
    visibility: visible !important;
}

.logo-text {
    font-weight: 700;
    color: #2d5a27 !important;
    white-space: nowrap;
    display: flex !important;
    flex-direction: column;
    line-height: 1.1;
    visibility: visible !important;
    opacity: 1 !important;
}

.logo-main {
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-sub {
    font-weight: 600;
    font-size: 1rem;
    opacity: 0.9;
}

/* Icon-based logo styling */

.search-container {
    position: relative;
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    color: #333;
    background-color: #fff;
}

.search-container input::placeholder {
    color: #999;
    opacity: 1;
}

.search-container input:focus {
    border-color: #2d5a27;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.delivery-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.delivery-label {
    font-weight: 600;
    color: #333;
}

.delivery-time {
    font-size: 0.9rem;
    color: #2d5a27;
}

.cart-btn {
    position: relative;
    background: #2d5a27;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.cart-btn:hover {
    background: #1e3a1c;
}

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

/* Main Container */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
    padding: 2rem;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: relative;
}

/* Hide overlay on desktop */
.sidebar-overlay {
    display: none;
}

.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e1e5e9;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none;
    touch-action: manipulation;
}

.sidebar-close:hover,
.sidebar-close:active,
.sidebar-close:focus {
    background: #f8f9fa;
    border-color: #2d5a27;
    color: #2d5a27;
    transform: scale(1.1);
}

.store-info {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e1e5e9;
}

.store-logo {
    background: #2d5a27;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.store-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.store-description {
    color: #666;
    font-size: 0.9rem;
}

.categories h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.category-list {
    list-style: none;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 0.5rem;
}

.category-item:hover {
    background: #f0f8f0;
}

.category-item.active {
    background: #2d5a27;
    color: white;
}

.category-item i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
}

.content-header {
    margin-bottom: 2rem;
}

.content-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.content-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Products */
.category-section {
    margin-bottom: 3rem;
}

.category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.category-title h2 {
    font-size: 1.8rem;
    color: #333;
}

.view-all {
    color: #2d5a27;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all:hover {
    text-decoration: underline;
}

/* Products Container - Apply grid layout */
.products-container, .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

/* Smaller Product Cards */
.product-card {
    background: white;
    border-radius: 10px;
    padding: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    max-width: 220px;
    margin: 0 auto;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Product Images - Default size with responsive overrides */
.product-image {
    width: 70px;
    height: 100px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    font-size: 2rem;
    color: #ccc;
    overflow: hidden;
    position: relative;
    margin: 0 auto 0.6rem auto;
}

/* Dynamic sizing for products with custom dimensions */
.product-card[data-category="meat"] .product-image {
    width: 100px;
    height: 70px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    /* Image quality improvements */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -ms-interpolation-mode: bicubic;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* Prevent blurriness */
    -webkit-font-smoothing: subpixel-antialiased;
    -webkit-backface-visibility: hidden;
}

.product-image .emoji-fallback {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Override for products with inline styles (custom dimensions) */
.product-image img[style*="width"][style*="height"] {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Smaller Text and Better Spacing */
.product-info h3, .product-name {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #333;
    font-weight: 600;
    line-height: 1.2;
}

.product-description {
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price Container */
.product-price-container {
    margin-bottom: 0.6rem;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: #2d5a27;
    display: block;
}

.product-unit {
    font-size: 0.7rem;
    color: #888;
    font-weight: 400;
}

/* Smaller Add to Cart Button */
.add-to-cart, .add-to-cart-btn {
    width: 100%;
    background: #2d5a27;
    color: white;
    border: none;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.add-to-cart:hover, .add-to-cart-btn:hover {
    background: #1e3a1c;
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.cart-modal.active {
    display: flex;
}

.cart-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-cart:hover {
    background: #e9ecef;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e1e5e9;
}

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

.cart-item-image {
    width: 100px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.cart-item-emoji {
    font-size: 1.8rem;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: #333;
}

.cart-item-price {
    color: #2d5a27;
    font-weight: 500;
    font-size: 0.8rem;
}

.cart-item-total {
    font-weight: 600;
    color: #2d5a27;
    font-size: 0.9rem;
    min-width: 60px;
    text-align: right;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.quantity-controls span {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.quantity-btn {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
}

.quantity-btn:hover {
    background: #e9ecef;
}

.cart-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.cart-total {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #2d5a27;
}

.checkout-btn {
    width: 100%;
    background: #2d5a27;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background: #1e3a1c;
}

.empty-cart {
    text-align: center;
    padding: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .products-container, .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .header-content {
        padding: 0.8rem;
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .header-left {
        flex: 0 0 auto;
    }
    
    .logo-text {
        white-space: normal;
    }
    
    .logo-main {
        font-size: 1.1rem;
    }
    
    .logo-sub {
        font-size: 0.9rem;
    }
    
    .search-container {
        flex: 1 1 100%;
        order: 3;
        margin: 0;
        max-width: none;
    }
    
    .search-container input {
        padding: 0.9rem 1rem 0.9rem 3rem !important;
        font-size: 1.1rem !important;
        min-height: 44px !important;
        height: 44px !important;
        color: #333 !important;
        background-color: #fff !important;
        border: 2px solid #e1e5e9 !important;
        border-radius: 8px !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
        -webkit-text-fill-color: #333 !important;
    }
    
    .search-container input:focus {
        border-color: #2d5a27 !important;
        color: #333 !important;
        background-color: #fff !important;
        -webkit-text-fill-color: #333 !important;
    }
    
    .search-container input::placeholder {
        color: #999 !important;
        opacity: 1 !important;
        -webkit-text-fill-color: #999 !important;
    }
    
    .search-container i {
        left: 1rem;
        font-size: 1.1rem;
        color: #666;
    }
    
    .header-right {
        flex: 0 0 auto;
        order: 2;
    }
    
    .delivery-info {
        display: none;
    }
    
    /* Show overlay on mobile */
    .sidebar-overlay {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        height: 100dvh; /* Use dynamic viewport height for iOS Safari */
        min-height: -webkit-fill-available; /* iOS Safari fallback */
        z-index: 1600;
        transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        width: 280px;
        box-shadow: 2px 0 20px rgba(0,0,0,0.15);
        border-radius: 0;
        padding: 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        -webkit-transform: translateZ(0); /* Hardware acceleration for iOS */
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        touch-action: pan-y; /* Allow vertical scrolling on touch */
        will-change: left;
        /* Ensure content can scroll properly in iOS Safari */
        display: flex;
        flex-direction: column;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-close {
        display: flex !important;
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 1700;
    }
    
    .sidebar.active .sidebar-close {
        right: 1rem;
        top: 1rem;
        position: absolute;
    }
    
    /* Hide X button for Safari mobile */
    .safari-mobile .sidebar-close {
        display: none !important;
    }
    
    /* Sidebar Overlay - Only visible on mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.6);
        z-index: 1500;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        cursor: pointer;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        touch-action: manipulation;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -khtml-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        will-change: opacity, visibility;
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
        box-shadow: none !important;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Safari-specific optimizations */
    .safari-mobile .sidebar-overlay {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
        height: 100vh;
        height: 100dvh; /* iOS Safari dynamic viewport */
        min-height: -webkit-fill-available; /* iOS Safari fallback */
        position: fixed;
        width: 100%;
        -webkit-overflow-scrolling: auto; /* Disable momentum scrolling on body */
    }
    
    /* Additional iOS Safari fixes */
    @supports (-webkit-touch-callout: none) {
        /* iOS Safari specific styles */
        .sidebar {
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
        
        .sidebar.active {
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
        
        .sidebar .categories {
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
    }
    
    /* Ensure sidebar content can scroll on mobile */
    .sidebar-open .sidebar {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* iOS Safari specific scrolling fix */
    .sidebar .store-info,
    .sidebar .categories {
        flex-shrink: 0;
    }
    
    .sidebar .categories {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        touch-action: pan-y;
        padding-bottom: 2rem; /* Extra padding for iOS Safari */
    }
    
    .products-container, .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .content-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.5rem;
    }
    
    .logo {
        display: flex !important;
        font-size: 1rem;
        gap: 0.4rem;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .logo-icon {
        min-width: 1.5rem;
        max-width: 1.5rem;
        height: 1.5rem;
        padding: 0.3rem;
        background: #2d5a27 !important;
        display: flex !important;
        visibility: visible !important;
    }
    
    .logo-icon i {
        font-size: 0.8rem;
        color: white !important;
        display: block !important;
        visibility: visible !important;
    }
    
    .logo-text {
        font-size: 0.85rem;
        color: #2d5a27 !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .search-container {
        margin: 0;
        max-width: none;
        flex: 1 1 100%;
        order: 3;
    }
    
    .search-container input {
        padding: 0.8rem 1rem 0.8rem 3rem !important;
        font-size: 1.1rem !important;
        min-height: 42px !important;
        height: 42px !important;
        color: #333 !important;
        background-color: #fff !important;
        border: 2px solid #e1e5e9 !important;
        border-radius: 8px !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
        -webkit-text-fill-color: #333 !important;
    }
    
    .search-container input:focus {
        border-color: #2d5a27 !important;
        color: #333 !important;
        background-color: #fff !important;
        outline: none !important;
        -webkit-text-fill-color: #333 !important;
    }
    
    .search-container input::placeholder {
        color: #999 !important;
        opacity: 1 !important;
        -webkit-text-fill-color: #999 !important;
    }
    
    .search-container i {
        left: 1rem;
        font-size: 1.1rem;
        color: #666;
    }
    
    .main-container {
        padding: 0.5rem;
    }
    
    .products-container, .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .product-card {
        padding: 0.75rem;
    }
    
    .product-image {
        width: 70px;
        height: 100px;
    }
    
    .product-info h3, .product-name {
        font-size: 0.9rem;
    }
    
    .product-description {
        font-size: 0.75rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .add-to-cart, .add-to-cart-btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .content-header h1 {
        font-size: 1.5rem;
    }
}

/* Checkout Modal */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.checkout-content {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 420px;
    max-height: 75vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.checkout-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.close-checkout {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-checkout:hover {
    background: #e9ecef;
}

.checkout-body {
    padding: 1rem;
}

.customer-info,
.order-summary,
.payment-section {
    margin-bottom: 1rem;
}

.customer-info h4,
.order-summary h4,
.payment-section h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.customer-info input,
.customer-info textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    outline: none;
    transition: border-color 0.3s;
}

.customer-info input:focus,
.customer-info textarea:focus {
    border-color: #2d5a27;
}



.customer-info textarea {
    height: 50px;
    resize: vertical;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.8rem;
}

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

.checkout-total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 2px solid #e1e5e9;
    font-size: 1rem;
    color: #2d5a27;
    font-weight: 600;
}

.payment-methods {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.payment-methods label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.8rem;
    flex: 1;
    justify-content: center;
}

.payment-methods label:hover {
    background: #f8f9fa;
}

.payment-methods input[type="radio"] {
    margin: 0;
}

.payment-methods input[type="radio"]:checked + span {
    color: #2d5a27;
    font-weight: 600;
}

.card-element {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 0.6rem;
    margin-bottom: 0.6rem;
    transition: border-color 0.3s;
    font-size: 0.85rem;
}

.card-element:focus-within {
    border-color: #2d5a27;
}

.place-order-btn {
    width: 100%;
    background: #2d5a27;
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 0.5rem;
}

.place-order-btn:hover {
    background: #1e3a1c;
}

.place-order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Order Summary Styling */
.order-summary {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 0.75rem;
    border: 1px solid #e1e5e9;
}

.order-summary h4 {
    margin-bottom: 0.5rem;
    color: #2d5a27;
}

/* Order Success Styles */
.order-success {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 2rem 0;
}

.order-success h3 {
    color: #2d5a27;
    margin-bottom: 1rem;
}

.order-success p {
    color: #666;
    margin-bottom: 0.5rem;
}

/* Admin Panel Styles (for future admin page) */
.admin-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    color: #333;
}

.order-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.order-id {
    font-weight: 600;
    color: #333;
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

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

.order-status.paid {
    background: #d4edda;
    color: #155724;
}

.order-status.processing {
    background: #d1ecf1;
    color: #0c5460;
}

.order-status.delivered {
    background: #d4edda;
    color: #155724;
}

.order-items {
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.order-total {
    font-weight: 600;
    color: #2d5a27;
    font-size: 1.1rem;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.order-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-primary {
    background: #2d5a27;
    color: white;
}

.btn-primary:hover {
    background: #1e3a1c;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Responsive Design for Checkout */
@media (max-width: 768px) {
    .checkout-modal {
        padding: 0.5rem;
    }
    
    .checkout-content {
        max-height: 85vh;
        max-width: 95%;
    }
    
    .checkout-body {
        padding: 0.8rem;
    }
    
    .payment-methods {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .payment-methods label {
        width: 100%;
        justify-content: flex-start;
    }
    
    .checkout-header {
        padding: 0.6rem 0.8rem;
    }
    
    .checkout-header h3 {
        font-size: 1rem;
    }
    
    .customer-info input,
    .customer-info textarea {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    
    .place-order-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .checkout-content {
        max-width: 98%;
        max-height: 90vh;
    }
    
    .checkout-body {
        padding: 0.6rem;
    }
    
    .customer-info,
    .order-summary,
    .payment-section {
        margin-bottom: 0.8rem;
    }
}

/* Pricing Breakdown Styles */
.pricing-breakdown {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.pricing-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: #333;
}

.pricing-line:not(:last-child) {
    border-bottom: 1px solid #e1e5e9;
}

.pricing-line.total-line {
    border-top: 2px solid #2d5a27;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-size: 1.1rem;
}

.checkout-pricing-breakdown {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.checkout-pricing-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: #333;
}

.checkout-pricing-line:not(:last-child) {
    border-bottom: 1px solid #e1e5e9;
}

/* Pickup Info Styles */
.pickup-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pickup-label {
    font-weight: 600;
    color: #333;
}

.pickup-time {
    font-size: 0.9rem;
    color: #2d5a27;
}

/* Pickup Notice and Instructions Styles */
.pickup-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2d5a27;
    margin: 1rem 0;
}

.pickup-notice i {
    color: #2d5a27;
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.pickup-notice div {
    flex: 1;
}

.pickup-notice strong {
    color: #2d5a27;
}

.pickup-address {
    color: #666;
    font-style: italic;
}

.pickup-instructions {
    background: #e8f5e8;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.pickup-instructions p {
    margin: 0.5rem 0;
    color: #333;
}

.pickup-instructions p:first-of-type {
    margin-top: 0;
}

.pickup-instructions p:last-of-type {
    margin-bottom: 0;
} 

/* Tax exempt note styling */
.tax-exempt-note,
.checkout-tax-exempt-note {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
    text-align: right;
    padding: 0.25rem 0;
}

.tax-exempt-note {
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.checkout-tax-exempt-note {
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 0.5rem;
}

/* Variable weight product styling */
.price-note {
    font-size: 0.7rem;
    color: #f39c12;
    font-style: italic;
    margin-top: 0.25rem;
    line-height: 1.2;
}

.variable-weight-note {
    font-size: 0.65rem;
    color: #f39c12;
    font-style: italic;
    margin-top: 0.2rem;
    line-height: 1.1;
}

.estimated-total-note {
    font-size: 0.75rem;
    color: #f39c12;
    font-style: italic;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #fef9e7;
    border-left: 3px solid #f39c12;
    border-radius: 4px;
}

/* Estimated price styling */
.product-price-container .product-price {
    font-weight: 600;
}

.cart-item-total {
    color: #333;
    font-weight: 500;
}

.pricing-line span:first-child {
    color: #333;
}

.pricing-line span:last-child {
    color: #333;
    font-weight: 500;
}