@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg-color: #F7F8F9; --card-bg: #FFFFFF; --text-main: #1A1A1A; --text-muted: #666666;
  --border-color: #E5E7EB; --primary: #1C3B2D; --primary-text: #FFFFFF; --gold: #C59B5F;
  --glass-bg: rgba(255, 255, 255, 0.85); --glass-border: rgba(255, 255, 255, 0.3);
}
body.dark-mode {
  --bg-color: #121212; --card-bg: #1E1E1E; --text-main: #F3F4F6; --text-muted: #9CA3AF;
  --border-color: #333333; --primary: #E8F0EC; --primary-text: #1C3B2D;
  --glass-bg: rgba(30, 30, 30, 0.85); --glass-border: rgba(255, 255, 255, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Manrope', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg-color); color: var(--text-main); padding-bottom: 90px; transition: background 0.3s, color 0.3s; }

header { background: var(--glass-bg); backdrop-filter: blur(15px); padding: 15px 20px; position: sticky; top: 0; z-index: 101; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--border-color); }
header h1 { font-size: 24px; color: var(--primary); font-weight: 800; text-decoration: none; }
.search-bar { flex: 1; background: var(--bg-color); border-radius: 10px; padding: 12px 16px; border: 1px solid transparent; font-size: 14px; outline: none; font-weight: 500; color: var(--text-main); }
.search-bar:focus { border-color: var(--primary); }
.cart-icon { position: relative; text-decoration: none; color: var(--text-main); display: flex; align-items: center; }
.cart-count { position: absolute; top: -8px; right: -10px; background: var(--primary); color: var(--primary-text); font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 50%; }
.announcement-bar { background: var(--primary); color: var(--primary-text); text-align: center; padding: 8px; font-size: 12px; font-weight: 700; }

.slider-container { width: 100%; overflow: hidden; margin-bottom: 20px; }
.slider { display: flex; transition: transform 0.5s ease-in-out; }
.slide { min-width: 100%; height: 200px; background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: center; padding: 20px 30px; color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.5); text-decoration: none; }
.slide h2 { font-size: 28px; font-weight: 800; margin-bottom: 5px; }
.slide p { font-size: 15px; font-weight: 500; }

.container { padding: 0 15px 20px 15px; max-width: 1200px; margin: 0 auto; }
.section-title { margin-bottom: 15px; font-size: 18px; color: var(--text-main); font-weight: 800; }

