@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --primary-light: #FFF0EB;
    --secondary: #1B2A4A;
    --accent: #00B4D8;
    --dark: #0D1B2A;
    --text: #2D3748;
    --text-light: #718096;
    --text-muted: #A0AEC0;
    --bg: #FFFFFF;
    --bg-soft: #F7F8FA;
    --bg-card: #FFFFFF;
    --border: #E2E8F0;
    --border-light: #EDF2F7;
    --success: #38A169;
    --warning: #ECC94B;
    --danger: #E53E3E;
    --star: #F6AD55;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xl: 20px;
    --container: 1200px;
    --header-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { overflow-x: hidden; touch-action: pan-x pan-y; }

body {
    font-family: 'DM Sans', 'Hind Siliguri', sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.top-bar {
    background: var(--secondary);
    color: #fff;
    font-size: 12px;
    padding: 6px 0;
    text-align: center;
}

.top-bar span { opacity: 0.8; }
.top-bar strong { color: var(--primary); }

.header {
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 16px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
}

.logo span { color: var(--primary); }

.search-bar {
    flex: 1;
    max-width: 520px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 44px 10px 16px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    background: var(--bg-soft);
}

.search-bar input:focus { border-color: var(--primary); background: #fff; }

.search-bar button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 38px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 18px;
    transition: background 0.2s;
}

.header-btn:hover { background: var(--primary-light); color: var(--primary); }

.header-btn .count {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text);
    padding: 4px;
}

.category-bar {
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar { display: none; }

.category-bar-inner {
    display: flex;
    gap: 0;
    white-space: nowrap;
}

.cat-link {
    padding: 12px 20px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.cat-link:hover, .cat-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #2D3E63 100%);
    padding: 40px 0;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: var(--primary);
    opacity: 0.08;
    border-radius: 50%;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero-text { flex: 1; color: #fff; }

.hero-tag {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-text h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-text p {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 24px;
    max-width: 400px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,53,0.4); }

.section { padding: 32px 0; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    position: relative;
    padding-left: 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.see-all {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.see-all:hover { gap: 8px; }

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.cat-card {
    text-align: center;
    padding: 16px 8px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    transition: all 0.25s;
    cursor: pointer;
}

.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.cat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-card h3 { font-size: 12.5px; font-weight: 600; color: var(--text); }
.cat-card span { font-size: 11px; color: var(--text-muted); }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--primary);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.25s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-img {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-soft);
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.product-card:hover .product-img img { transform: scale(1.08); }

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    transition: all 0.2s;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
}

.product-card:hover .wishlist-btn { opacity: 1; }
.wishlist-btn:hover { background: var(--danger); color: #fff; transform: scale(1.1); }
.wishlist-btn.active { background: var(--danger); color: #fff; }

.product-info { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; background: var(--bg-card); }

.product-cat {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stars { color: var(--star); font-size: 12px; }
.rating-count { font-size: 11px; color: var(--text-muted); }

.product-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.original-price {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.add-cart-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 0 var(--radius) var(--radius);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
    margin-top: auto;
}

.add-cart-btn:hover { background: var(--primary-dark); }

.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 48px 0 24px;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
}

.footer p { font-size: 13px; line-height: 1.7; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    z-index: 100;
    padding: 6px 0 env(safe-area-inset-bottom, 4px);
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    color: var(--text-light);
    background: none;
    border: none;
    padding: 4px 12px;
    position: relative;
}

.bottom-nav-item i { font-size: 20px; }
.bottom-nav-item.active { color: var(--primary); }

.bottom-nav-item .count {
    position: absolute;
    top: -2px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--primary);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.spinner-lg {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
}

.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

@media (max-width: 768px) {
    .search-bar { display: none; }
    .mobile-menu-btn { display: block; }
    .bottom-nav { display: block; }
    .header-actions .header-btn:not(.cart-btn):not(.notif-btn) { display: none; }

    .hero { padding: 24px 0; }
    .hero-text h1 { font-size: 24px; }
    .hero-content { flex-direction: column; text-align: center; }
    .hero-text p { margin: 0 auto 20px; }

    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-info { padding: 10px; }
    .product-name { font-size: 13px; }
    .current-price { font-size: 16px; }

    .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }

    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer { padding-bottom: 80px; }

    .section-title { font-size: 17px; }

    body { padding-bottom: 60px; }
}

@media (max-width: 480px) {
    .cat-grid { grid-template-columns: repeat(4, 1fr); }
    .cat-card { padding: 10px 4px; }
    .cat-icon { width: 40px; height: 40px; font-size: 18px; }
    .cat-card h3 { font-size: 11px; }

    .product-grid { gap: 8px; }
    .product-info { padding: 8px; }
    .add-cart-btn { font-size: 12px; padding: 8px; }
}

.mobile-search {
    display: none;
    padding: 8px 16px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .mobile-search { display: block; }
    .mobile-search .search-bar { display: block; max-width: 100%; }
}

.toast-wrap {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.toast-msg {
    background: var(--dark);
    color: #fff;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    animation: toastUp 0.3s ease;
    box-shadow: var(--shadow-lg);
}

@keyframes toastUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }


.drawer-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:200; display:none; }
.drawer-overlay.open { display:block; }
.drawer-menu { position:fixed; top:0; left:-280px; width:280px; height:100%; background:#fff; z-index:201; transition:left 0.3s; overflow-y:auto; box-shadow:4px 0 20px rgba(0,0,0,0.1); }
.drawer-menu.open { left:0; }
.drawer-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--border-light); }
.drawer-user { padding:16px 20px; background:var(--bg-soft); border-bottom:1px solid var(--border-light); }
.drawer-nav a { display:flex; align-items:center; gap:12px; padding:14px 20px; font-size:14px; color:var(--text); border-bottom:1px solid var(--border-light); transition:background 0.2s; }
.drawer-nav a:hover { background:var(--bg-soft); color:var(--primary); }
.drawer-nav a i { width:20px; text-align:center; color:var(--text-muted); font-size:16px; }
.drawer-divider { height:1px; background:var(--border); margin:8px 0; }


.banner-slider { position: relative; width: 100%; aspect-ratio: 2.5/1; overflow: hidden; background: var(--bg-soft); }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s; }
.banner-slide.active { opacity: 1; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.8); border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 14px; color: var(--dark); cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center; }
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }
.slider-btn:hover { background: #fff; }
.slider-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.slider-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.slider-dots .dot.active { background: var(--primary); width: 24px; border-radius: 5px; }
@media (max-width: 768px) { .banner-slider { aspect-ratio: 2/1; } .slider-btn { width: 30px; height: 30px; font-size: 12px; } }


.bottom-nav-item .wishlist-count { position: absolute; top: -2px; right: 4px; width: 16px; height: 16px; background: var(--primary); color: #fff; font-size: 9px; font-weight: 700; border-radius: 50%; display: flex; align-items: center; justify-content: center; }