* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00e5ff 0%, #00bde0 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* Soft neutral background for product-focused layout */
    background: #f5f6f8;
    min-height: 100vh;
    padding: 20px;
    color: #1a1a2e;
}

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

header {
    text-align: left;
    color: #1a1a2e;
    margin-bottom: 7px;
    margin-top: 0;
    padding: 6px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: #FFDC52; /* Blinkit-like header color */
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    position: sticky;
    top: 0px;
    z-index: 1000;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-contact {
    display: flex;
    align-items: center;
}

.whatsapp-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1a1a2e;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 12px;
    background: white;
    border-radius: 20px;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
}

.whatsapp-link:hover {
    background: #25D366;
    color: white;
    border-color: #25D366;
    transform: scale(1.05);
}

.whatsapp-icon {
    font-size: 1rem;
}

.whatsapp-number {
    white-space: nowrap;
}

header h1 {
    font-size: 1.6rem;
    margin: 0;
    color: #1a1a2e;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    color: #3a3a3a;
}

.cart-header {
    margin-top: 0;
    display: flex;
    align-items: center;
}

.cart-btn {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.cart-count {
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.85rem;
    margin-left: 5px;
}

.loading {
    text-align: center;
    color: white;
    padding: 40px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo {
    height: 32px;
    width: auto;
    display: block;
}

/* Search form centered in header */
.search-form {
    flex: 1 1 420px;
    max-width: 720px;
    margin: 0 18px;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 10px 16px;
    border-radius: 28px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    font-size: 0.95rem;
}

.tagline {
    font-size: 0.95rem;
    color: #00d4ff;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error {
    background: #ff6b6b;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

.no-products {
    text-align: center;
    color: white;
    padding: 40px;
    font-size: 1.2rem;
}

.category-section {
    margin-bottom: 28px;
    background: #ffffff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(16,24,40,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

.category-header {
    margin-bottom: 5px;
    padding-bottom: 5px;
}

.category-header h2 {
    font-size: 1.5rem;
    color: #666;
    font-weight: 600;
    letter-spacing: 0.3px;
}

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

.product-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    cursor: default;
    border: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: row;
    box-shadow: 0 6px 18px rgba(16,24,40,0.04);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(16,24,40,0.08);
}

.product-image {
    position: relative;
    width: 120px;
    min-width: 120px;
    height: 120px;
    background: #f7f7f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.product-image.image-error {
    background: linear-gradient(135deg, #f7f7f8 0%, #efefef 100%);
}

.product-image.image-error::after {
    content: '';
}

.product-placeholder {
    font-size: 3.5rem;
    opacity: 0.9;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 18px;
    font-size: 0.82rem;
    font-weight: 700;
}

.product-info {
    padding: 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f1724;
    margin-bottom: 4px;
    line-height: 1.3;
    word-break: break-word;
}

.product-name-hi {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a5f8f;
    margin-bottom: 8px;
    line-height: 1.4;
    font-family: 'Devanagari', 'Noto Sans Devanagari', 'Arial Unicode MS', sans-serif;
}

.product-brand {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 6px;
    font-weight: 400;
}

.product-description {
    font-size: 0.75rem;
    color: #999;
    line-height: 1.4;
    margin-bottom: 8px;
    min-height: 0;
    display: none;
}

.product-pricing {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: auto;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.price-label {
    display: none;
}

.mrp-label {
    display: none;
}

.mrp {
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
}

.sale-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000000;
}

.discount {
    font-size: 0.9rem;
    color: #0f7628;
    font-weight: 600;
}

.discount-row {
    display: flex;
    gap: 5px;
    align-items: center;
}

.discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    position: static;
}

.add-to-cart-btn {
    margin-top: auto;
    background: linear-gradient(180deg, #15a84b 0%, #0f7628 100%);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
    margin-top: 12px;
}

.add-to-cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(15,118,40,0.12);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    header {
        flex-direction: row;
        align-items: center;
        text-align: center;
        justify-content: space-between;
    }

    .logo-section {
        justify-content: flex-start;
    }

    .site-logo {
        height: 25px;
    }

    .whatsapp-link {
        padding: 6px 10px;
        font-size: 0.85rem;
        gap: 6px;
    }

    .whatsapp-icon {
        font-size: 1rem;
    }

    .whatsapp-number {
        display: inline;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .category-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .category-header h2 {
        font-size: 1.5rem;
    }

    .product-image {
        height: 90px;
    }

    .product-placeholder {
        font-size: 2rem;
    }

    .product-name {
        font-size: 0.8rem;
    }

    .sale-price {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .product-image {
        height: 90px;
    }

    .product-placeholder {
        font-size: 2.5rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Cart Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid #00d4ff;
}

.modal-content h2 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close {
    color: #999;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: #333;
}

.cart-items {
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 30px 0;
    font-size: 1.1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.item-details h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1rem;
}

.item-details p {
    margin: 3px 0;
    color: #666;
    font-size: 0.9rem;
}

.item-mrp {
    color: #999;
    text-decoration: line-through;
    font-size: 0.85rem;
}

.remove-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #ff5252;
    transform: scale(1.05);
}

.cart-summary {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.cart-summary p {
    margin: 8px 0;
    font-size: 1rem;
    color: #333;
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #00e5ff 0%, #00bde0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

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

/* Main Content Layout */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Sidebar Styling */
.sidebar {
    width: 100%;
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar h3 {
    font-size: 0.85rem;
    color: #1a1a2e;
    margin-bottom: 12px;
    margin-top: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.categories-list li {
    margin-bottom: 0;
}

.categories-list a {
    display: inline-block;
    padding: 6px 10px;
    color: #1a1a2e;
    background: #f0f0f0;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.2s ease;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #ddd;
    white-space: nowrap;
}

.categories-list a:hover {
    background: #FFDC52;
    color: #1a1a2e;
    border-color: #ffc700;
    transform: translateY(-2px);
}

#products-container {
    flex: 1;
}

/* Notification */
.notification {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
    transition: bottom 0.3s ease;
    z-index: 2000;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.notification.show {
    bottom: 20px;
}

/* Mobile Cart Modal */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        gap: 16px;
    }

    .sidebar {
        width: 100%;
        position: static;
        display: block;
        padding: 10px;
    }

    .sidebar h3 {
        white-space: normal;
        margin-bottom: 12px;
        min-width: auto;
    }

    .categories-list {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .categories-list li {
        margin-bottom: 0;
        white-space: nowrap;
    }

    .categories-list a {
        padding: 8px 12px;
        font-size: 0.7rem;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .remove-btn {
        align-self: flex-end;
        margin-top: 10px;
    }

    .cart-header {
        margin: 10px 0;
    }

    .cart-btn {
        font-size: 0.9rem;
        padding: 8px 15px;
    }
}

/* Download Button Styles */
.download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.download-btn:hover:not(:disabled) {
    background: #333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.download-btn:active:not(:disabled) {
    transform: translateY(0);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.download-icon {
    font-size: 1.1rem;
}

/* Floating Download Button for Mobile */
.floating-download-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-download-btn:hover:not(:disabled) {
    background: #000;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.floating-download-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.floating-download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    /* Show floating download button on mobile */
    .floating-download-btn {
        display: flex !important;
    }
}