.category-filters { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; margin-bottom: 20px; scrollbar-width: none; }
.category-filters::-webkit-scrollbar { display: none; }
.filter-btn { background: var(--card-bg); border: 1px solid var(--border-color); padding: 8px 16px; border-radius: 30px; font-size: 13px; white-space: nowrap; cursor: pointer; color: var(--text-muted); font-weight: 600; }
.filter-btn.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.product-card { background: var(--card-bg); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 4px 15px rgba(0,0,0,0.03); display: flex; flex-direction: column; position: relative; }
.product-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: var(--bg-color); }
.wishlist-btn { position: absolute; top: 10px; right: 10px; background: var(--card-bg); border: none; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.wishlist-btn svg { width: 18px; height: 18px; stroke: var(--text-muted); fill: none; }
.wishlist-btn.active svg { stroke: #EF4444; fill: #EF4444; }
.discount-tag { position: absolute; top: 10px; left: 10px; background: var(--primary); color: var(--primary-text); font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 4px; z-index: 10; }
.custom-tag { position: absolute; top: 40px; left: 10px; background: var(--gold); color: white; font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 4px; z-index: 10; text-transform: uppercase; }

.product-info { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.product-info h3 { font-size: 14px; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.price-row { display: flex; align-items: center; gap: 8px; }
.product-info .price { font-size: 16px; font-weight: 800; color: var(--gold); }
.product-info .mrp { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }

/* Fly to Cart Animation */
.fly-dot { position: fixed; width: 50px; height: 50px; border-radius: 50%; object-fit: cover; z-index: 9999; pointer-events: none; transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

.cart-container { background: var(--card-bg); padding: 20px; border-radius: 16px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.cart-item { display: flex; gap: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 15px; align-items: center; }
.cart-item img { width: 80px; height: 100px; object-fit: cover; border-radius: 12px; background: var(--bg-color); flex-shrink: 0; }
.cart-details { flex: 1; }
.cart-details h3 { font-size: 15px; margin-bottom: 5px; font-weight: 700; color: var(--text-main); }
.cart-details .price { color: var(--gold); font-weight: 800; font-size: 16px; }
.qty-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.qty-btn { background: var(--bg-color); border: 1px solid var(--border-color); width: 30px; height: 30px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; color: var(--text-main); }
.remove-btn { color: #EF4444; background: none; border: none; font-size: 13px; cursor: pointer; margin-left: auto; font-weight: 700; }

.checkout-box { background: var(--card-bg); padding: 20px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.checkout-box input, .checkout-box textarea, .checkout-box select { width: 100%; padding: 14px; border: 1px solid var(--border-color); border-radius: 12px; margin-bottom: 15px; font-size: 15px; background: var(--bg-color); color: var(--text-main); outline: none; }
.checkout-box input:focus, .checkout-box textarea:focus { border-color: var(--primary); }

.payment-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.pay-option { display: flex; align-items: center; gap: 15px; padding: 15px; border: 1px solid var(--border-color); border-radius: 12px; font-size: 15px; font-weight: 600; background: var(--card-bg); }
.pay-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--primary); }
.pay-option img { height: 26px; object-fit: contain; }

.total-row { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; margin: 20px 0; padding-top: 20px; border-top: 1px dashed var(--border-color); }
.discount-row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; color: #10B981; margin-bottom: 10px; }
.place-order-btn { width: 100%; padding: 16px; background: var(--primary); color: var(--primary-text); border: none; border-radius: 12px; font-size: 17px; font-weight: 800; cursor: pointer; }

.profile-card { background: var(--card-bg); padding: 25px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); margin-bottom: 20px; }
.order-status-card { background: var(--card-bg); padding: 20px; border-radius: 16px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border-left: 4px solid var(--gold); }
.timeline { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; position: relative; }
.timeline::before { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 2px; background: var(--border-color); z-index: 1; transform: translateY(-50%); }
.timeline-step { position: relative; z-index: 2; background: var(--card-bg); padding: 0 5px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border-color); border: 2px solid var(--card-bg); }
.timeline-step.active .timeline-dot { background: var(--primary); }
.timeline-step.cancelled .timeline-dot { background: #EF4444; }
.timeline-step span { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.timeline-step.active span { color: var(--primary); }
.timeline-step.cancelled span { color: #EF4444; }
.cancel-btn { width: 100%; padding: 12px; background: #FFF1F2; color: #EF4444; border: 1px solid #FECDD3; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 15px; }

.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--glass-bg); backdrop-filter: blur(15px); display: flex; justify-content: space-around; padding: 12px 0 18px 0; border-top: 1px solid var(--border-color); z-index: 1000; }
.nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text-muted); font-size: 11px; gap: 5px; font-weight: 600; }
.nav-item svg { width: 24px; height: 24px; }
.nav-item.active { color: var(--primary); }
.whatsapp-float { position: fixed; width: 55px; height: 55px; bottom: 95px; right: 20px; background-color: #25d366; border-radius: 50%; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); z-index: 99; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.whatsapp-float svg { width: 30px; height: 30px; fill: white; }

.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; }
.spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.3); border-top: 4px solid white; border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 15px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-overlay p { font-size: 16px; font-weight: 700; color: white; }

.auth-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 12px; text-align: center; font-weight: 700; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form input { width: 100%; padding: 15px; border: 1px solid var(--border-color); border-radius: 12px; margin-bottom: 15px; font-size: 15px; outline: none; background: var(--bg-color); color: var(--text-main); }
.auth-btn { width: 100%; padding: 16px; background: var(--primary); color: var(--primary-text); border: none; border-radius: 12px; font-weight: 800; font-size: 16px; cursor: pointer; margin-top: 10px; }
.logout-profile-btn { padding: 10px 20px; background: rgba(239, 68, 68, 0.1); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; }

.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-100px); background: var(--primary); color: var(--primary-text); padding: 12px 24px; border-radius: 30px; font-size: 14px; font-weight: bold; opacity: 0; transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); z-index: 9999; box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
