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

/* ==================== BASE RESET & VARIABLES ==================== */
* { font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; box-sizing: border-box; font-display: swap; }
html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100vw; }
body { margin: 0; background: #F8F9FA; color: #2D3436; overflow-x: hidden; word-wrap: break-word; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.product-card { content-visibility: auto; contain-intrinsic-size: 0 500px; }
img { max-width: 100%; height: auto; display: block; }
button, a, input, select, textarea { min-height: 44px; min-width: 44px; touch-action: manipulation; }
.aspect-square { aspect-ratio: 1 / 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.logo-dot { width: 12px; height: 12px; background: #007BFF; border-radius: 50%; box-shadow: 0 0 10px rgba(0,123,255,0.5); display: block; }
.star-rating { display: inline-flex; align-items: center; gap: 2px; }
.star-rating .star { color: #F59E0B; font-size: 13px; }
.star-rating .star.empty { color: #E5E7EB; }
.star-rating-lg .star { font-size: 20px; }
.review-card { background: #fff; border: 1px solid #E5E7EB; border-radius: 16px; padding: 16px; transition: all 0.2s; }
.review-card:hover { border-color: #007BFF; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #007BFF, #0056b3); color: white; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.review-form { background: #F8F9FA; border-radius: 16px; padding: 20px; border: 1px solid #E5E7EB; }
.star-input { font-size: 28px; color: #E5E7EB; cursor: pointer; transition: all 0.15s; display: inline-block; padding: 0 2px; }
.star-input:hover, .star-input.active { color: #F59E0B; transform: scale(1.1); }
.rating-bar { height: 8px; background: #E5E7EB; border-radius: 4px; overflow: hidden; flex: 1; }
.rating-bar-fill { height: 100%; background: #F59E0B; border-radius: 4px; transition: width 0.5s ease; }
.image-gallery { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.gallery-thumb { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; flex-shrink: 0; }
.gallery-thumb:hover { transform: translateY(-2px); }
.gallery-thumb.active { border-color: #007BFF; box-shadow: 0 0 0 3px rgba(0,123,255,0.15); }
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9998; justify-content: center; align-items: center; padding: 20px; pointer-events: none; }
.lightbox.active { display: flex !important; pointer-events: auto; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 8px; }
.chat-product-tag { background: linear-gradient(135deg, #F0F9FF, #E0F2FE); border: 1px solid #BAE6FD; border-radius: 14px; padding: 12px; display: flex; gap: 12px; align-items: center; margin: 0 16px 12px; cursor: pointer; transition: all 0.2s; }
.chat-product-tag:hover { transform: translateX(4px); border-color: #007BFF; }
.chat-product-tag img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.chat-bubble { max-width: 75%; padding: 10px 14px; border-radius: 18px; margin: 6px 0; animation: slideIn 0.3s ease; word-wrap: break-word; }
.chat-bubble.sent { background: #007BFF; color: white; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble.received { background: #E9ECEF; color: #2D3436; margin-right: auto; border-bottom-left-radius: 4px; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.msg-container { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.msg-row { display: flex; align-items: flex-end; gap: 8px; max-width: 80%; }
.msg-row.sent { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.received { align-self: flex-start; }
.msg-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #007BFF, #0056b3); color: white; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; flex-shrink: 0; margin-bottom: 4px; overflow: hidden; }
.msg-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.msg-bubble { padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.4; word-wrap: break-word; max-width: 100%; }
.msg-bubble.sent { background: #007BFF; color: white; border-bottom-right-radius: 4px; }
.msg-bubble.received { background: #E9ECEF; color: #2D3436; border-bottom-left-radius: 4px; }
.msg-time { font-size: 11px; opacity: 0.7; margin-top: 4px; display: block; }
.msg-bubble.sent .msg-time { color: rgba(255,255,255,0.8); text-align: right; }
.msg-bubble.received .msg-time { color: #6c757d; text-align: left; }
.messenger-input { background: #fff; border-top: 1px solid #e9ecef; padding: 12px 16px; }
.messenger-input-wrapper { display: flex; align-items: center; gap: 12px; background: #f0f2f5; border-radius: 20px; padding: 8px 16px; }
.messenger-input-field { flex: 1; border: none; background: transparent; outline: none; font-size: 15px; color: #2D3436; min-height: 36px; }
.messenger-input-field::placeholder { color: #8e8e93; }
.messenger-send-btn { width: 36px; height: 36px; border-radius: 50%; background: #007BFF; color: white; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; flex-shrink: 0; min-height: 36px; min-width: 36px; }
.messenger-send-btn:hover { background: #0056b3; transform: scale(1.05); }
.messenger-send-btn:active { transform: scale(0.95); }
.messenger-send-btn i { font-size: 14px; margin-left: 2px; }
.product-card { transition: all 0.3s ease; background: #fff; border-radius: 1rem; overflow: hidden; border: 1px solid #E5E7EB; cursor: pointer; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; justify-content: center; align-items: center; padding: 16px; pointer-events: none; }
.modal.active { display: flex !important; pointer-events: auto; }
.modal > div { position: relative; z-index: 2; pointer-events: auto; max-height: 90vh; overflow-y: auto; width: 100%; }
.toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(100px); background: #2D3436; color: white; padding: 12px 24px; border-radius: 50px; font-size: 14px; z-index: 2000; opacity: 0; transition: all 0.3s ease; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.category-pill { transition: all 0.2s ease; cursor: pointer; flex-shrink: 0; padding: 8px 16px; border-radius: 9999px; font-size: 14px; background: #F3F4F6; color: #4B5563; border: 1px solid transparent; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.category-pill:hover, .category-pill.active { background: #007BFF; color: white; }
.verified-badge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; background: #1877F2; border-radius: 50%; color: white; font-size: 9px; margin-left: 4px; vertical-align: middle; flex-shrink: 0; }
.verified-badge-large { width: 20px; height: 20px; font-size: 11px; margin-left: 6px; }
.badge-top-seller { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(135deg, #F59E0B, #D97706); color: white; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-trusted { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(135deg, #10B981, #059669); color: white; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-verified { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(135deg, #3B82F6, #2563EB); color: white; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.seller-rank-1 { border: 2px solid #F59E0B; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2); }
.seller-rank-2 { border: 2px solid #9CA3AF; }
.seller-rank-3 { border: 2px solid #B45309; }
.sell-image-preview { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.floating-whatsapp { position: fixed; bottom: 20px; right: 16px; width: 56px; height: 56px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; box-shadow: 0 4px 20px rgba(37,211,102,0.4); cursor: pointer; z-index: 40; transition: all 0.3s ease; touch-action: manipulation; text-decoration: none; }
.floating-whatsapp:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(37,211,102,0.6); }
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton 1.5s infinite; border-radius: 8px; }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty-page { text-align: center; padding: 60px 20px; color: #9CA3AF; }
.location-badge { display: inline-block; padding: 4px 12px; background: #E9ECEF; color: #2D3436; border-radius: 20px; font-size: 12px; font-weight: 500; }
.paystack-btn { background: #0BAF4B; color: white; transition: all 0.3s; }
.paystack-btn:hover { background: #09943f; }
#categoryList { -ms-overflow-style: none; scrollbar-width: none; }
#categoryList::-webkit-scrollbar { display: none; }
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seller-stat-card { background: #F8F9FA; border-radius: 12px; padding: 16px; text-align: center; }
.toggle-switch { position: relative; width: 48px; height: 24px; background: #E5E7EB; border-radius: 12px; cursor: pointer; transition: all 0.3s; flex-shrink: 0; }
.toggle-switch.active { background: #007BFF; }
.toggle-switch::after { content: ''; position: absolute; width: 20px; height: 20px; background: white; border-radius: 50%; top: 2px; left: 2px; transition: all 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle-switch.active::after { left: 26px; }
.banner-ad-container { margin-bottom: 1.5rem; }
.banner-ad-container img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 16px; }
.text-ad-container { margin-bottom: 1rem; }
.popup-ad-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 10000; justify-content: center; align-items: center; padding: 20px; backdrop-filter: blur(4px); pointer-events: none; }
.popup-ad-overlay.active { display: flex !important; pointer-events: auto; }
.popup-ad-box { background: white; border-radius: 20px; max-width: 500px; width: 100%; overflow: hidden; position: relative; animation: popupSlide 0.4s ease; pointer-events: auto; }
@keyframes popupSlide { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.popup-ad-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; background: rgba(0,0,0,0.5); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; border: none; font-size: 14px; min-height: 32px; min-width: 32px; }
.popup-ad-close:hover { background: rgba(0,0,0,0.8); }
.ad-card { background: white; border: 1px solid #E5E7EB; border-radius: 12px; padding: 16px; transition: all 0.2s; }
.ad-card:hover { border-color: #007BFF; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.ad-preview-img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; background: #F3F4F6; margin-bottom: 12px; }
.rate-limit-banner { background: #FEF3C7; border: 1px solid #F59E0B; color: #92400E; padding: 12px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; display: none; }
.rate-limit-banner.show { display: block; }
.modal:not(.active), .lightbox:not(.active), .popup-ad-overlay:not(.active) { display: none !important; pointer-events: none !important; visibility: hidden !important; opacity: 0 !important; z-index: 0 !important; position: fixed; }
.plan-card { transition: all 0.3s ease; border: 2px solid transparent; }
.plan-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.1); }
.plan-card.popular { border-color: #A855F7; position: relative; }
.sub-progress-bar { height: 100%; background: linear-gradient(90deg, #9333EA, #3B82F6); border-radius: 9999px; transition: width 0.5s ease; }
.safety-tip-card { background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 16px; padding: 20px; }
.scam-warning-card { background: #FEF2F2; border: 1px solid #FECACA; border-radius: 16px; padding: 20px; }
.process-step { position: relative; }
.process-step::after { content: ''; position: absolute; top: 24px; right: -50%; width: 100%; height: 2px; background: #E5E7EB; z-index: 0; }
.process-step:last-child::after { display: none; }
.bg-gray-100 { background-color: #F3F4F6; }
.object-cover { object-fit: cover; }
.text-dotBlue { color: #007BFF; }
.text-red-500 { color: #EF4444; }
.text-green-500 { color: #22C55E; }
.text-gray-400 { color: #9CA3AF; }
.text-gray-500 { color: #6B7280; }
.text-gray-600 { color: #4B5563; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.p-4 { padding: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.top-3 { top: 0.75rem; }
.left-3 { left: 0.75rem; }
.hidden { display: none; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }
.cursor-pointer { cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.border { border-width: 1px; }
.border-gray-100 { border-color: #F3F4F6; }
.bg-white { background-color: #FFFFFF; }
.bg-green-500 { background-color: #22C55E; }
.bg-red-100 { background-color: #FEE2E2; }
.text-white { color: #FFFFFF; }
.text-red-600 { color: #DC2626; }
.text-green-600 { color: #16A34A; }
.text-amber-600 { color: #D97706; }
.text-purple-600 { color: #9333EA; }
.text-blue-600 { color: #2563EB; }
.line-through { text-decoration: line-through; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.min-w-0 { min-width: 0; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.inline-flex { display: inline-flex; }
.justify-center { justify-content: center; }
.rounded-full { border-radius: 9999px; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.font-medium { font-weight: 500; }
.text-\[10px\] { font-size: 10px; }
.group:hover .group-hover\:scale-110 { transform: scale(1.1); }
.transition-transform { transition-property: transform; }
.duration-500 { transition-duration: 500ms; }
.verified-badge i { font-size: 8px; }
footer { background-color: #111827 !important; padding-bottom: 100px !important; }
footer .bg-white { background-color: #1F2937 !important; }
footer button, footer .bg-white { background-color: #374151 !important; color: #fff !important; }
footer .text-white { color: #FFFFFF !important; }
footer .text-gray-400 { color: #9CA3AF !important; }
footer .text-gray-500 { color: #6B7280 !important; }
footer h4 { color: #FFFFFF !important; }
footer a { color: #9CA3AF !important; transition: color 0.2s; display: block; padding: 8px 0; min-height: 44px; }
footer a:hover { color: #FFFFFF !important; }
footer .border-gray-700 { border-color: #374151 !important; }
footer .logo-dot { background: #007BFF !important; box-shadow: 0 0 8px rgba(0,123,255,0.4) !important; }
:focus-visible { outline: 2px solid #007BFF; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
@supports (-webkit-touch-callout: none) { .h-screen, .h-[calc(100vh-64px)] { height: -webkit-fill-available; } }
#authButtons { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
#authButtons button { white-space: nowrap; font-size: 13px; padding: 8px 16px; border-radius: 9999px; font-weight: 500; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border: none; cursor: pointer; transition: all 0.2s ease; }
@media (max-width: 480px) { nav .h-16 { height: 3.5rem !important; } nav .text-xl { font-size: 1rem !important; } nav .w-10 { width: 2rem !important; height: 2rem !important; } #authButtons { gap: 0.25rem; } #authButtons button { padding: 6px 12px !important; font-size: 12px !important; min-height: 32px !important; min-width: auto !important; } #authButtons button span { display: none; } #productsGrid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem !important; } .product-card .p-4 { padding: 0.5rem !important; } .product-card h3 { font-size: 12px !important; line-height: 1.3; } .product-card .text-dotBlue { font-size: 14px !important; } #dashboardPage .grid.md\:grid-cols-3 { grid-template-columns: 1fr !important; } .toast { max-width: 90vw; font-size: 13px; padding: 10px 16px; bottom: 80px; } .image-gallery { gap: 6px; } .gallery-thumb { width: 56px; height: 56px; } .rating-bar { height: 6px; } .modal > div { width: 95%; margin: 0.5rem; padding: 1.5rem; } }
@media (min-width: 481px) and (max-width: 767px) { #productsGrid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem !important; } }
@media (max-width: 768px) { #homePage .bg-white.border-b.py-12 { padding-top: 2rem !important; padding-bottom: 2rem !important; } #homePage h1 { font-size: 1.75rem !important; line-height: 1.2 !important; } #homePage p.text-gray-600 { font-size: 1rem !important; margin-bottom: 1.5rem !important; } #categoryList { gap: 0.5rem !important; padding-bottom: 0.75rem !important; overflow-x: auto; -webkit-overflow-scrolling: touch; } .category-pill { padding: 8px 16px !important; font-size: 13px !important; } #productsGrid { gap: 0.75rem !important; } .product-card .p-4 { padding: 0.75rem !important; } .product-card h3 { font-size: 13px !important; line-height: 1.3; } .product-card .text-dotBlue { font-size: 15px !important; } .product-card .text-xs { font-size: 11px !important; } #productDetailPage .grid { gap: 1.5rem !important; } #productDetailPage h1 { font-size: 1.5rem !important; } #productDetailPage .text-3xl { font-size: 1.5rem !important; } #productDetailPage .grid.md\:grid-cols-2 { grid-template-columns: 1fr !important; } #chatPage { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 50; background: white; } #chatPage > div { margin: 0 !important; border-radius: 0 !important; height: 100vh !important; height: 100dvh !important; max-width: 100% !important; border: none !important; box-shadow: none !important; } #chatPage .max-w-4xl { max-width: 100% !important; } #chatPage .h-\[calc\(100vh-64px\)\] { height: calc(100vh - 56px) !important; height: calc(100dvh - 56px) !important; } #chatPage > div { flex-direction: column !important; } #chatPage .w-full.md\:w-1\/3 { width: 100% !important; min-height: 120px; max-height: 35vh; border-right: none !important; border-bottom: 1px solid #E5E7EB; } #chatPage .flex-1 { height: calc(65vh - 56px) !important; height: calc(65dvh - 56px) !important; } #chatMessages { padding: 12px !important; } #chatInputArea { padding: 8px 12px !important; } .messenger-input-wrapper { padding: 6px 12px !important; } .chat-bubble { max-width: 85% !important; padding: 8px 12px !important; font-size: 14px !important; } .msg-row { max-width: 90% !important; } .msg-bubble { padding: 8px 12px !important; font-size: 14px !important; } #sellPage .bg-white { padding: 1.25rem !important; border-radius: 1rem !important; } #sellPage h2 { font-size: 1.25rem !important; } #sellPage .grid.grid-cols-2 { grid-template-columns: 1fr !important; } .modal > div { width: 100% !important; margin: 0 1rem !important; max-height: 85vh !important; overflow-y: auto !important; } #wishlistPage h1, #dashboardPage h1, #ordersPage h1, #myProductsPage h1, #notificationsPage h1 { font-size: 1.5rem !important; margin-bottom: 1.5rem !important; } #dashboardPage .grid.md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; gap: 0.75rem !important; } #dashboardPage .bg-white.p-6 { padding: 1rem !important; } #dashboardPage .text-3xl { font-size: 1.25rem !important; } footer .grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; } footer .text-xl { font-size: 1.1rem !important; } footer a { display: block; padding: 8px 0; min-height: 44px; } .floating-whatsapp { bottom: 20px !important; right: 12px !important; width: 50px !important; height: 50px !important; font-size: 22px !important; z-index: 40 !important; } .review-form { padding: 16px !important; } .gallery-thumb { width: 60px; height: 60px; } .popup-ad-box { max-width: 90vw !important; } .admin-stats-grid { grid-template-columns: repeat(2, 1fr) !important; } .admin-form-grid { grid-template-columns: 1fr !important; } .process-step::after { display: none; } .subscription-plans-grid { grid-template-columns: 1fr !important; } .plan-card.popular { transform: none !important; } nav .hidden.md\:flex { display: none !important; } nav .md\:hidden { display: block !important; } #topSellersGrid { grid-template-columns: 1fr !important; } #wishlistGrid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem !important; } .max-w-7xl { padding-left: 0.75rem !important; padding-right: 0.75rem !important; } .py-8 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; } .pb-12 { padding-bottom: 2rem !important; } .mt-20 { margin-top: 3rem !important; } .mb-8 { margin-bottom: 1rem !important; } .mb-6 { margin-bottom: 0.75rem !important; } .py-6 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; } }
@media (min-width: 769px) and (max-width: 1023px) { #productsGrid { grid-template-columns: repeat(3, 1fr) !important; gap: 1rem !important; } #chatPage .w-full.md\:w-1\/3 { width: 35% !important; } }
@media (min-width: 1024px) { #productsGrid { grid-template-columns: repeat(4, 1fr) !important; gap: 1.5rem !important; } .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } #topSellersGrid { grid-template-columns: repeat(3, 1fr) !important; } #wishlistGrid { grid-template-columns: repeat(4, 1fr) !important; } }
@media (min-width: 1280px) { #productsGrid { grid-template-columns: repeat(4, 1fr) !important; gap: 2rem !important; } }
@media (max-width: 360px) { #productsGrid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem !important; } .product-card p, .product-card span { font-size: 0.7rem !important; } .product-card h3 { font-size: 0.75rem !important; } #authButtons button { padding: 4px 8px !important; font-size: 11px !important; } nav .h-16 { height: 3rem !important; } }
#socialMediaIcons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 480px) { #socialMediaIcons { gap: 0.5rem; } .social-icon-placeholder, .social-icon-active { width: 36px; height: 36px; } }
@media (max-width: 768px) { body:has(#chatPage:not(.hidden)) { overflow: hidden; position: fixed; width: 100%; height: 100%; } #chatPage:not(.hidden) ~ nav, #chatPage:not(.hidden) ~ footer, #chatPage:not(.hidden) ~ .floating-whatsapp { display: none !important; } }
@media (max-width: 640px) { #sellPage .max-w-2xl { padding-left: 0.75rem !important; padding-right: 0.75rem !important; } #sellPage .grid.grid-cols-2 { grid-template-columns: 1fr !important; } }
@media (max-width: 768px) { .overflow-x-auto { -webkit-overflow-scrolling: touch; overflow-x: auto; } table { min-width: 600px; } }
@media (max-width: 640px) { .skeleton-card { min-height: 200px; } }
.ai-widget { position: fixed; bottom: 90px; right: 16px; z-index: 9999; font-family: 'Inter', sans-serif; }
.ai-toggle-btn { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #007BFF 0%, #0056b3 100%); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 4px 20px rgba(0,123,255,0.4); transition: all 0.3s ease; position: relative; min-height: 60px; min-width: 60px; }
.ai-toggle-btn:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(0,123,255,0.6); }
.ai-pulse { position: absolute; width: 100%; height: 100%; border-radius: 50%; background: rgba(0,123,255,0.3); animation: aiPulse 2s infinite; z-index: -1; }
@keyframes aiPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.ai-chat-box { position: absolute; bottom: 75px; right: 0; width: 380px; max-width: calc(100vw - 32px); height: 550px; max-height: calc(100vh - 150px); background: white; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e5e7eb; transition: all 0.3s ease; }
.ai-chat-box.hidden { display: none !important; }
.ai-header { background: linear-gradient(135deg, #007BFF 0%, #0056b3 100%); color: white; padding: 16px 20px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ai-avatar { width: 44px; height: 44px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.ai-info h4 { margin: 0; font-size: 16px; font-weight: 700; }
.ai-info p { margin: 2px 0 0; font-size: 12px; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
.ai-status-dot { width: 8px; height: 8px; background: #4ade80; border-radius: 50%; display: inline-block; animation: aiBlink 2s infinite; }
@keyframes aiBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.ai-close-btn { margin-left: auto; background: rgba(255,255,255,0.15); border: none; color: white; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; min-height: 32px; min-width: 32px; }
.ai-close-btn:hover { background: rgba(255,255,255,0.3); }
.ai-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #f8f9fa; scroll-behavior: smooth; }
.ai-message { display: flex; animation: aiSlideIn 0.3s ease; }
@keyframes aiSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.ai-message-user { justify-content: flex-end; }
.ai-message-bot { justify-content: flex-start; }
.ai-bubble { max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 14px; line-height: 1.6; word-wrap: break-word; }
.ai-message-user .ai-bubble { background: #007BFF; color: white; border-bottom-right-radius: 4px; }
.ai-message-bot .ai-bubble { background: white; color: #2D3436; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.ai-bubble strong { color: inherit; font-weight: 600; }
.ai-bubble ul { margin: 8px 0; padding-left: 20px; }
.ai-bubble li { margin: 4px 0; }
.ai-welcome { margin-bottom: 8px; }
.ai-typing { display: flex; align-items: center; gap: 10px; padding: 0 16px 8px; color: #6b7280; font-size: 13px; }
.ai-typing.hidden { display: none !important; }
.ai-typing-dots { display: flex; gap: 4px; }
.ai-typing-dots span { width: 8px; height: 8px; background: #007BFF; border-radius: 50%; animation: aiTypingBounce 1.4s infinite ease-in-out both; }
.ai-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes aiTypingBounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
.ai-input-area { padding: 12px 16px; background: white; border-top: 1px solid #e5e7eb; flex-shrink: 0; }
.ai-input-wrapper { display: flex; gap: 8px; background: #f3f4f6; border-radius: 24px; padding: 6px 6px 6px 16px; align-items: center; }
.ai-input-wrapper input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; color: #2D3436; min-height: 36px; }
.ai-input-wrapper input::placeholder { color: #9ca3af; }
.ai-send-btn { width: 36px; height: 36px; border-radius: 50%; background: #007BFF; color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; min-height: 36px; min-width: 36px; }
.ai-send-btn:hover { background: #0056b3; transform: scale(1.05); }
.ai-quick-actions { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; -ms-overflow-style: none; scrollbar-width: none; }
.ai-quick-actions::-webkit-scrollbar { display: none; }
.ai-quick-actions button { white-space: nowrap; padding: 6px 12px; border-radius: 16px; border: 1px solid #e5e7eb; background: white; color: #4b5563; font-size: 12px; cursor: pointer; transition: all 0.2s; min-height: 32px; }
.ai-quick-actions button:hover { background: #007BFF; color: white; border-color: #007BFF; }
.ai-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ai-action-btn { padding: 6px 14px; border-radius: 16px; border: 1px solid #e5e7eb; background: #f8f9fa; color: #4b5563; font-size: 12px; cursor: pointer; transition: all 0.2s; min-height: 32px; }
.ai-action-btn:hover { background: #007BFF; color: white; border-color: #007BFF; }
@media (max-width: 480px) { .ai-widget { bottom: 80px; right: 12px; } .ai-toggle-btn { width: 52px; height: 52px; font-size: 20px; } .ai-chat-box { width: calc(100vw - 24px); height: calc(100vh - 100px); bottom: 65px; right: -6px; } .ai-bubble { max-width: 90%; font-size: 13px; padding: 10px 12px; } .ai-quick-actions button { font-size: 11px; padding: 5px 10px; } }
@media (max-width: 360px) { .ai-chat-box { width: calc(100vw - 16px); right: -8px; } }
.notification-item { transition: all 0.3s ease; }
.notification-item:hover { transform: translateY(-1px); }
.notification-expanded { box-shadow: 0 10px 40px rgba(0,0,0,0.1); border-left-width: 6px !important; }
.notif-full-content { animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.notif-action-hint { transition: all 0.2s; }
#highlightedOrder { scroll-margin-top: 100px; }
#adminMap, .customer-map { border-radius: 16px; border: 1px solid #e5e7eb; z-index: 1; }
#voiceSearchBtn i { transition: all 0.2s; }
#voiceSearchBtn.listening i { color: #ef4444; text-shadow: 0 0 5px rgba(239,68,68,0.5); animation: pulse 1s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.2); opacity: 0.7; } 100% { transform: scale(1); opacity: 1; } }
#minPrice, #maxPrice { width: 90px; text-align: center; }
#newsCarousel { scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.news-card { min-width: 260px; flex-shrink: 0; background: white; border-radius: 1rem; border: 1px solid #f0f0f0; transition: transform 0.2s; cursor: pointer; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.05); }
.spin-animation { animation: spinWheel 2s cubic-bezier(0.2, 0.8, 0.3, 1) forwards; }
@keyframes spinWheel { from { transform: rotate(0deg); } to { transform: rotate(1440deg); } }
.animate-slide-up { animation: slide-up 0.3s ease forwards; }
@keyframes slide-up { from { transform: translateY(100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.flash-timer { font-size: 11px; font-weight: 600; background: #fee2e2; display: inline-block; padding: 2px 8px; border-radius: 20px; margin-top: 4px; }
.flash-badge { font-weight: bold; box-shadow: 0 1px 2px rgba(0,0,0,0.1); z-index: 5; }
.dark-mode { background-color: #1a1a2e; color: #eee; }
.dark-mode .bg-white, .dark-mode .bg-gray-50, .dark-mode .bg-gray-100, .dark-mode .bg-gray-200 { background-color: #16213e !important; color: #eee; }
.dark-mode .border, .dark-mode .border-gray-100, .dark-mode .border-gray-200 { border-color: #2c3e50 !important; }
.dark-mode .text-gray-600, .dark-mode .text-gray-700, .dark-mode .text-gray-500 { color: #bbb !important; }
.dark-mode .product-card { background-color: #0f3460 !important; border-color: #2c3e50 !important; }
#scroll-loader {
    text-align: center;
    padding: 20px;
    font-size: 14px;
    color: #888;
}

/* ==================== PWA MODE DETECTION ==================== */
/* 
 * Elements with class "web-only" are hidden when the app is running
 * as an installed PWA (standalone, fullscreen, or minimal-ui display modes).
 * Also hidden on mobile devices (max-width: 768px) when in app-like context.
 */

/* Hide web-only elements when in PWA standalone mode */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
    .web-only {
        display: none !important;
    }
    .web-only-mobile {
        display: none !important;
    }
    /* Also hide PWA install banner when already installed */
    #pwaInstallBanner {
        display: none !important;
    }
    /* Reduce padding on body when footer is hidden */
    footer.web-only ~ main,
    .pwa-mode footer ~ main {
        padding-bottom: 0 !important;
    }
}

/* JavaScript fallback: when .pwa-mode class is added to body/html */
.pwa-mode .web-only,
.pwa-mode .web-only-mobile {
    display: none !important;
}

.pwa-mode #pwaInstallBanner {
    display: none !important;
}

/* Elements that should ONLY show in PWA mode */
.pwa-only {
    display: none !important;
}

@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
    .pwa-only {
        display: block !important;
    }
}

.pwa-mode .pwa-only {
    display: block !important;
}

/* Mobile-specific: hide web-only on small screens too */
@media (max-width: 768px) {
    .web-only-mobile {
        display: none !important;
    }
}

/* When footer is hidden (PWA mode), remove extra bottom padding from main */
.pwa-mode main {
    padding-bottom: 20px !important;
}

/* PWA mode: make content area full height without footer */
.pwa-mode body {
    padding-bottom: 0 !important;
}

/* PWA mode: adjust floating WhatsApp button position since footer is gone */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
    .floating-whatsapp {
        bottom: 20px !important;
    }
}