/* Base Styles */
:root {
    --primary: #2F4FE0;
    --primary-dark: #3B5CFF;
    --accent: #E53935;
    --footer: #1F4E5F;
    --text-dark: #1a1a2e;
    --text-gray: #666;
    --border: #e5e5e5;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Hind Siliguri', sans-serif;
    background: #f8f9fa;
    color: var(--text-dark);
    padding-bottom: 70px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: white;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.logo {
    text-align: center;
}

.logo h1 {
    font-size: 20px;
    color: var(--primary);
}

.logo p {
    font-size: 10px;
    color: var(--accent);
}

/* Side Drawer */
.drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 2000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.drawer.open {
    left: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.drawer-menu {
    padding: 16px;
}

.drawer-menu-item {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-gray);
    font-size: 12px;
    transition: color 0.3s;
}

.nav-item.active,
.nav-item:hover {
    color: var(--primary);
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.cart-badge {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    min-width: 18px;
    text-align: center;
}

/* Container */
.container {
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Banner */
.hero-slider {
    position: relative;
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
}

.slide {
    display: none;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.slide-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
}

.view-all {
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 12px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.current-price {
    color: var(--primary);
    font-weight: bold;
    font-size: 16px;
}

.old-price {
    color: var(--accent);
    text-decoration: line-through;
    font-size: 12px;
}

.order-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 500;
    transition: background 0.3s;
}

.order-btn:hover {
    background: var(--primary-dark);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.category-card {
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
}

.category-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 8px;
}

.category-name {
    font-size: 12px;
}

/* Product Details */
.breadcrumb {
    margin: 16px 0;
    font-size: 12px;
    color: var(--text-gray);
}

.product-details {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.image-gallery {
    position: relative;
}

.main-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.thumbnail-strip {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumbnail.active {
    border-color: var(--primary);
}

.price-section {
    padding: 16px;
}

.product-price-large {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}

.old-price-large {
    font-size: 16px;
    color: var(--accent);
    text-decoration: line-through;
    margin-left: 8px;
}

.size-selector {
    margin: 16px 0;
}

.size-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.size-btn {
    width: 50px;
    padding: 10px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.size-btn.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
}

.qty-input {
    width: 60px;
    text-align: center;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
}

.add-to-cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 16px;
}

.buy-now-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 12px;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-top: 24px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -2px;
}

.tab-content {
    display: none;
    padding: 16px;
}

.tab-content.active {
    display: block;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    z-index: 2000;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 500;
}

.cart-item-price {
    color: var(--primary);
    font-weight: bold;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
}

.remove-item {
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.cart-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: bold;
}

.checkout-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    width: 100%;
    font-size: 16px;
    cursor: pointer;
}

/* Footer */
.footer {
    background: var(--footer);
    color: white;
    padding: 40px 20px 20px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-links a {
    font-size: 24px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: #ccc;
}

/* Floating Chat */
.chat-bubble {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 900;
    color: white;
    font-size: 24px;
}

/* Responsive */
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 3000;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; bottom: 70px; }
    15% { opacity: 1; bottom: 90px; }
    85% { opacity: 1; bottom: 90px; }
    100% { opacity: 0; bottom: 70px; }
}