/* ===== THEME VARIABLES ===== */
:root {
  --primary: #1a237e;
  --primary-light: #3949ab;
  --primary-dark: #0d1542;
  --primary-bg: #e8eaf6;
  --primary-bg-pale: #c5cae9;
  --primary-shadow: rgba(26,35,126,0.1);
  --primary-shadow-strong: rgba(26,35,126,0.3);
  --header-dark: #0d1542;
  --header-light: #3949ab;
  --gradient-primary: linear-gradient(135deg, var(--primary-light), var(--primary));
  --gradient-header: linear-gradient(0deg, var(--header-dark), var(--header-light));
  --bg-body: #fff;
  --bg-card: #ffffff;
  --bg-card-hover: #f9f9f9;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #e0e0e0;
  --border-light: #f0f0f0;
}

[data-theme="blue"] {
  --primary: #2196F3;
  --primary-light: #64B5F6;
  --primary-dark: #1976D2;
  --primary-bg: #E3F2FD;
  --primary-bg-pale: #BBDEFB;
  --primary-shadow: rgba(33,150,243,0.1);
  --primary-shadow-strong: rgba(33,150,243,0.3);
  --header-dark: #1565C0;
  --header-light: #42A5F5;
}

[data-theme="green"] {
  --primary: #4CAF50;
  --primary-light: #81C784;
  --primary-dark: #388E3C;
  --primary-bg: #E8F5E9;
  --primary-bg-pale: #C8E6C9;
  --primary-shadow: rgba(76,175,80,0.1);
  --primary-shadow-strong: rgba(76,175,80,0.3);
  --header-dark: #2E7D32;
  --header-light: #66BB6A;
}

[data-theme="orange"] {
  --primary: #FF9800;
  --primary-light: #FFB74D;
  --primary-dark: #F57C00;
  --primary-bg: #FFF3E0;
  --primary-bg-pale: #FFE0B2;
  --primary-shadow: rgba(255,152,0,0.1);
  --primary-shadow-strong: rgba(255,152,0,0.3);
  --header-dark: #E65100;
  --header-light: #FFA726;
}

[data-theme="purple"] {
  --primary: #9C27B0;
  --primary-light: #CE93D8;
  --primary-dark: #7B1FA2;
  --primary-bg: #F3E5F5;
  --primary-bg-pale: #E1BEE7;
  --primary-shadow: rgba(156,39,176,0.1);
  --primary-shadow-strong: rgba(156,39,176,0.3);
  --header-dark: #6A1B9A;
  --header-light: #AB47BC;
}

[data-theme="red"] {
  --primary: #F44336;
  --primary-light: #EF5350;
  --primary-dark: #D32F2F;
  --primary-bg: #FFEBEE;
  --primary-bg-pale: #FFCDD2;
  --primary-shadow: rgba(244,67,54,0.1);
  --primary-shadow-strong: rgba(244,67,54,0.3);
  --header-dark: #C62828;
  --header-light: #EF5350;
}

[data-theme="navy"] {
  --primary: #1a237e;
  --primary-light: #3949ab;
  --primary-dark: #0d1542;
  --primary-bg: #e8eaf6;
  --primary-bg-pale: #c5cae9;
  --primary-shadow: rgba(26,35,126,0.1);
  --primary-shadow-strong: rgba(26,35,126,0.3);
  --header-dark: #0d1542;
  --header-light: #3949ab;
}

[data-theme="pink"] {
  --primary: #E91E63;
  --primary-light: #F06292;
  --primary-dark: #C2185B;
  --primary-bg: #FCE4EC;
  --primary-bg-pale: #F8BBD0;
  --primary-shadow: rgba(233,30,99,0.1);
  --primary-shadow-strong: rgba(233,30,99,0.3);
  --header-dark: #AD1457;
  --header-light: #EC407A;
}

/* Dark Mode */
[data-mode="dark"] {
  --bg-body: #121212;
  --bg-card: #1E1E1E;
  --bg-card-hover: #2A2A2A;
  --text-primary: #E0E0E0;
  --text-secondary: #AAAAAA;
  --text-muted: #777777;
  --border-color: #333333;
  --border-light: #2A2A2A;
  --primary-bg: #2a1525;
  --primary-bg-pale: #3d1f33;
}

[data-mode="dark"][data-theme="blue"] {
  --primary-bg: #15202d;
  --primary-bg-pale: #1f2d3d;
}

[data-mode="dark"][data-theme="green"] {
  --primary-bg: #152a18;
  --primary-bg-pale: #1f3d22;
}

[data-mode="dark"][data-theme="orange"] {
  --primary-bg: #2d2215;
  --primary-bg-pale: #3d331f;
}

[data-mode="dark"][data-theme="purple"] {
  --primary-bg: #22152a;
  --primary-bg-pale: #331f3d;
}

[data-mode="dark"][data-theme="red"] {
  --primary-bg: #2d1517;
  --primary-bg-pale: #3d1f22;
}

[data-mode="dark"][data-theme="navy"] {
  --primary-bg: #121430;
  --primary-bg-pale: #1a1d45;
}

[data-mode="dark"][data-theme="pink"] {
  --primary-bg: #2d1220;
  --primary-bg-pale: #3d1f2d;
}

/* Navy dark mode – lighter blue shop names & prices */
[data-mode="dark"][data-theme="navy"] .mall-brand {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .flash-price .current,
[data-mode="dark"][data-theme="navy"] .mall-price .current,
[data-mode="dark"][data-theme="navy"] .product-price .current,
[data-mode="dark"][data-theme="navy"] .cart-item-price,
[data-mode="dark"][data-theme="navy"] .cart-item-subtotal,
[data-mode="dark"][data-theme="navy"] .order-item-price,
[data-mode="dark"][data-theme="navy"] .order-total,
[data-mode="dark"][data-theme="navy"] .summary-item-price {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .flash-price .original,
[data-mode="dark"][data-theme="navy"] .mall-price .original,
[data-mode="dark"][data-theme="navy"] .product-price .original {
  color: #7986CB;
}

/* Navy dark mode – lowest price title & follow buttons */
[data-mode="dark"][data-theme="navy"] .lowest-price-title h2 {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .mall-store-follow {
  color: #5C6BC0;
  border-color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .mall-store-follow:hover {
  background: rgba(92, 107, 192, 0.12);
}

[data-mode="dark"][data-theme="navy"] .mall-store-follow.following {
  background: #5C6BC0;
  border-color: #5C6BC0;
  color: #fff;
}

[data-mode="dark"][data-theme="navy"] .mall-store-follow.following:hover {
  background: #7986CB;
  border-color: #7986CB;
}

/* Navy dark mode – mall icons, category hover links & see-all */
[data-mode="dark"][data-theme="navy"] .mall-store-avatar {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .mall-store-meta i {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .category-card:hover span {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .category-card.active {
  border-color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .category-card.active span {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .cat-item:hover,
[data-mode="dark"][data-theme="navy"] .cat-item:hover i {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .see-all {
  color: #5C6BC0;
}

/* Navy dark mode – category dropdown hover links */
[data-mode="dark"][data-theme="navy"] .nav-dropdown-item:hover {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .nav-dropdown-link:hover {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .nav-dropdown-more,
[data-mode="dark"][data-theme="navy"] .nav-dropdown-more:hover {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .main-nav .nav-link:hover {
  color: #5C6BC0;
}

/* Navy dark mode – mall page follow / view-store buttons & seller name */
[data-mode="dark"][data-theme="navy"] .mall-card-owner a {
  color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .mall-card-actions .btn-outline {
  color: #5C6BC0;
  border-color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .follow-btn {
  color: #5C6BC0;
  border-color: #5C6BC0;
}

[data-mode="dark"][data-theme="navy"] .follow-btn:hover {
  background: rgba(92, 107, 192, 0.12);
}

[data-mode="dark"][data-theme="navy"] .follow-btn.following {
  background: #5C6BC0;
  border-color: #5C6BC0;
  color: #fff;
}

[data-mode="dark"][data-theme="navy"] .follow-btn.following:hover {
  background: #7986CB;
  border-color: #7986CB;
}

/* Price colors – dark mode */
[data-mode="dark"] .flash-price .current,
[data-mode="dark"] .mall-price .current,
[data-mode="dark"] .product-price .current,
[data-mode="dark"] .cart-item-price,
[data-mode="dark"] .cart-item-subtotal,
[data-mode="dark"] .order-item-price,
[data-mode="dark"] .order-total,
[data-mode="dark"] .summary-item-price {
  color: var(--primary-light);
}

[data-mode="dark"] .flash-price .original,
[data-mode="dark"] .mall-price .original,
[data-mode="dark"] .product-price .original,
[data-mode="dark"] .detail-price .original {
  color: var(--text-secondary);
}

/* Price colors – light mode */
.flash-price .current,
.mall-price .current,
.product-price .current,
.cart-item-price,
.cart-item-subtotal,
.order-item-price,
.order-total,
.summary-item-price {
  color: var(--primary-dark);
}

.flash-price .original,
.mall-price .original,
.product-price .original {
  color: var(--text-muted);
}

/* Top bar & nav */
[data-mode="dark"] .top-bar { background: #0a0a0a !important; border-bottom-color: #222 !important; }
[data-mode="dark"] .main-nav { background: var(--bg-card); border-bottom-color: var(--border-color); }
[data-mode="dark"] .category-dropdown { background: var(--bg-card); border-color: var(--border-color); }
[data-mode="dark"] .cat-item:hover { background: var(--bg-card-hover); }
[data-mode="dark"] .cat-item i { color: var(--text-secondary); }
[data-mode="dark"] .nav-link:hover { background: var(--bg-card-hover); color: var(--primary); }
[data-mode="dark"] .category-toggle { color: var(--text-primary); }
[data-mode="dark"] .cat-item { color: var(--text-primary); }
[data-mode="dark"] .nav-link { color: var(--text-primary); }
[data-mode="dark"] .main-nav .nav-link { color: #fff; }
[data-mode="dark"] .main-nav .nav-link:hover { color: var(--primary); }
[data-mode="dark"] .search-bar { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
[data-mode="dark"] .search-input { color: rgba(255,255,255,0.9); background: rgba(30,30,30,0.9); }
[data-mode="dark"] .search-btn { background: transparent; color: rgba(255,255,255,0.8); }
[data-mode="dark"] .logo-bag { background: var(--bg-card); }
[data-mode="dark"] .cart-badge { background: var(--primary); color: white; }

/* Sections */
[data-mode="dark"] .flash-sale-section { background: var(--bg-card); }
[data-mode="dark"] .categories-section { background: var(--bg-card); }
[data-mode="dark"] .shopee-mall-section { background: var(--bg-card); }
[data-mode="dark"] .daily-discover-section { background: var(--bg-card); }
[data-mode="dark"] .voucher-section { background: var(--bg-card); }

/* Flash sale */
[data-mode="dark"] .flash-sale-title h2 { color: var(--primary); }
[data-mode="dark"] .flash-icon { color: var(--primary); }
[data-mode="dark"] .flash-price .original { color: var(--text-muted); }
[data-mode="dark"] .countdown-label { color: var(--text-secondary); }
[data-mode="dark"] .time-block { background: var(--text-primary); color: var(--bg-body); }
[data-mode="dark"] .time-separator { color: var(--text-primary); }
[data-mode="dark"] .progress-bar { background: var(--bg-card-hover); }

/* Categories & Mall */
[data-mode="dark"] .category-card span { color: var(--text-primary); }
[data-mode="dark"] .category-card:hover { background: var(--bg-card-hover); }
[data-mode="dark"] .category-card.active { background: var(--primary-bg-pale); border-color: var(--primary); }
[data-mode="dark"] .sidebar-cat.active { background: rgba(255,255,255,0.2); color: white !important; border-left-color: white; }
[data-mode="dark"] .mall-title h2 { color: var(--text-primary); }
[data-mode="dark"] .mall-nav a { color: var(--text-secondary); border-color: var(--border-color); }
[data-mode="dark"] .mall-nav a:hover { border-color: var(--primary); color: var(--primary); }
[data-mode="dark"] .mall-name { color: var(--text-primary); }
[data-mode="dark"] .mall-brand { color: var(--primary-light); }
[data-mode="dark"] .mall-price .original { color: var(--text-muted); }

/* Product cards */
[data-mode="dark"] .product-card { background: var(--bg-card); }
[data-mode="dark"] .product-name { color: var(--text-primary); }
[data-mode="dark"] .product-price .original { color: var(--text-muted); }
[data-mode="dark"] .product-meta { color: var(--text-muted); }

/* Tabs */
[data-mode="dark"] .tab { background: var(--bg-card); border-color: var(--border-color); color: var(--text-primary); }
[data-mode="dark"] .tab:hover, [data-mode="dark"] .tab.active { border-color: var(--primary); color: var(--primary); }

/* Vouchers */
[data-mode="dark"] .voucher-shop { color: var(--text-primary); }
[data-mode="dark"] .voucher-desc { color: var(--text-muted); }
[data-mode="dark"] .claim-btn { background: var(--bg-card); border-color: var(--primary); color: var(--primary); }
[data-mode="dark"] .claim-btn:hover { background: var(--primary); color: white; }

/* Footer */
[data-mode="dark"] .footer { background: var(--gradient-header); }
[data-mode="dark"] .footer-col h4 { color: #fff; }
[data-mode="dark"] .footer-col a { color: rgba(255,255,255,0.75); }
[data-mode="dark"] .footer-col a:hover { color: #fff; }
[data-mode="dark"] .footer-bottom { border-top-color: rgba(255,255,255,0.15); }
[data-mode="dark"] .footer-bottom p { color: rgba(255,255,255,0.6); }
[data-mode="dark"] .payment-methods { color: var(--text-secondary); }
[data-mode="dark"] .payment-methods i { color: var(--text-primary); }

/* Auth pages */
[data-mode="dark"] .auth-container { background: var(--bg-body); }
[data-mode="dark"] .auth-wrapper { background: var(--bg-card); }
[data-mode="dark"] .auth-card { background: var(--bg-card); }
[data-mode="dark"] .auth-card h2 { color: var(--text-primary); }
[data-mode="dark"] .auth-form-side { background: var(--bg-card); }
[data-mode="dark"] .auth-form-inner h2 { color: var(--text-primary); }
[data-mode="dark"] .auth-form-inner .subtitle { color: var(--text-secondary); }
[data-mode="dark"] .auth-form label { color: var(--text-primary); }
[data-mode="dark"] .auth-form input { background: var(--bg-card-hover); border-color: var(--border-color); color: var(--text-primary); }
[data-mode="dark"] .auth-form-side label { color: var(--text-primary); }
[data-mode="dark"] .auth-form-side input { background: var(--bg-card-hover); border-color: var(--border-color); color: var(--text-primary); }
[data-mode="dark"] .auth-form .link { color: var(--text-secondary); }
[data-mode="dark"] .auth-link { color: var(--text-secondary); }
[data-mode="dark"] .auth-link a { color: var(--primary); }
[data-mode="dark"] .auth-tab { color: var(--text-muted); }
[data-mode="dark"] .auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
[data-mode="dark"] .auth-link { color: var(--text-secondary); }
[data-mode="dark"] .auth-footer { color: var(--text-muted); }
[data-mode="dark"] .role-toggle { background: var(--bg-card-hover); }
[data-mode="dark"] .role-toggle label { color: var(--text-secondary); }
[data-mode="dark"] .error-msg { background: #3a1515; border-color: #5a2020; color: #f5a5a5; }
[data-mode="dark"] .flash-success { background: #153a15; border-color: #205a20; color: #a5f5a5; }
[data-mode="dark"] .errors { background: #3a1515; border-color: #5a2020; }
[data-mode="dark"] .errors li { color: #f5a5a5; }

/* Profile & Account */
[data-mode="dark"] .account-container { background: var(--bg-body); }
[data-mode="dark"] .page-card { background: var(--bg-card); }
[data-mode="dark"] .page-card h2 { color: var(--text-primary); }
[data-mode="dark"] .form-group label { color: var(--text-primary); }
[data-mode="dark"] .form-group input, [data-mode="dark"] .form-group textarea { background: var(--bg-card-hover); border-color: var(--border-color); color: var(--text-primary); }
[data-mode="dark"] .form-group input[readonly] { background: var(--bg-card-hover); color: var(--text-muted); }
[data-mode="dark"] .profile-pic-wrapper { background: var(--bg-card-hover); }
[data-mode="dark"] .success-msg { background: #153a15; border-color: #205a20; color: #a5f5a5; }
[data-mode="dark"] .site-header { background: var(--bg-card); }

/* Seller */
[data-mode="dark"] .seller-container { background: var(--bg-body); }
[data-mode="dark"] .seller-panel-nav { background: var(--primary-bg); border-bottom-color: var(--primary); }
[data-mode="dark"] .seller-panel-nav a:hover { background: var(--bg-card-hover); }
[data-mode="dark"] .seller-nav { background: var(--bg-card); }
[data-mode="dark"] .seller-nav a { color: var(--text-secondary); }
[data-mode="dark"] .seller-nav a:hover, [data-mode="dark"] .seller-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Data tables */
[data-mode="dark"] .data-table { background: var(--bg-card); }
[data-mode="dark"] .data-table th { background: var(--bg-card-hover); color: var(--text-secondary); border-bottom-color: var(--border-color); }
[data-mode="dark"] .data-table td { color: var(--text-primary); border-bottom-color: var(--border-light); }
[data-mode="dark"] .data-table tr:hover { background: var(--bg-card-hover); }

/* Pagination */
[data-mode="dark"] .pagination a, [data-mode="dark"] .pagination span { color: var(--text-primary); border-color: var(--border-color); }
[data-mode="dark"] .pagination a:hover { border-color: var(--primary); color: var(--primary); }
[data-mode="dark"] .pagination .active { background: var(--primary); color: white; border-color: var(--primary); }
[data-mode="dark"] .pagination .disabled { color: var(--text-muted); }

/* Buttons */
[data-mode="dark"] .btn-outline { background: var(--bg-card); border-color: var(--primary); color: var(--primary); }
[data-mode="dark"] .btn-outline:hover { background: var(--primary-bg); }
[data-mode="dark"] .back-to-top { background: var(--primary); }

/* Product detail */
[data-mode="dark"] .breadcrumb { background: var(--bg-card); border-bottom-color: var(--border-color); }
[data-mode="dark"] .breadcrumb a { color: var(--primary); }
[data-mode="dark"] .breadcrumb span { color: var(--text-muted); }
[data-mode="dark"] .product-detail { background: var(--bg-body); }
[data-mode="dark"] .product-detail-card { background: var(--bg-card); }
[data-mode="dark"] .product-detail-info h1 { color: var(--text-primary); }
[data-mode="dark"] .product-info-side h1 { color: var(--text-primary); }
[data-mode="dark"] .product-brand { color: var(--text-secondary); }
[data-mode="dark"] .product-sku { color: var(--text-muted); }
[data-mode="dark"] .product-short-desc { color: var(--text-secondary); }
[data-mode="dark"] .product-description { border-top-color: var(--border-color); }
[data-mode="dark"] .product-description h3 { color: var(--text-primary); }
[data-mode="dark"] .product-description .desc-content { color: var(--text-secondary); }
[data-mode="dark"] .detail-price .original { color: var(--text-muted); }
[data-mode="dark"] .detail-meta { color: var(--text-secondary); }
[data-mode="dark"] .detail-meta .label { color: var(--text-muted); }
[data-mode="dark"] .seller-info { background: var(--bg-card-hover); }
[data-mode="dark"] .seller-info span { color: var(--text-secondary); }
[data-mode="dark"] .seller-info strong { color: var(--text-primary); }
[data-mode="dark"] .qty-selector { border-color: var(--border-color); }
[data-mode="dark"] .qty-selector button { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--border-color); }
[data-mode="dark"] .qty-selector input { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-color); }
[data-mode="dark"] .main-image { border-color: var(--border-color); }
[data-mode="dark"] .btn-buy-now { background: var(--bg-card); color: var(--primary); border-color: var(--primary); }

/* Cart */
[data-mode="dark"] .cart-page { background: var(--bg-body); }
[data-mode="dark"] .cart-page h1 { color: var(--text-primary); }
[data-mode="dark"] .cart-section { background: var(--bg-body); }
[data-mode="dark"] .cart-table { background: var(--bg-card); }
[data-mode="dark"] .cart-table th { background: var(--bg-card-hover); color: var(--text-secondary); border-bottom-color: var(--border-color); }
[data-mode="dark"] .cart-table td { border-bottom-color: var(--border-light); color: var(--text-primary); }
[data-mode="dark"] .cart-item-name { color: var(--text-primary); }
[data-mode="dark"] .cart-item-price { color: var(--primary); }
[data-mode="dark"] .cart-item-subtotal { color: var(--primary); }
[data-mode="dark"] .cart-qty-input { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-color); }
[data-mode="dark"] .cart-summary { background: var(--bg-card); }
[data-mode="dark"] .cart-empty { background: var(--bg-card); }
[data-mode="dark"] .cart-empty i { color: var(--text-muted); }
[data-mode="dark"] .cart-empty p { color: var(--text-muted); }
[data-mode="dark"] .summary-card { background: var(--bg-card); }
[data-mode="dark"] .summary-card h3 { color: var(--text-primary); }
[data-mode="dark"] .summary-row { color: var(--text-secondary); border-top-color: var(--border-color); }

/* Checkout */
[data-mode="dark"] .checkout-section { background: var(--bg-body); }
[data-mode="dark"] .checkout-page { background: var(--bg-body); }
[data-mode="dark"] .checkout-page h1 { color: var(--text-primary); }
[data-mode="dark"] .checkout-form-card { background: var(--bg-card); }
[data-mode="dark"] .checkout-form-card h3 { color: var(--text-primary); }
[data-mode="dark"] .checkout-form-card label { color: var(--text-primary); }
[data-mode="dark"] .checkout-form-card input, [data-mode="dark"] .checkout-form-card textarea { background: var(--bg-card-hover); border-color: var(--border-color); color: var(--text-primary); }
[data-mode="dark"] .form-card { background: var(--bg-card); }
[data-mode="dark"] .form-card h3 { color: var(--text-primary); border-bottom-color: var(--border-color); }
[data-mode="dark"] .form-group label { color: var(--text-primary); }
[data-mode="dark"] .form-group input, [data-mode="dark"] .form-group textarea { background: var(--bg-card-hover); border-color: var(--border-color); color: var(--text-primary); }
[data-mode="dark"] .payment-option { border-color: var(--border-color); }
[data-mode="dark"] .payment-option:has(input:checked) { background: var(--primary-bg); border-color: var(--primary); }
[data-mode="dark"] .payment-option span { color: var(--text-primary); }
[data-mode="dark"] .order-summary-card { background: var(--bg-card); }
[data-mode="dark"] .order-summary-card h3 { color: var(--text-primary); }
[data-mode="dark"] .summary-item { border-bottom-color: var(--border-light); }
[data-mode="dark"] .summary-item-name { color: var(--text-primary); }
[data-mode="dark"] .summary-item-qty { color: var(--text-muted); }
[data-mode="dark"] .error-list { background: #3a1515; border-color: #5a2020; }
[data-mode="dark"] .error-list li { color: #f5a5a5; }

/* Orders */
[data-mode="dark"] .orders-section { background: var(--bg-body); }
[data-mode="dark"] .orders-page { background: var(--bg-body); }
[data-mode="dark"] .orders-page h1 { color: var(--text-primary); }
[data-mode="dark"] .orders-empty { background: var(--bg-card); }
[data-mode="dark"] .orders-empty i { color: var(--text-muted); }
[data-mode="dark"] .orders-empty p { color: var(--text-muted); }
[data-mode="dark"] .order-card { background: var(--bg-card); border-color: var(--border-color); }
[data-mode="dark"] .order-header { background: var(--bg-card-hover); border-bottom-color: var(--border-color); }
[data-mode="dark"] .order-header:hover { background: var(--border-color); }
[data-mode="dark"] .order-number { color: var(--text-primary); }
[data-mode="dark"] .order-date { color: var(--text-muted); }
[data-mode="dark"] .order-total { color: var(--primary); }
[data-mode="dark"] .order-items-count { color: var(--text-muted); }
[data-mode="dark"] .order-item-row { border-bottom-color: var(--border-light); }
[data-mode="dark"] .order-item-name { color: var(--text-primary); }
[data-mode="dark"] .order-item-meta { color: var(--text-muted); }
[data-mode="dark"] .order-item-price { color: var(--primary); }

/* Toast */
[data-mode="dark"] .toast-msg { box-shadow: 0 4px 12px rgba(0,0,0,0.4); }

/* Missing dark mode fixes */
[data-mode="dark"] .user-menu-dropdown { background: var(--bg-card); box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
[data-mode="dark"] .user-menu-dropdown a { color: var(--text-primary); }
[data-mode="dark"] .user-menu-dropdown a:hover { background: var(--bg-card-hover); }
[data-mode="dark"] .user-menu-dropdown .user-role { color: var(--text-secondary); }
[data-mode="dark"] .user-menu-toggle .name { color: var(--text-primary); }
[data-mode="dark"] .nav-dropdown-menu { background: var(--bg-card); border-color: var(--border-color); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
[data-mode="dark"] .nav-dropdown-item { border-bottom-color: var(--border-light); }
[data-mode="dark"] .nav-dropdown-item:hover { background: var(--bg-card-hover); }
[data-mode="dark"] .category-dropdown { border-color: var(--border-color); }
[data-mode="dark"] .cart-summary { background: var(--bg-card); box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
[data-mode="dark"] .cart-page h1 { color: var(--text-primary); }
[data-mode="dark"] .cart-summary .summary-rows .row { color: var(--text-secondary); }
[data-mode="dark"] .cart-summary .total-row { border-top-color: var(--border-color); }
[data-mode="dark"] .time-separator { color: var(--text-primary); }
[data-mode="dark"] .countdown-label { color: var(--text-secondary); }
[data-mode="dark"] .section-title { color: var(--text-primary); }
[data-mode="dark"] .mall-nav a { color: var(--text-secondary); border-color: var(--border-color); }
[data-mode="dark"] .mall-meta { color: var(--text-secondary); }
[data-mode="dark"] .flash-product .meta { color: var(--text-secondary); }
[data-mode="dark"] .profile-card h2 { color: var(--text-primary); border-bottom-color: var(--border-color); }
[data-mode="dark"] .nav-inner.open { background: var(--bg-card); border-top-color: var(--border-color); }
[data-mode="dark"] .cookie-banner { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-color); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
[data-mode="dark"] .cookie-decline { color: var(--text-secondary); border-color: var(--border-color); }
[data-mode="dark"] .cookie-decline:hover { background: var(--bg-card-hover); }
[data-mode="dark"] .claimed-btn,
[data-mode="dark"] button.claim-btn.claimed,
[data-mode="dark"] button[disabled].claim-btn { background: var(--bg-card-hover) !important; border-color: var(--border-color) !important; color: var(--text-secondary) !important; }
[data-mode="dark"] .seller-mode-notice { background: #2d2a1e; color: #f0e0a0; border-color: #4a4528; }
[data-mode="dark"] .product-section h3 { color: var(--text-primary); }
[data-mode="dark"] .add-to-cart-row.style-warning { background: #2d2a1e; border-color: #4a4528; }
[data-mode="dark"] .error-msg { background: #3a1a2a; border-color: var(--primary); color: #ef9a9a; }
[data-mode="dark"] .success-msg { background: #1a3a1a; border-color: #2e7d32; color: #81c784; }
[data-mode="dark"] .info-msg { background: #3a2a10; border-color: #f57f17; color: #ffb74d; }

/* Catch-all overrides for hardcoded inline styles */
[data-mode="dark"] div[style*="background:#f5f5f5"],
[data-mode="dark"] div[style*="background: #f5f5f5"] { background: #2a2a2a !important; }
[data-mode="dark"] div[style*="background:#fafafa"],
[data-mode="dark"] div[style*="background: #fafafa"] { background: #2a2a2a !important; }
[data-mode="dark"] div[style*="background:#fff"],
[data-mode="dark"] div[style*="background: #fff"] { background: #1e1e1e !important; }
[data-mode="dark"] div[style*="background:#fff8e1"],
[data-mode="dark"] div[style*="background: #fff8e1"] { background: #2d2a1e !important; }
[data-mode="dark"] div[style*="background:#fff3cd"],
[data-mode="dark"] div[style*="background: #fff3cd"] { background: #3a2a10 !important; }
[data-mode="dark"] div[style*="background:#fff0f3"],
[data-mode="dark"] div[style*="background: #fff0f3"] { background: #3a1a2a !important; }
[data-mode="dark"] div[style*="background:#e3f2fd"],
[data-mode="dark"] div[style*="background: #e3f2fd"] { background: #1a3a5c !important; }
[data-mode="dark"] div[style*="background:#e8f5e9"],
[data-mode="dark"] div[style*="background: #e8f5e9"] { background: #1b3d1b !important; }
[data-mode="dark"] div[style*="background:#fce4ec"],
[data-mode="dark"] div[style*="background: #fce4ec"] { background: #3a1a1a !important; }
[data-mode="dark"] div[style*="background:#f3e5f5"],
[data-mode="dark"] div[style*="background: #f3e5f5"] { background: #2a1a3a !important; }
[data-mode="dark"] div[style*="background:#fff3e0"],
[data-mode="dark"] div[style*="background: #fff3e0"] { background: #3a2a10 !important; }
[data-mode="dark"] div[style*="background:#fbe9e7"],
[data-mode="dark"] div[style*="background: #fbe9e7"] { background: #3a1a1a !important; }
[data-mode="dark"] div[style*="background:#e0f2f1"],
[data-mode="dark"] div[style*="background: #e0f2f1"] { background: #1a2a2a !important; }
[data-mode="dark"] div[style*="color:#666"],
[data-mode="dark"] div[style*="color: #666"] { color: #aaa !important; }
[data-mode="dark"] div[style*="color:#555"],
[data-mode="dark"] div[style*="color: #555"] { color: #bbb !important; }
[data-mode="dark"] div[style*="color:#999"],
[data-mode="dark"] div[style*="color: #999"] { color: #777 !important; }
[data-mode="dark"] div[style*="color:#222"],
[data-mode="dark"] div[style*="color: #222"] { color: #e0e0e0 !important; }
[data-mode="dark"] div[style*="color:#333"],
[data-mode="dark"] div[style*="color: #333"] { color: #e0e0e0 !important; }
[data-mode="dark"] div[style*="border:1px solid #ddd"],
[data-mode="dark"] div[style*="border: 1px solid #ddd"] { border-color: #444 !important; }
[data-mode="dark"] div[style*="border-color:#ccc"],
[data-mode="dark"] div[style*="border-color: #ccc"] { border-color: #555 !important; }
[data-mode="dark"] div[style*="border:1px solid #e9ecef"],
[data-mode="dark"] div[style*="border: 1px solid #e9ecef"] { border-color: #444 !important; }
[data-mode="dark"] button[style*="background:#f5f5f5"],
[data-mode="dark"] button[style*="background: #f5f5f5"] { background: #333 !important; color: #888 !important; border-color: #555 !important; }
[data-mode="dark"] textarea[style*="border:1px solid #ddd"],
[data-mode="dark"] textarea[style*="border: 1px solid #ddd"] { background: #2a2a2a !important; color: #e0e0e0 !important; border-color: #555 !important; }
[data-mode="dark"] div[style*="color:#856404"],
[data-mode="dark"] div[style*="color: #856404"] { color: #ffb74d !important; }
[data-mode="dark"] div[style*="border:1px solid #ffe082"],
[data-mode="dark"] div[style*="border: 1px solid #ffe082"] { border-color: #4a4528 !important; }
[data-mode="dark"] div[style*="border:1px solid #ffc107"],
[data-mode="dark"] div[style*="border: 1px solid #ffc107"] { border-color: #c9940a !important; }
[data-mode="dark"] div[style*="border:1px solid #eee"],
[data-mode="dark"] div[style*="border: 1px solid #eee"] { border-color: #444 !important; }
[data-mode="dark"] div[style*="border-top:1px solid #eee"],
[data-mode="dark"] div[style*="border-top: 1px solid #eee"] { border-top-color: #444 !important; }
[data-mode="dark"] div[style*="border-bottom:1px solid #eee"],
[data-mode="dark"] div[style*="border-bottom: 1px solid #eee"] { border-bottom-color: #444 !important; }
[data-mode="dark"] div[style*="border-bottom:1px solid #f0f0f0"],
[data-mode="dark"] div[style*="border-bottom: 1px solid #f0f0f0"] { border-bottom-color: #444 !important; }
[data-mode="dark"] span[style*="color:#666"],
[data-mode="dark"] span[style*="color: #666"] { color: #aaa !important; }
[data-mode="dark"] span[style*="color:#999"],
[data-mode="dark"] span[style*="color: #999"] { color: #777 !important; }
[data-mode="dark"] p[style*="color:#666"],
[data-mode="dark"] p[style*="color: #666"] { color: #aaa !important; }
[data-mode="dark"] label[style*="color:#666"],
[data-mode="dark"] label[style*="color: #666"] { color: #aaa !important; }

/* ===== SCROLLBAR ===== */
* { scrollbar-width: thin; scrollbar-color: var(--primary-light) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
[data-mode="dark"] * { scrollbar-color: var(--primary) #2a2a2a; }
[data-mode="dark"] ::-webkit-scrollbar-track { background: #2a2a2a; }
[data-mode="dark"] ::-webkit-scrollbar-thumb { background: var(--primary); }
[data-mode="dark"] ::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

strong { font-weight: 600; }

/* ===== THEME SWITCHER ===== */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.2);
}

.theme-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.theme-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.4);
    transition: all 0.2s;
}

.theme-dot:hover {
    transform: scale(1.2);
}

.theme-dot.active {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}

.theme-dot[data-theme="red"] { background: #F44336; }
.theme-dot[data-theme="blue"] { background: #2196F3; }
.theme-dot[data-theme="green"] { background: #4CAF50; }
.theme-dot[data-theme="orange"] { background: #FF9800; }
.theme-dot[data-theme="purple"] { background: #9C27B0; }
.theme-dot[data-theme="navy"] { background: #1a237e; }
.theme-dot[data-theme="pink"] { background: #E91E63; }

/* Theme dropdown toggle – hidden on desktop */
.theme-dropdown-toggle {
    display: none;
}

.mode-toggle {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.2s;
}

.mode-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.logo-bag svg text {
    fill: var(--primary) !important;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    min-width: 350px;
    cursor: default;
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* ===== ANNOUNCEMENT BAR ===== */
.announcement-bar {
    background: var(--gradient-header);
    color: #fff;
    position: relative;
    z-index: 1001;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.announcement-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 40px;
    padding: 6px 44px 6px 15px;
    text-align: center;
}

.announcement-bar-icon {
    color: #fff;
    opacity: 0.95;
    flex-shrink: 0;
}

.announcement-bar-text {
    line-height: 1.4;
    flex: 1 1 auto;
    min-width: 0;
}

.announcement-bar-text a {
    color: #fff;
    text-decoration: underline;
}

.announcement-bar-text a:hover {
    opacity: 0.85;
}

.announcement-bar-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 13px;
    opacity: 0.85;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
}

.announcement-bar-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

[data-mode="dark"] .announcement-bar {
    background: var(--gradient-header);
}

@media (max-width: 576px) {
    .announcement-bar-inner {
        justify-content: flex-start;
        padding-right: 40px;
        font-size: 13px;
    }
}

a, button, [role="button"], input[type="submit"], input[type="button"], .nav-link, .add-to-cart-btn, .claim-btn, select {
    cursor: pointer;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="tel"], input[type="url"], textarea, select {
    cursor: text;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: #0b0d1f !important;
    border-bottom: 1px solid #1a1c30;
    font-size: 15px;
    font-weight: 400;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.top-bar a {
    color: #fff;
    font-weight: 400;
    transition: color 0.2s;
}

.top-bar a:hover {
    color: var(--primary-light);
}

.divider {
    color: rgba(255,255,255,0.3);
    margin: 0 4px;
}

.top-bar-right > a[href*="support.php"] {
    display: none;
}

.top-bar-right > a[href*="wallet.php"] {
    margin-left: 10px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: white !important;
    font-size: 11px;
}

.social-icon:hover {
    background: var(--gradient-primary);
}

.top-bar-avatar {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 4px;
    vertical-align: middle;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-selector img {
    width: 16px;
    height: 12px;
}

.login-btn, .signup-btn {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid transparent;
}

.login-btn {
    color: white;
    border-color: rgba(255,255,255,0.4);
    background: transparent;
}

.login-btn:hover {
    color: white !important;
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.signup-btn {
    background: var(--gradient-primary);
    color: white;
    margin-left: 4px;
}

.signup-btn:hover {
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

.switch-role-btn {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    white-space: nowrap;
}
.switch-role-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-bg);
}

[data-mode="light"] .switch-role-btn {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.85);
}

[data-mode="light"] .switch-role-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    color: white;
}

/* ===== HEADER ===== */
.header {
    background: var(--gradient-header) !important;
    padding: 8px 0;
    border-bottom: 2px dotted var(--header-dark) !important;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.site-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    max-width: 450px;
}

.logo-icon {
    display: none;
}

.logo-bag {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-bag svg {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.search-bar {
    flex: 0 1 500px;
    margin-left: auto;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.search-bar:focus-within {
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.search-input {
    flex: 1;
    border: none;
    background: white;
    padding: 10px 18px;
    font-size: 13px;
    color: #333;
    outline: none;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: transparent;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    font-size: 16px;
    transition: color 0.2s;
}

.search-btn:hover {
    color: white;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-social-icons {
    display: none;
}

/* ===== USER MENU DROPDOWN ===== */
.user-menu {
    position: relative;
    padding-bottom: 8px;
    margin-bottom: -8px;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-menu-toggle:hover {
    background: rgba(255,255,255,0.15);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1100;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.user-menu.open .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-size: 14px;
    color: #333;
    transition: background 0.15s;
    text-decoration: none;
}

.user-dropdown a:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.user-dropdown a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.user-dropdown a:hover i {
    color: var(--primary);
}

.user-dropdown .logout-link {
    border-top: 1px solid var(--border-light);
    color: #dc3545;
}

.user-dropdown .logout-link:hover {
    background: #fff0f0;
    color: #dc3545;
}

.user-dropdown .logout-link i {
    color: #dc3545;
}

[data-mode="dark"] .user-dropdown {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-mode="dark"] .user-dropdown a {
    color: var(--text-primary);
}

[data-mode="dark"] .user-dropdown a:hover {
    background: var(--bg-card-hover);
}

.cart-icon {
    position: relative;
    color: white;
    font-size: 24px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #FFD83D;
    color: #333;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ===== NAVIGATION ===== */
.main-nav {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    height: auto;
    padding: 6px 0;
}

.category-menu {
    position: relative;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.category-menu.visible {
    opacity: 1;
    pointer-events: auto;
}

.category-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    font-weight: 500;
}

.category-toggle:hover {
    color: var(--primary);
}

.category-toggle .arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.category-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 240px;
    background: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 0 0 4px 4px;
}

.category-menu:hover .category-dropdown {
    display: block;
}

.cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 13px;
    color: #333;
    transition: all 0.2s;
}

.cat-item:hover {
    background: #f5f5f5;
    color: var(--primary);
}

.cat-item i {
    width: 20px;
    text-align: center;
    color: #666;
}

.cat-item:hover i {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav .nav-link {
    padding: 8px 12px;
    font-size: 15px;
    font-weight: 400;
    color: #111;
    white-space: nowrap;
    border-radius: 2px;
    transition: all 0.2s;
    text-align: center;
}

.nav-link:hover {
    background: #f5f5f5;
    color: var(--primary);
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 980px;
    max-width: min(1000px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 1000;
    padding: 0 0 0 0;
    margin-top: 4px;
    display: none;
    flex-direction: column;
}

.nav-dropdown:hover > .nav-dropdown-menu {
    display: flex;
}

.nav-dropdown-left {
    flex: 1;
    min-width: 320px;
    padding: 10px 8px 8px;
}

.nav-dropdown-left > .nav-dropdown-tree {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    max-height: calc(100vh - 190px);
    overflow-y: auto;
}

.nav-dropdown-left > .nav-dropdown-tree > li {
    width: 148px;
    flex-shrink: 0;
    margin: 0 6px 18px 0;
}

.nav-dropdown-left > .nav-dropdown-tree .nav-dropdown-link {
    padding-left: 12px;
    padding-right: 12px;
}

.nav-dropdown-left > .nav-dropdown-tree > li > .nav-dropdown-item {
    font-weight: 600;
    color: var(--text-primary);
    padding-left: 10px;
    padding-right: 10px;
}

.nav-dropdown-left > .nav-dropdown-tree > li > .nav-dropdown-item .nav-dropdown-arrow {
    display: none;
}

.nav-dropdown-left > .nav-dropdown-tree > li > .nav-dropdown-item:hover {
    background: transparent;
}

.nav-dropdown-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-dropdown-tree li {
    break-inside: avoid;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s;
}

.nav-dropdown-item:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    transition: background .15s;
}

.nav-dropdown-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-dropdown-arrow {
    font-size: 9px;
    color: #999;
    margin-left: 6px;
}

.nav-dropdown-more {
    display: block;
    padding: 4px 12px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.nav-dropdown-more:hover {
    text-decoration: underline;
}

.nav-dropdown-tree .nav-dropdown-tree {
    padding-left: 12px;
}

.nav-dropdown-hero {
    order: -1;
    width: 100%;
    height: 64px;
    object-fit: cover;
    border-radius: 0 0 12px 12px;
    display: block;
    flex-shrink: 0;
}

[data-mode="dark"] .nav-dropdown-menu {
    background: #1e1e1e;
    border-color: #333;
}

[data-mode="dark"] .nav-dropdown-item {
    color: #e0e0e0;
}

[data-mode="dark"] .nav-dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

[data-mode="dark"] .nav-dropdown-link {
    color: var(--text-secondary);
}

[data-mode="dark"] .nav-dropdown-link:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

[data-mode="dark"] .nav-dropdown-arrow {
    color: #888;
}

.flash-sale-link {
    color: var(--primary);
    font-weight: 600;
}

.flash-sale-link i {
    animation: flash 1s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding-top: 0;
    margin-top: -20px;
}

.main-inner {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 16px;
}

/* ===== BANNER CAROUSEL ===== */
.banner-carousel {
    position: relative;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    height: 280px;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
}

.carousel-slide.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

.slide-content {
    padding: 40px;
    color: white;
}

.slide-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.slide-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.slide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: white;
    border: none;
    width: 36px;
    height: 60px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.5);
}

.prev-btn { left: 0; border-radius: 0 4px 4px 0; }
.next-btn { right: 0; border-radius: 4px 0 0 4px; }

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    background: white;
    width: 20px;
    border-radius: 4px;
}

/* ===== MINI BANNERS ===== */
.mini-banners {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.mini-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.mini-banner i {
    font-size: 36px;
}

.mini-banner:hover {
    transform: translateY(-2px);
}

.mini-banner span {
    background: var(--primary);
    padding: 4px 16px;
    border-radius: 4px;
}

/* ===== FLASH SALE ===== */
.flash-sale-section {
    background: white;
    margin-top: 16px;
    padding: 20px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--primary);
    margin-bottom: 16px;
    position: relative;
}

.section-header .see-all {
    position: absolute;
    right: 20px;
}

.flash-sale-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flash-icon {
    color: var(--primary);
    font-size: 24px;
    animation: flash 1s infinite;
}

.flash-sale-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.countdown {
    display: flex;
    align-items: center;
    gap: 6px;
}

.countdown-label {
    font-size: 12px;
    color: #666;
    margin-right: 4px;
}

.time-block {
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
}

.time-separator {
    font-weight: 700;
    color: #333;
}

.see-all {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.see-all:hover {
    text-decoration: underline;
}

.flash-sale-products {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 0 20px;
    justify-items: center;
}

.flash-product {
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
}

.flash-product:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.flash-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--gradient-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
}

.flash-product img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.flash-price .current {
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
}

.flash-price .original {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
    margin-left: 6px;
}

.progress-wrap {
    margin-top: 8px;
}

.progress-text {
    display: block;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
    letter-spacing: 0.2px;
}

.progress-bar {
    background: var(--primary-bg-pale);
    border-radius: 999px;
    height: 32px;
    position: relative;
    overflow: visible;
    border: 1px solid rgba(0, 0, 0, 0.16);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.28),
        inset 0 -1px 2px rgba(255, 255, 255, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.12);
}

.progress-fill {
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 45%),
        var(--gradient-primary);
    background-size: 200% 100%, 200% 100%;
    height: 100%;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    transition: width 0.6s ease;
    animation: progress-shimmer 2.2s linear infinite;
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.55),
        inset 0 -3px 4px rgba(0, 0, 0, 0.28),
        0 2px 5px rgba(0, 0, 0, 0.35),
        0 4px 9px rgba(0, 0, 0, 0.14);
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
    transform: translateX(-100%);
    animation: progress-sheen 2.2s ease-in-out infinite;
}

.progress-tip {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e6e6e6 45%, #b5b5b5 100%);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        0 2px 5px rgba(0, 0, 0, 0.35),
        0 0 10px var(--primary);
}

@keyframes progress-shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes progress-sheen {
    0% { transform: translateX(-100%); }
    60%, 100% { transform: translateX(100%); }
}

/* ===== CATEGORIES ===== */
.categories-section {
    background: white;
    margin-top: 16px;
    padding: 20px 0;
}

.categories-section .section-header h2 {
    border-bottom: none;
    padding-bottom: 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(10, auto);
    gap: 12px;
    padding: 0 20px;
    justify-content: center;
}

.category-card {
    text-align: center;
    padding: 18px 10px;
    border-radius: 10px;
    transition: all 0.2s;
}

.category-card:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.category-card.active {
    border: 2px solid var(--primary);
    background: var(--primary-bg-pale);
}

.category-card.active span {
    color: var(--primary);
    font-weight: 600;
}

.sidebar-cat.active {
    background: rgba(255,255,255,0.2);
    color: white !important;
    border-left-color: white;
}

.sidebar-cat.active i {
    color: white;
}

.category-products-section {
    margin-top: 16px;
}

.category-products-section .section-header {
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.category-products-section .section-header h2 {
    font-size: 20px;
}

.cat-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 36px;
    color: white;
    background: linear-gradient(160deg, #667eea, #764ba2);
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}

.category-card span {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* ===== SHOPEE MALL ===== */
.shopee-mall-section {
    background: white;
    margin-top: 16px;
    padding: 20px 0;
}

.mall-header {
    flex-wrap: wrap;
    gap: 12px;
}

.mall-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mall-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 700;
}

.mall-title h2 {
    font-size: 20px;
    font-weight: 700;
}

.mall-nav {
    display: flex;
    gap: 16px;
}

.mall-nav a {
    font-size: 13px;
    color: #666;
    padding: 4px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
}

.mall-nav a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mall-products {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 0 20px;
    justify-items: center;
}

.mall-product {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.mall-product:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.mall-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.mall-info {
    flex: 1;
    min-width: 0;
}

.mall-brand {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
}

.mall-name {
    font-size: 13px;
    color: #333;
    margin: 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mall-price .current {
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.mall-price .original {
    color: #999;
    font-size: 11px;
    text-decoration: line-through;
    margin-left: 6px;
}

/* ===== DAILY DISCOVER ===== */
.daily-discover-section {
    background: white;
    margin-top: 16px;
    padding: 20px 0;
}

.discover-tabs {
    display: flex;
    gap: 4px;
}

.tab {
    padding: 6px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover, .tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 0 20px;
    justify-items: center;
}

.product-card {
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    text-align: center;
    width: 100%;
}

.product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 15px;
    color: #333;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-price .current {
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
}

.product-price .original {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
    margin-left: 6px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 11px;
    color: #999;
}

.rating i {
    color: #FFD83D;
    margin-right: 2px;
}

/* ===== VOUCHERS ===== */
.voucher-section {
    background: white;
    margin-top: 16px;
    padding: 20px 0;
}

.voucher-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.voucher-section .section-header h2 i {
    color: var(--primary);
}

.vouchers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 20px;
    justify-items: center;
}

.voucher-card {
    display: flex;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.voucher-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.voucher-left {
    background: var(--gradient-primary);
    color: white;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.voucher-amount {
    font-size: 22px;
    font-weight: 700;
}

.voucher-min {
    font-size: 10px;
    opacity: 0.9;
    margin-top: 4px;
}

.voucher-right {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.voucher-shop {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.voucher-desc {
    font-size: 11px;
    color: #999;
    margin: 4px 0 8px;
}

.claim-btn {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 2px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
}

.claim-btn:hover {
    background: var(--gradient-primary);
    color: white;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gradient-header);
    padding: 40px 0 20px;
    margin-top: 16px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #fff;
}

.footer-col a {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fff;
}

.app-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.app-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #333;
    color: white !important;
    padding: 8px 16px;
    border-radius: 4px;
    width: fit-content;
}

.app-badge i {
    font-size: 24px;
}

.app-badge small {
    font-size: 10px;
    opacity: 0.8;
    display: block;
}

.app-badge span {
    font-size: 13px;
    font-weight: 600;
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
}

.payment-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.payment-methods i {
    font-size: 28px;
    color: rgba(255,255,255,0.9);
}

.footer-bottom p {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px var(--primary-shadow-strong);
    transition: all 0.2s;
    z-index: 1000;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.back-to-top.visible {
    display: flex;
}

/* ===== ADD TO CART BUTTONS ===== */
.add-to-cart-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 2px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.add-to-cart-btn.small {
    padding: 4px 10px;
    font-size: 11px;
    margin-top: 4px;
}

.flash-product {
    position: relative;
}

.flash-product .add-to-cart-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.flash-product:hover .add-to-cart-btn {
    display: inline-flex;
}

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #fff;
}

.auth-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 480px;
    padding: 40px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 8px;
    color: #333;
    font-size: 22px;
}

.auth-card .subtitle {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-bottom: 24px;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"],
.auth-form input[type="number"],
.auth-form textarea,
.auth-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
    outline: none;
}

.auth-form input:focus,
.auth-form textarea:focus,
.auth-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-shadow);
}

.auth-form .btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-form .btn-primary:hover {
    background: var(--primary-dark);
}

.auth-form .link {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #666;
}

.auth-form .link a {
    color: var(--primary);
    font-weight: 500;
}

.auth-form .link a:hover {
    text-decoration: underline;
}

.flash-msg {
    padding: 10px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
}

.flash-msg.error {
    background: #fff0f0;
    color: #d32f2f;
    border: 1px solid #fdd;
}

.flash-msg.success {
    background: #f0fff0;
    color: #2e7d32;
    border: 1px solid #dfd;
}

/* ===== PROFILE & ACCOUNT PAGES ===== */
.account-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.account-container {
    flex: 1;
    padding: 24px 0;
    background: #f5f5f5;
}

.profile-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 32px;
    max-width: 700px;
    margin: 0 auto;
}

.profile-card h2 {
    font-size: 20px;
    margin-bottom: 24px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

.profile-avatar {
    text-align: center;
    margin-bottom: 24px;
}

.profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin: 0 auto 12px;
}

.profile-avatar .avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 36px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

/* ===== SELLER PAGES ===== */
.seller-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.seller-nav {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
}

.seller-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0;
    height: 44px;
}

.seller-nav a {
    padding: 12px 16px;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
}

.seller-nav a:hover,
.seller-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 500;
}

.seller-container {
    flex: 1;
    padding: 24px 0;
    background: #f5f5f5;
}

.seller-container .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== DATA TABLE ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.data-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    border-bottom: 1px solid #e0e0e0;
}

.data-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.data-table tr:hover {
    background: #fafafa;
}

.data-table .thumb {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
}

/* ===== STATUS BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-approved, .badge-active { background: #d4edda; color: #155724; }
.badge-suspended, .badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-rejected { background: #f8d7da; color: #721c24; }
.badge-processing { background: #cce5ff; color: #004085; }
.badge-shipped { background: #e2d9f3; color: #4a148c; }
.badge-delivered { background: #d4edda; color: #155724; }
.badge-inactive { background: #e2e3e5; color: #383d41; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.btn-pink {
    background: var(--gradient-primary);
    color: white;
}

.btn-pink:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-bg);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    color: white;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* ===== PRODUCT DETAIL PAGE ===== */
.product-detail {
    padding: 24px 0;
    background: #f5f5f5;
}

.product-detail .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-detail-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 32px;
    display: flex;
    gap: 40px;
}

.product-gallery {
    flex: 1;
    max-width: 480px;
}

.product-gallery .main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.product-gallery .thumbnails {
    display: flex;
    gap: 8px;
}

.product-gallery .thumbnails img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.product-gallery .thumbnails img:hover,
.product-gallery .thumbnails img.active {
    border-color: var(--primary);
}

.product-detail-info {
    flex: 1;
}

.product-detail-info h1 {
    font-size: 22px;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-detail-info .detail-price {
    background: var(--primary);
    padding: 16px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.detail-price .current {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.detail-price .original {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: line-through;
    margin-left: 12px;
}

.detail-meta {
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
}

.detail-meta .row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-meta .label {
    width: 120px;
    color: #999;
    flex-shrink: 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
}

.quantity-selector button {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.quantity-selector button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quantity-selector input {
    width: 60px;
    height: 36px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 14px;
    outline: none;
}

.product-actions {
    display: flex;
    gap: 12px;
}

.product-actions .btn {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
}

.product-description {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.product-description h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #333;
}

.product-description p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* ===== CART PAGE ===== */
.cart-page {
    padding: 24px 0;
    background: #f5f5f5;
    min-height: calc(100vh - 160px);
}

.cart-page .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.cart-page h1 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.cart-table th {
    background: #f8f9fa;
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.cart-table td {
    padding: 16px;
    vertical-align: middle;
}

.cart-table .product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-table .product-cell img {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    object-fit: cover;
}

.cart-table .product-cell .name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.cart-summary {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 24px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-summary .summary-rows {
    font-size: 14px;
    color: #666;
}

.cart-summary .summary-rows .row {
    display: flex;
    justify-content: space-between;
    width: 300px;
    padding: 6px 0;
}

.cart-summary .summary-rows .total-row {
    border-top: 2px solid #f0f0f0;
    margin-top: 6px;
    padding-top: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.cart-empty i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 16px;
}

.cart-empty p {
    font-size: 16px;
    color: #999;
    margin-bottom: 20px;
}

/* ===== CHECKOUT PAGE ===== */
.checkout-page {
    padding: 24px 0;
    background: #f5f5f5;
    min-height: calc(100vh - 160px);
}

.checkout-page .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.checkout-page h1 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

.checkout-form-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 24px;
}

.checkout-form-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.checkout-form-card .form-group {
    margin-bottom: 16px;
}

.checkout-form-card label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.checkout-form-card input,
.checkout-form-card textarea,
.checkout-form-card select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.checkout-form-card input:focus,
.checkout-form-card textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-shadow);
}

.order-summary-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 24px;
    position: sticky;
    top: 20px;
}

.order-summary-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.order-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
}

.order-item .info {
    flex: 1;
    font-size: 13px;
}

.order-item .info .qty {
    color: #999;
    font-size: 12px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    background: var(--primary-bg);
    margin-top: 12px;
}

.payment-option input[type="radio"] {
    accent-color: var(--primary);
}

.payment-option label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 0 !important;
}

/* ===== ORDER HISTORY ===== */
.orders-page {
    padding: 24px 0;
    background: #f5f5f5;
    min-height: calc(100vh - 160px);
}

.orders-page .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.orders-page h1 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.order-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    overflow: hidden;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.order-card-header .order-num {
    font-weight: 600;
    color: #333;
}

.order-card-body {
    padding: 16px 20px;
}

.order-card-body .order-items-list {
    margin-bottom: 12px;
}

.order-card-body .order-items-list .item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.order-card-body .order-items-list .item img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #fafafa;
    font-size: 13px;
}

.order-total {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    transform: translateX(0);
}

.toast.success { background: #28a745; }
.toast.error { background: #f0f0f0; color: #333333; border: 1px solid #d9d9d9; border-left: 4px solid #dc3545; }
[data-mode="dark"] .toast.error { background: #232329; color: #e8e8e8; border-color: #44444e; border-left-color: #e74c3c; }
.toast.info { background: #17a2b8; }

/* ===== MODERN UI OVERRIDES ===== */

/* Smooth rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Cards – rounder corners, softer shadows */
.profile-card,
.auth-card,
.product-detail-card,
.checkout-form-card,
.order-summary-card,
.cart-summary,
.cart-empty,
.order-card,
.data-table,
.cart-table {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}

/* Section cards */
.flash-sale-section,
.categories-section,
.shopee-mall-section,
.daily-discover-section,
.voucher-section {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}

/* Banner & carousel */
.banner-carousel {
    border-radius: 0 0 12px 12px;
}

.carousel-btn {
    border-radius: 8px;
    width: 40px;
    backdrop-filter: blur(4px);
}

.prev-btn { border-radius: 0 8px 8px 0; }
.next-btn { border-radius: 8px 0 0 8px; }

/* Product cards */
.product-card {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

.product-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.flash-product {
    border-radius: 12px;
}

.flash-product:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.mall-product {
    border-radius: 12px;
}

.mall-product:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Category cards */
.category-card {
    border-radius: 12px;
}

.category-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Mini banners */
.mini-banner {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mini-banner:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

/* Voucher cards */
.voucher-card {
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
}

.voucher-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Buttons – rounder, smoother */
.btn,
.slide-btn,
.add-to-cart-btn,
.claim-btn,
.btn-pink,
.btn-outline,
.btn-danger {
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover,
.slide-btn:hover,
.add-to-cart-btn:hover,
.claim-btn:hover,
.btn-pink:hover,
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.slide-btn {
    border-radius: 50px;
    padding: 10px 32px;
}

/* Auth buttons */
.auth-form .btn-primary {
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Auth card */
.auth-tabs {
    border-bottom-color: var(--border-light);
}

/* Form inputs – rounder, cleaner focus */
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"],
.auth-form input[type="number"],
.auth-form textarea,
.auth-form select,
.checkout-form-card input,
.checkout-form-card textarea,
.checkout-form-card select,
.cart-qty-input,
.qty-selector input,
.quantity-selector input {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.auth-form input:focus,
.auth-form textarea:focus,
.auth-form select:focus,
.checkout-form-card input:focus,
.checkout-form-card textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-shadow);
}

/* Pagination – rounder */
.pagination a, .pagination span {
    border-radius: 8px;
    font-weight: 500;
}

/* Badges – rounder */
.badge {
    border-radius: 20px;
    letter-spacing: 0.02em;
}

/* Tabs */
.tab {
    border-radius: 8px;
    font-weight: 500;
}

/* Nav links */
.main-nav .nav-link {
    border-radius: 8px;
}

/* Logo bag */
.logo-bag {
    border-radius: 8px;
}

/* Category dropdown */
.category-dropdown {
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: none;
}

.nav-dropdown-menu {
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: none;
}

/* Cart icon */
.cart-icon {
    transition: transform 0.2s;
}

.cart-icon:hover {
    transform: scale(1.1);
}

/* Back to top */
.back-to-top {
    border-radius: 50%;
    width: 44px;
    height: 44px;
}

/* Footer */
.app-badge {
    border-radius: 10px;
    transition: transform 0.2s;
}

.app-badge:hover {
    transform: translateY(-2px);
}

/* Toast */
.toast {
    border-radius: 10px;
}

/* Data table */
.data-table th {
    letter-spacing: 0.04em;
}

/* Image hover lift */
.product-card img,
.flash-product img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover img,
.flash-product:hover img {
    transform: scale(1.03);
}

/* Progress bar */
.progress-bar {
    border-radius: 999px;
}

.progress-fill {
    border-radius: 999px;
}

/* Time blocks */
.time-block {
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
}

/* Top bar login/signup buttons */
.login-btn, .signup-btn {
    border-radius: 20px;
}

/* Order summary sticky card */
.order-summary-card {
    border: 1px solid rgba(0,0,0,0.04);
}

/* Payment options */
.payment-option {
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}

/* Mall nav pills */
.mall-nav a {
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s;
}

/* Seller nav */
.seller-nav a {
    border-radius: 0;
}

/* Page card */
.page-card {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}

/* Cart table product images */
.cart-table .product-cell img {
    border-radius: 8px;
}

/* Order card item images */
.order-card-body .order-items-list .item img,
.order-item img {
    border-radius: 8px;
}

/* Product detail images */
.product-gallery .main-image {
    border-radius: 12px;
}

.product-gallery .thumbnails img {
    border-radius: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) {
    .container {
        width: 100%;
        max-width: 100%;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .main-inner {
        display: block;
    }

    .banner-carousel {
        height: 200px;
    }

    .flash-sale-products {
        grid-template-columns: repeat(4, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .mall-products {
        grid-template-columns: repeat(3, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .vouchers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .top-bar-left > a,
    .top-bar-left > .divider,
    .top-bar-left > .social-icon,
    .top-bar-left .follow-us-label {
        display: none;
    }

    .top-bar-left {
        display: flex;
        align-items: center;
    }

    .theme-switcher {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        position: relative;
    }

    .theme-dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.15);
        border: none;
        color: white;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 13px;
        transition: background 0.2s;
    }

    .theme-dropdown-toggle:hover {
        background: rgba(255,255,255,0.3);
    }

    .theme-dots {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 8px;
        background: #1b1b1b;
        border: 1px solid #333;
    border-radius: 0 0 8px 8px;
        padding: 8px;
        gap: 8px;
        flex-wrap: wrap;
        width: max-content;
        z-index: 9999;
        box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    }

    .theme-switcher.theme-dropdown-open .theme-dots {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-social-icons {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-social-icons .social-icon {
        color: white;
        font-size: 13px;
        opacity: 0.8;
    }

    .mobile-social-icons .social-icon:hover {
        opacity: 1;
    }

    .top-bar-inner {
        justify-content: flex-end;
        gap: 6px;
    }

    .top-bar-right {
        gap: 4px;
    }

    .top-bar-right .nav-text {
        display: none;
    }

    .top-bar-right .login-btn .nav-text,
    .top-bar-right .signup-btn .nav-text,
    .top-bar-right .switch-role-btn .nav-text {
        display: inline;
    }

    .top-bar-right .user-menu-toggle .nav-text {
        display: none;
    }

    .top-bar-right a {
        font-size: 11px;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .site-logo {
        height: 50px;
        max-width: 200px;
    }

    .logo-text {
        font-size: 18px;
    }

    .search-bar {
        order: 3;
        flex: 1 1 100%;
    }

    .nav-inner {
        overflow-x: auto;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links {
        gap: 0;
    }

    .nav-link {
        padding: 8px 8px;
        font-size: 12px;
    }

    .nav-dropdown-menu {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        min-width: 0;
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-top: 0;
    }

    .nav-dropdown-left {
        min-width: 0;
        padding: 8px 12px;
    }

    .nav-dropdown {
        position: static;
    }

    .main-content {
        padding-top: 20px;
    }

    .banner-carousel {
        height: 160px;
    }

    .slide-content {
        padding: 20px;
    }

    .slide-content h2 {
        font-size: 22px;
    }

    .slide-content p {
        font-size: 14px;
    }

    .slide-btn {
        padding: 8px 20px;
        font-size: 12px;
    }

    .mini-banners {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 10px;
    }

    .mini-banner {
        padding: 10px 12px;
        font-size: 12px;
    }

    .mini-banner i {
        font-size: 16px;
    }

    .flash-sale-products {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 0 12px;
    }

    .flash-sale-title {
        gap: 8px;
        flex-wrap: wrap;
    }

    .flash-sale-title h2 {
        font-size: 16px;
    }

    .countdown {
        gap: 3px;
    }

    .countdown-label {
        display: none;
    }

    .time-block {
        padding: 2px 6px;
        font-size: 12px;
        min-width: 26px;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 0 12px;
    }

    .cat-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }

    .category-card span {
        font-size: 14px;
    }

    .mall-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 12px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 0 12px;
    }

    .vouchers-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0 12px;
        justify-items: stretch;
    }

    .voucher-card {
        width: 100%;
    }

    .voucher-left {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
        padding: 12px 8px;
    }

    .voucher-amount {
        font-size: 18px;
    }

    .voucher-right {
        min-width: 0;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .payment-methods {
        flex-wrap: wrap;
        gap: 10px;
    }

    .product-detail-card {
        flex-direction: column;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .cart-summary .summary-rows .row {
        width: 100%;
    }

    .cart-table {
        display: block;
        overflow-x: auto;
    }

    .order-card-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .order-card-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .top-bar-right .login-btn,
    .top-bar-right .signup-btn {
        padding: 5px 14px;
        font-size: 12px;
    }

    .site-logo {
        height: 40px;
        max-width: 160px;
    }

    .logo-bag {
        width: 32px;
        height: 32px;
    }

    .logo-bag svg {
        width: 26px;
        height: 26px;
    }

    .logo-text {
        font-size: 16px;
    }

    .search-input {
        padding: 8px 12px;
        font-size: 13px;
    }

    .search-btn {
        padding: 0 14px;
        font-size: 15px;
    }

    .category-toggle {
        padding: 8px 10px;
        font-size: 12px;
    }

    .banner-carousel {
        height: 140px;
        border-radius: 0 0 4px 4px;
    }

    .slide-content {
        padding: 16px;
    }

    .slide-content h2 {
        font-size: 18px;
    }

    .slide-content p {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .carousel-btn {
        width: 28px;
        height: 40px;
        font-size: 12px;
    }

    .flash-sale-products {
        grid-template-columns: repeat(2, 1fr);
    }

    .flash-product {
        padding: 8px;
    }

    .flash-price .current {
        font-size: 14px;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cat-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .mall-products {
        grid-template-columns: 1fr;
    }

    .mall-product img {
        width: 60px;
        height: 60px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-info {
        padding: 8px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-price .current {
        font-size: 14px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .footer-col h4 {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .footer-col a {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .app-badge {
        padding: 6px 12px;
    }

    .app-badge i {
        font-size: 20px;
    }

    .app-badge small {
        font-size: 9px;
    }

    .app-badge span {
        font-size: 12px;
    }

    .section-header {
        padding: 0 12px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .flash-sale-section,
    .categories-section,
    .shopee-mall-section,
    .daily-discover-section,
    .voucher-section {
    padding: 8px 0;
    }

    .voucher-left {
        width: 90px;
        min-width: 90px;
        max-width: 90px;
        padding: 10px 6px;
    }

    .voucher-amount {
        font-size: 16px;
    }

    .voucher-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .claim-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .product-detail-card {
        padding: 16px;
        gap: 20px;
    }

    .cart-table .product-cell img {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 360px) {
    .flash-sale-products {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-dropdown-hero {
        display: none;
    }
}

/* ===== NOTIFICATION DROPDOWN ===== */
.notif-wrapper {
    position: relative;
    display: inline-block;
}

.notif-bell {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 16px;
    cursor: pointer;
    padding: 6px 8px;
    position: relative;
    transition: opacity .2s;
}

.notif-bell:hover {
    opacity: .8;
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
    pointer-events: none;
    animation: badgeGlow 1.5s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(229, 57, 53, 0.5), 0 0 12px rgba(229, 57, 53, 0.3); }
    50% { box-shadow: 0 0 16px 6px rgba(229, 57, 53, 1), 0 0 30px 10px rgba(229, 57, 53, 0.6), 0 0 50px 16px rgba(229, 57, 53, 0.3); }
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    z-index: 1000;
    overflow: hidden;
}

.notif-dropdown.show {
    display: block;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.notif-mark-all {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.notif-mark-all:hover {
    text-decoration: underline;
}

.notif-list {
    max-height: 360px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}

.notif-item:hover {
    background: var(--bg-card-hover);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item.notif-unread {
    background: var(--primary-bg);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-msg {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notif-empty {
    text-align: center;
    padding: 30px 16px;
    color: var(--text-muted);
}

.notif-empty i {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
    opacity: .5;
}

.notif-empty p {
    font-size: 13px;
    margin: 0;
}

.notif-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.notif-footer a {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.notif-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .notif-dropdown {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        max-height: 60vh;
    }

    .notif-list {
        max-height: calc(60vh - 100px);
    }

    .user-dropdown {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        width: 100%;
        min-width: 0;
        border-radius: 0;
        max-height: 50vh;
        overflow-y: auto;
    }

    .notif-dropdown.show,
    .user-menu.open .user-dropdown,
    .chat-notif-dropdown.show {
        display: block;
    }

    .dropdown-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 999;
    }
}

/* Self-purchase prevention */
.add-to-cart-btn.own-product {
    opacity: 0.35;
    pointer-events: none;
    position: relative;
}
.add-to-cart-btn.own-product::after {
    content: 'Your product';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}
.activity-section .add-to-cart-btn.own-product::after {
    position: static;
    transform: none;
    display: block;
    background: none;
    color: var(--text-secondary);
    font-size: 10px;
    padding: 0;
    border-radius: 0;
    text-align: center;
    margin-top: 2px;
}

/* ===== REVIEW APPROVAL MODAL ===== */
.review-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.review-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.review-modal-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
}
.review-modal-overlay.active .review-modal-card {
    transform: translateY(0);
}
.review-modal-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 16px 0 8px;
}
.review-modal-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px;
    line-height: 1.5;
}
.review-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: var(--primary-bg);
    font-size: 28px;
    color: var(--primary);
}
.review-modal-icon.approved {
    background: #e8f5e9;
    color: #2e7d32;
}
.review-modal-icon.disapproved {
    background: #fce4ec;
    color: #c62828;
}
.review-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.review-modal-btn {
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.review-modal-btn.primary {
    background: var(--primary);
    color: #fff;
}
.review-modal-btn.primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.review-modal-btn.secondary {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}
.review-modal-btn.secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.review-modal-btn.danger {
    background: #e53935;
    color: #fff;
}
.review-modal-btn.danger:hover {
    background: #c62828;
    transform: translateY(-1px);
}
.review-modal-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 16px;
    background: var(--bg-card);
    color: var(--text-primary);
    box-sizing: border-box;
}
.review-modal-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== CONTACT US MODAL ===== */
.contact-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.contact-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.contact-modal-card {
    background: var(--bg-card);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
}
.contact-modal-overlay.active .contact-modal-card {
    transform: translateY(0);
}
.contact-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}
.contact-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.contact-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 4px;
}
.contact-modal-close:hover {
    color: var(--text-primary);
}
#contactForm {
    padding: 20px 24px 24px;
}
.contact-modal-fields {
    margin-bottom: 14px;
}
.contact-modal-fields label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.contact-modal-fields input,
.contact-modal-fields textarea {
    width: 100%;
    padding: 11px 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-primary);
    box-sizing: border-box;
}
.contact-modal-fields textarea {
    resize: vertical;
}
.contact-modal-fields input:focus,
.contact-modal-fields textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.contact-modal-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}
.contact-modal-msg {
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    display: none;
}
.contact-modal-msg.error {
    display: block;
    background: #fce4ec;
    color: #c62828;
}
.contact-modal-msg.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
}
.contact-modal-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}
.contact-modal-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.contact-modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== CHAT SYSTEM ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 520px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--border-light);
}
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}
.chat-header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.chat-header-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.chat-header-status {
    font-size: 11px;
    color: var(--text-secondary);
}
.chat-header-status.online {
    color: #4caf50;
}
.chat-rules {
    background: var(--primary-bg);
    border-bottom: 1px solid var(--border-light);
    max-height: 200px;
    overflow-y: auto;
}
.chat-rules.hidden {
    display: none;
}
.chat-rules-inner {
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}
.chat-rules-inner > i {
    font-size: 18px;
    color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}
.chat-rules-inner strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 13px;
}
.chat-rules-inner ul {
    margin: 0;
    padding-left: 16px;
    line-height: 1.7;
}
.chat-rules-close {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    align-self: center;
    transition: opacity 0.2s;
    font-family: inherit;
    margin-left: auto;
    flex-shrink: 0;
}
.chat-rules-close:hover {
    opacity: 0.85;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-behavior: smooth;
}
.chat-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 20px;
}
.chat-msg {
    display: flex;
    gap: 8px;
    max-width: 75%;
    animation: chatMsgIn 0.25s ease;
}
@keyframes chatMsgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-msg.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-msg.received {
    align-self: flex-start;
}
.chat-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 4px;
}
.chat-msg-avatar-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 4px;
}
.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
}
.chat-msg.sent .chat-msg-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg.received .chat-msg-bubble {
    background: var(--bg-secondary, #f0f2f5);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}
[data-mode="dark"] .chat-msg.received .chat-msg-bubble {
    background: #2a2a3d;
}
.chat-msg-time {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.6;
    text-align: right;
}
.chat-msg.sent .chat-msg-time {
    color: #fff;
}
.chat-msg.received .chat-msg-time {
    color: var(--text-secondary);
}
.chat-msg-read {
    font-size: 10px;
    margin-top: 2px;
    text-align: right;
}
.chat-msg.sent .chat-msg-read {
    color: #fff;
}
.chat-msg.received .chat-msg-read {
    color: var(--text-secondary);
}
.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 13px;
    gap: 8px;
}
.chat-empty i {
    font-size: 36px;
    opacity: 0.4;
}
.chat-date-divider {
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
    padding: 8px 0;
}
.chat-date-divider span {
    background: var(--bg-card);
    padding: 2px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
}
.chat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-card);
}
.chat-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s;
}
.chat-input:focus {
    border-color: var(--primary);
}
.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.chat-send-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}
.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}
.chat-emoji-wrap {
    position: relative;
}
.chat-emoji-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.chat-emoji-btn:hover {
    color: var(--primary);
}
.chat-emoji-picker {
    display: none;
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    width: 320px;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 100;
}
.chat-emoji-picker.show {
    display: block;
}
.chat-emoji-picker-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 4px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.chat-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}
.chat-emoji-item {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
}
.chat-emoji-item:hover {
    background: var(--primary-bg);
}
.chat-inbox {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--border-light);
}
.chat-inbox-header {
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-inbox-header i {
    color: var(--primary);
}
.chat-inbox-list {
    max-height: 520px;
    overflow-y: auto;
}
.chat-inbox-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 13px;
}
.chat-inbox-empty i {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}
.chat-inbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-light);
}
.chat-inbox-item:last-child {
    border-bottom: none;
}
.chat-inbox-item:hover {
    background: var(--primary-bg);
}
.chat-inbox-item.unread {
    background: rgba(var(--primary-rgb, 33,150,243), 0.05);
}
.chat-inbox-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.chat-inbox-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-inbox-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}
.chat-inbox-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.chat-inbox-online-dot.online {
    background: #4caf50;
    box-shadow: 0 0 4px rgba(76,175,80,0.5);
}
.chat-inbox-online-dot.offline {
    background: #9e9e9e;
}
.chat-inbox-info {
    flex: 1;
    min-width: 0;
}
.chat-inbox-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.chat-inbox-preview {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-inbox-meta {
    text-align: right;
    flex-shrink: 0;
}
.chat-inbox-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.chat-inbox-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}
.chat-back-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.chat-back-btn:hover {
    color: var(--primary);
}

/* ===== CHAT NOTIFICATION DROPDOWN ===== */
.chat-notif-wrapper {
    position: relative;
    display: inline-block;
}
.chat-notif-bell {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 16px;
    cursor: pointer;
    position: relative;
    padding: 6px 8px;
    transition: opacity .2s;
}
.chat-notif-bell:hover {
    opacity: .8;
}
.chat-notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
    pointer-events: none;
    animation: badgeGlow 1.5s ease-in-out infinite;
}
.chat-notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border: 1px solid var(--border-light);
    z-index: 9999;
    overflow: hidden;
}
.chat-notif-dropdown.show {
    display: block;
}
.chat-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.chat-notif-list {
    max-height: 360px;
    overflow-y: auto;
}
.chat-notif-empty {
    text-align: center;
    padding: 30px 16px;
    color: var(--text-secondary);
    font-size: 13px;
}
.chat-notif-empty i {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
    opacity: 0.4;
}
.chat-notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}
.chat-notif-item:last-child {
    border-bottom: none;
}
.chat-notif-item.chat-notif-unread {
    background: rgba(var(--primary-rgb, 33,150,243), 0.04);
}
.chat-notif-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.chat-notif-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-notif-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
}
.chat-notif-online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 4px rgba(76,175,80,0.5);
}
.chat-notif-content {
    flex: 1;
    min-width: 0;
}
.chat-notif-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.chat-notif-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 6px;
    line-height: 1.4;
}
.chat-notif-content strong {
    color: var(--text-primary);
}
.chat-notif-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.chat-notif-unread-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    background: var(--bg-card-hover);
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 6px;
    display: inline-block;
}
.chat-notif-messages {
    margin: 4px 0 6px;
    padding: 6px 8px;
    background: var(--bg-card-hover);
    border-radius: 6px;
    max-height: 130px;
    overflow-y: auto;
}
.chat-notif-messages::-webkit-scrollbar {
    width: 5px;
}
.chat-notif-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-notif-messages::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 3px;
}
[data-mode="dark"] .chat-notif-messages::-webkit-scrollbar-thumb {
    background: #555;
}
.chat-notif-msg {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12.5px;
    line-height: 1.4;
    padding: 3px 0;
    color: var(--text-secondary);
}
.chat-notif-msg.chat-notif-msg-me {
    opacity: 0.7;
}
.chat-notif-msg-avatar,
.chat-notif-msg-avatar-placeholder {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 1px;
}
.chat-notif-msg-avatar-placeholder {
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: var(--text-secondary);
}
.chat-notif-msg-body {
    flex: 1;
    min-width: 0;
}
.chat-notif-msg-sender {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 4px;
}
.chat-notif-msg-text {
    word-break: break-word;
}
.chat-notif-view-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
}
.chat-notif-view-btn:hover {
    opacity: 0.85;
}
@media (max-width: 600px) {
    .chat-container { height: 420px; }
    .chat-msg { max-width: 85%; }
    .chat-emoji-picker { width: 280px; }
}
@media (max-width: 768px) {
    .chat-notif-dropdown {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        width: 100%;
        min-width: 0;
        border-radius: 0;
        max-height: 60vh;
        z-index: 1100;
    }
    .chat-notif-list {
        max-height: calc(60vh - 50px);
    }
}

/* ===== MOBILE CATEGORY TOGGLE ===== */
.mobile-cat-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.mobile-cat-toggle i:last-child {
    font-size: 10px;
    transition: transform 0.25s;
}
.mobile-cat-toggle.open i:last-child {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .mobile-cat-toggle {
        display: flex;
    }

    .nav-inner {
        flex-wrap: wrap;
        position: relative;
    }

    .nav-inner.open {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        background: #fff;
        box-shadow: 0 10px 30px rgba(0,0,0,.15);
        border-top: 1px solid #e0e0e0;
        z-index: 1001;
        align-items: stretch;
    }

    [data-mode="dark"] .nav-inner.open {
        background: #1e1e1e;
        border-top-color: #333;
    }

    .nav-inner .nav-dropdown {
        display: none;
        width: 100%;
    }

    .nav-inner.open .nav-dropdown {
        display: block;
    }

    .nav-inner .nav-dropdown .nav-link {
        display: block;
        padding: 10px 12px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
    }

    .nav-inner .nav-dropdown .nav-dropdown-menu {
        position: static;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-shadow: none;
        border: none;
        margin: 0;
        padding: 0;
        display: none !important;
    }

    .nav-inner.open .nav-dropdown .nav-dropdown-menu {
        display: block !important;
    }

    .nav-inner.open .nav-dropdown .nav-dropdown-left > .nav-dropdown-tree {
        display: block;
        max-height: none;
        overflow: visible;
    }

    .nav-inner.open .nav-dropdown .nav-dropdown-left > .nav-dropdown-tree > li {
        width: auto;
        margin: 0;
    }

    .nav-inner.open .nav-dropdown .nav-dropdown-hero {
        display: none;
    }

    .nav-inner.open .nav-dropdown .nav-dropdown-item {
        padding: 8px 12px 8px 24px;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-inner.open .nav-dropdown .nav-dropdown-tree .nav-dropdown-tree {
        padding-left: 12px;
    }
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    max-width: 520px;
    margin: 0 auto;
    background: #ffffff;
    color: #222;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 14px;
    line-height: 1.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie-banner.cookie-banner-hidden {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}
.cookie-banner-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary, #1a237e);
    font-size: 15px;
}
.cookie-banner-head i { font-size: 18px; }
.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cookie-banner-actions button {
    flex: 1;
    min-width: 130px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.cookie-accept {
    background: var(--primary, #1a237e);
    color: #fff;
}
.cookie-accept:hover {
    background: var(--primary-dark, #0d1542);
    box-shadow: 0 4px 14px var(--primary-shadow-strong, rgba(26, 35, 126, 0.3));
}
.cookie-decline {
    background: transparent;
    color: #666;
    border-color: #d0d0d0;
}
.cookie-decline:hover {
    background: #f4f4f4;
}
