/* DigiMarket Pro - Premium Marketplace UI */
:root {
    --primary: #6d28d9;
    --primary-dark: #5b21b6;
    --primary-light: #8b5cf6;
    --secondary: #ec4899;
    --accent-blue: #3b82f6;
    --gradient: linear-gradient(135deg, #4a00e0 0%, #8e2de2 50%, #a855f7 100%);
    --gradient-hero: linear-gradient(135deg, #5b21b6 0%, #7c3aed 40%, #9333ea 70%, #c026d3 100%);
    --gradient-soft: linear-gradient(135deg, rgba(109,40,217,0.08) 0%, rgba(236,72,153,0.06) 100%);
    --bg: #f4f6fb;
    --bg-card: #ffffff;
    --bg-input: #f8fafc;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e8edf5;
    --shadow: 0 1px 3px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.04);
    --shadow-md: 0 4px 20px rgba(91,33,182,0.08), 0 2px 8px rgba(15,23,42,0.04);
    --shadow-lg: 0 12px 40px rgba(91,33,182,0.15), 0 4px 16px rgba(15,23,42,0.06);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --header-height: 130px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #0c0f1a;
    --bg-card: #151b2e;
    --bg-input: #1e2640;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #2a3350;
    --shadow: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.45);
    --gradient-soft: linear-gradient(135deg, rgba(109,40,217,0.15) 0%, rgba(236,72,153,0.1) 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.main-content { flex: 1; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border: none; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; cursor: pointer; transition: var(--transition);
    text-decoration: none; line-height: 1; font-family: inherit;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 4px 14px rgba(109,40,217,0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(109,40,217,0.4); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary-light); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary-light); color: var(--primary); }
.btn-white { background: #fff; color: var(--primary-dark); box-shadow: 0 4px 20px rgba(0,0,0,0.12); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.18); color: var(--primary-dark); }
.btn-hero-outline { background: rgba(255,255,255,0.12); color: #fff; border: 2px solid rgba(255,255,255,0.45); backdrop-filter: blur(8px); }
.btn-hero-outline:hover { background: rgba(255,255,255,0.22); color: #fff; border-color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* ─── Header ─── */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 1000;
    box-shadow: var(--shadow);
}
.header-container { padding-top: 16px; padding-bottom: 0; }
.header-top {
    display: flex; align-items: center; gap: 24px;
    padding-bottom: 14px; flex-wrap: wrap;
}

.logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; flex-shrink: 0;
}
.logo-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; box-shadow: 0 4px 12px rgba(109,40,217,0.35);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text strong { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.3px; }
.logo-text small { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.search-form {
    flex: 1; display: flex; align-items: stretch;
    max-width: 560px; min-width: 280px;
    background: var(--bg-input); border: 1.5px solid var(--border);
    border-radius: 14px; overflow: hidden; transition: var(--transition);
}
.search-form:focus-within { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(139,92,246,0.12); }
.search-category { border-right: 1px solid var(--border); flex-shrink: 0; }
.search-category select {
    height: 100%; border: none; background: transparent; padding: 0 14px;
    font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
    outline: none; max-width: 140px; font-family: inherit;
}
.search-form input {
    flex: 1; border: none; background: transparent; padding: 12px 16px;
    font-size: 14px; color: var(--text); outline: none; min-width: 0;
}
.search-btn {
    background: var(--gradient); border: none; padding: 0 20px;
    color: #fff; cursor: pointer; font-size: 15px; transition: var(--transition);
}
.search-btn:hover { filter: brightness(1.08); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-icon {
    position: relative; width: 42px; height: 42px; display: flex;
    align-items: center; justify-content: center; border-radius: 12px;
    background: var(--bg-input); color: var(--text-muted); font-size: 17px;
    transition: var(--transition); border: 1px solid transparent;
}
.header-icon:hover { background: rgba(109,40,217,0.08); color: var(--primary); border-color: rgba(109,40,217,0.15); }
.badge {
    position: absolute; top: -4px; right: -4px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff; font-size: 10px; min-width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; border: 2px solid var(--bg-card);
}

.theme-toggle {
    width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--bg-input); color: var(--text-muted); cursor: pointer;
    font-size: 16px; transition: var(--transition);
}
.theme-toggle:hover { background: rgba(109,40,217,0.08); color: var(--primary); }

.user-dropdown, .notif-dropdown { position: relative; }
.user-chip {
    display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px;
    background: var(--bg-input); border: 1px solid var(--border); border-radius: 50px;
    cursor: pointer; color: var(--text); transition: var(--transition);
}
.user-chip:hover { border-color: var(--primary-light); box-shadow: var(--shadow); }
.user-chip img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-light); }
.user-chip-info { display: flex; flex-direction: column; text-align: left; line-height: 1.25; }
.user-chip-info strong { font-size: 13px; font-weight: 700; }
.user-chip-info em { font-size: 11px; color: var(--text-muted); font-style: normal; font-weight: 500; }
.user-chip > i { font-size: 10px; color: var(--text-muted); margin-left: 2px; }

.dropdown-menu {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    min-width: 230px; opacity: 0; visibility: hidden;
    transform: translateY(-8px); transition: var(--transition); z-index: 100;
}
.dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
    display: flex; align-items: center; gap: 10px; padding: 11px 16px;
    color: var(--text); font-size: 14px; font-weight: 500;
}
.dropdown-menu a:hover { background: var(--gradient-soft); color: var(--primary); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.dropdown-header { padding: 12px 16px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--border); }
.dropdown-footer { display: block; text-align: center; padding: 10px; border-top: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.dropdown-loading { padding: 20px; text-align: center; color: var(--text-muted); }

.main-nav {
    display: flex; gap: 4px; padding: 0 0 12px; overflow-x: auto;
    scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
    padding: 8px 18px; color: var(--text-muted); font-size: 14px;
    font-weight: 600; white-space: nowrap; transition: var(--transition);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.main-nav a:hover { color: var(--primary); }
.main-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

.mobile-menu-btn {
    display: none; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 10px; width: 42px; height: 42px;
    font-size: 18px; color: var(--text); cursor: pointer;
}

/* ─── Hero Carousel ─── */
.hero-carousel-section { padding: 24px 0 8px; }
.hero-carousel {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    background: var(--gradient-hero); min-height: 320px;
    box-shadow: var(--shadow-lg);
}
.hero-slide-v2 {
    display: none; grid-template-columns: 1fr 1fr; align-items: center;
    gap: 32px; padding: 48px 56px; min-height: 320px;
    position: relative;
}
.hero-slide-v2.active { display: grid; animation: heroFade 0.6s ease; }
@keyframes heroFade { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.hero-slide-v2::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 80% 50%, rgba(255,255,255,0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(236,72,153,0.2) 0%, transparent 50%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; color: #fff; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.18); backdrop-filter: blur(8px);
    padding: 6px 14px; border-radius: 50px; font-size: 12px;
    font-weight: 700; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.25);
}
.hero-badge i { color: #fbbf24; }
.hero-content h1 {
    font-size: clamp(26px, 4vw, 40px); font-weight: 800;
    line-height: 1.15; margin-bottom: 14px; letter-spacing: -0.5px;
}
.hero-content p { font-size: 15px; opacity: 0.88; margin-bottom: 28px; max-width: 420px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { position: relative; z-index: 1; display: flex; justify-content: center; align-items: center; }
.hero-visual img { max-height: 260px; width: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2)); }

.hero-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); z-index: 2;
}
.hero-nav:hover { background: rgba(255,255,255,0.35); }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }
.hero-dots {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 2;
}
.hero-dot {
    width: 8px; height: 8px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.4); cursor: pointer; transition: var(--transition); padding: 0;
}
.hero-dot.active { background: #fff; width: 24px; border-radius: 4px; }

/* ─── Category Pills ─── */
.category-pills-section { padding: 20px 0; }
.category-pills {
    display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px;
    scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }
.category-pill {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    min-width: 90px; padding: 14px 12px; border-radius: var(--radius);
    text-decoration: none; transition: var(--transition); flex-shrink: 0;
    border: 1px solid transparent;
}
.category-pill span:last-child { font-size: 11px; font-weight: 600; color: var(--text); text-align: center; line-height: 1.3; }
.pill-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; transition: var(--transition);
}
.category-pill:hover { transform: translateY(-4px); }
.category-pill:hover .pill-icon { transform: scale(1.08); }

.cat-purple .pill-icon { background: #ede9fe; color: #7c3aed; }
.cat-blue .pill-icon { background: #dbeafe; color: #2563eb; }
.cat-pink .pill-icon { background: #fce7f3; color: #db2777; }
.cat-orange .pill-icon { background: #ffedd5; color: #ea580c; }
.cat-green .pill-icon { background: #d1fae5; color: #059669; }
.cat-indigo .pill-icon { background: #e0e7ff; color: #4f46e5; }
.cat-rose .pill-icon { background: #ffe4e6; color: #e11d48; }
.cat-cyan .pill-icon { background: #cffafe; color: #0891b2; }
.cat-amber .pill-icon { background: #fef3c7; color: #d97706; }
.cat-violet .pill-icon { background: #f3e8ff; color: #9333ea; }
.cat-more .pill-icon { background: var(--bg-input); color: var(--text-muted); border: 1.5px dashed var(--border); }

[data-theme="dark"] .cat-purple .pill-icon { background: rgba(124,58,237,0.2); }
[data-theme="dark"] .cat-blue .pill-icon { background: rgba(37,99,235,0.2); }
[data-theme="dark"] .cat-pink .pill-icon { background: rgba(219,39,119,0.2); }
[data-theme="dark"] .cat-orange .pill-icon { background: rgba(234,88,12,0.2); }
[data-theme="dark"] .cat-green .pill-icon { background: rgba(5,150,105,0.2); }
[data-theme="dark"] .cat-indigo .pill-icon { background: rgba(79,70,229,0.2); }

/* ─── Home Layout ─── */
.home-content-section { padding: 8px 0 48px; }
.home-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.home-main { min-width: 0; }
.section-block { margin-bottom: 36px; }
.section-title-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.section-title-row h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.view-all-link {
    font-size: 13px; font-weight: 600; color: var(--primary);
    display: flex; align-items: center; gap: 6px;
}
.view-all-link:hover { gap: 10px; }

/* ─── Product Cards V2 ─── */
.product-grid-v2 {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.product-card-v2 {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border); overflow: hidden;
    transition: var(--transition); box-shadow: var(--shadow);
}
.product-card-v2:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(109,40,217,0.2); }
.product-card-img { position: relative; height: 160px; overflow: hidden; background: var(--gradient-soft); }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card-v2:hover .product-card-img img { transform: scale(1.06); }
.product-card-img .wishlist-btn {
    position: absolute; top: 10px; right: 10px; width: 34px; height: 34px;
    border-radius: 50%; background: rgba(255,255,255,0.95); border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 14px; transition: var(--transition);
    box-shadow: var(--shadow);
}
.product-card-img .wishlist-btn:hover, .product-card-img .wishlist-btn.active { color: var(--danger); }
.card-cat-label {
    position: absolute; bottom: 10px; left: 10px;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
    color: #fff; font-size: 10px; font-weight: 700;
    padding: 4px 10px; border-radius: 50px;
}
.discount-badge {
    position: absolute; top: 10px; left: 10px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 8px; border-radius: 6px;
}
.product-card-body { padding: 14px 16px 16px; }
.product-card-body h3 { font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.product-card-body h3 a { color: var(--text); }
.product-card-body h3 a:hover { color: var(--primary); }
.product-seller { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.product-seller a { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.product-seller .verified { color: var(--info); font-size: 12px; }
.product-meta { display: flex; justify-content: space-between; align-items: center; }
.product-rating { display: flex; align-items: center; gap: 2px; font-size: 11px; color: var(--warning); }
.product-rating .rating-count { color: var(--text-muted); margin-left: 4px; font-size: 11px; }
.product-rating .far { color: #e2e8f0; }
.product-price { font-size: 16px; font-weight: 800; color: var(--accent-blue); }

/* ─── Sidebar Widgets ─── */
.home-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-height) + 16px); }
.sidebar-widget {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow);
}
.widget-header {
    padding: 16px 18px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    background: var(--gradient-soft);
}
.widget-header h3 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.widget-header h3 i { color: var(--primary); }
.widget-body { padding: 8px 0; }

.top-seller-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 18px;
    text-decoration: none; transition: var(--transition);
}
.top-seller-item:hover { background: var(--gradient-soft); }
.top-seller-item img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.seller-info { flex: 1; min-width: 0; }
.seller-info strong { display: block; font-size: 13px; font-weight: 700; color: var(--text); }
.seller-info span { font-size: 11px; color: var(--text-muted); }
.seller-rating { font-size: 12px; font-weight: 700; color: var(--warning); white-space: nowrap; }
.seller-rating i { font-size: 11px; }

.countdown-timer {
    font-size: 13px; font-weight: 800; color: var(--danger);
    background: rgba(239,68,68,0.08); padding: 4px 10px;
    border-radius: 8px; font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
.flash-sale-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 18px;
    text-decoration: none; transition: var(--transition); position: relative;
}
.flash-sale-item:hover { background: var(--gradient-soft); }
.flash-sale-item img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.flash-info { flex: 1; min-width: 0; }
.flash-info strong { display: block; font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 4px; }
.flash-prices { display: flex; align-items: center; gap: 8px; }
.sale-price { font-size: 14px; font-weight: 800; color: var(--accent-blue); }
.old-price { font-size: 11px; color: var(--text-muted); text-decoration: line-through; }
.flash-discount {
    font-size: 11px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    padding: 3px 7px; border-radius: 6px; flex-shrink: 0;
}

.cta-widget-inner {
    padding: 24px 20px; text-align: center;
    background: var(--gradient-hero); color: #fff;
}
.cta-widget-inner i { font-size: 32px; margin-bottom: 12px; opacity: 0.9; }
.cta-widget-inner h4 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.cta-widget-inner p { font-size: 12px; opacity: 0.85; margin-bottom: 16px; line-height: 1.6; }
.cta-widget-inner .btn-primary { background: #fff; color: var(--primary-dark); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

/* ─── Legacy Cards (other pages) ─── */
.card {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border); box-shadow: var(--shadow);
    overflow: hidden; transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: 20px; }

.section { padding: 48px 0; }
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 28px; flex-wrap: wrap; gap: 15px;
}
.section-header h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }
.section-header h2 span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
}

.category-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px;
}
.category-card {
    text-align: center; padding: 24px 16px;
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border); transition: var(--transition); box-shadow: var(--shadow);
}
.category-card:hover { border-color: var(--primary-light); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.category-card i { font-size: 36px; color: var(--primary); margin-bottom: 10px; }
.category-card h3 { font-size: 14px; font-weight: 700; color: var(--text); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 22px;
    border: 1px solid var(--border); text-align: center; box-shadow: var(--shadow);
}
.stat-card .stat-icon {
    width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient); color: #fff; font-size: 22px;
}
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ─── Forms ─── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 13px; }
.form-control {
    width: 100%; padding: 11px 15px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg-input);
    color: var(--text); font-size: 14px; transition: var(--transition);
    outline: none; font-family: inherit;
}
.form-control:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(139,92,246,0.1); background: var(--bg-card); }
textarea.form-control { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.auth-page {
    min-height: calc(100vh - 200px);
    display: flex; align-items: center; justify-content: center; padding: 48px 20px;
}
.auth-card {
    width: 100%; max-width: 440px; background: var(--bg-card);
    border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.auth-card h2 { text-align: center; margin-bottom: 6px; font-size: 26px; font-weight: 800; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 28px; font-size: 14px; }
.auth-card .auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }

/* ─── Alerts ─── */
.alert {
    padding: 13px 18px; border-radius: var(--radius-sm); margin: 16px auto;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 14px; max-width: 1320px; font-weight: 500;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
[data-theme="dark"] .alert-success { background: #064e3b; color: #a7f3d0; }
[data-theme="dark"] .alert-error { background: #7f1d1d; color: #fecaca; }
.alert-close { background: none; border: none; font-size: 20px; cursor: pointer; opacity: 0.5; }

/* ─── Tables ─── */
.table-responsive { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
table th { background: var(--bg-input); font-weight: 700; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: var(--gradient-soft); }

.status-badge {
    display: inline-block; padding: 4px 11px; border-radius: 50px;
    font-size: 11px; font-weight: 700; text-transform: capitalize;
}
.status-pending, .status-paid { background: #fef3c7; color: #92400e; }
.status-active, .status-completed, .status-delivered { background: #d1fae5; color: #065f46; }
.status-cancelled, .status-rejected, .status-refunded { background: #fee2e2; color: #991b1b; }
.status-disputed, .status-open { background: #dbeafe; color: #1e40af; }
.status-draft, .status-inactive { background: #f1f5f9; color: #64748b; }

.pagination ul { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.pagination li a {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--radius-sm);
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 13px;
}
.pagination li.active a { background: var(--gradient); color: #fff; border-color: transparent; }

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 0; }
.product-gallery img { border-radius: var(--radius-lg); width: 100%; box-shadow: var(--shadow-md); }
.product-info h1 { font-size: 30px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.3px; }
.product-info .meta { display: flex; gap: 18px; color: var(--text-muted); font-size: 13px; margin-bottom: 18px; flex-wrap: wrap; }
.product-info .price-lg { font-size: 34px; font-weight: 800; color: var(--accent-blue); margin-bottom: 18px; }
.product-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.review-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.review-item .review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-item .review-header img { width: 40px; height: 40px; border-radius: 50%; }
.review-stars { color: var(--warning); }

/* ─── Footer ─── */
.site-footer {
    background: var(--bg-card); border-top: 1px solid var(--border);
    padding: 56px 0 24px; margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 36px; margin-bottom: 36px; }
.footer-col h3, .footer-col h4 { margin-bottom: 16px; color: var(--text); font-weight: 800; }
.footer-col h3 i { color: var(--primary); }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.footer-col ul li a:hover { color: var(--primary); }
.contact-info li { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 14px; }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-links a {
    width: 40px; height: 40px; border-radius: 12px; background: var(--bg-input);
    display: flex; align-items: center; justify-content: center; color: var(--text-muted);
    border: 1px solid var(--border); transition: var(--transition);
}
.social-links a:hover { background: var(--gradient); color: #fff; border-color: transparent; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }

.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 16px; }
.d-flex { display: flex; } .align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.page-hero {
    background: var(--gradient-hero); color: #fff; padding: 48px 0; text-align: center;
    position: relative; overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.1) 0%, transparent 60%);
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }

.content-page { padding: 40px 0; max-width: 800px; margin: 0 auto; }
.content-page h2 { margin: 28px 0 14px; color: var(--primary); font-weight: 800; }
.content-page p { margin-bottom: 14px; color: var(--text-muted); line-height: 1.8; }

.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; background: var(--bg-card); }
.faq-question {
    padding: 16px 20px; cursor: pointer; font-weight: 700; font-size: 14px;
    display: flex; justify-content: space-between; align-items: center;
    transition: var(--transition);
}
.faq-question:hover { background: var(--gradient-soft); }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s; color: var(--text-muted); font-size: 14px; }
.faq-item.active .faq-answer { padding: 0 20px 16px; max-height: 500px; }
.faq-item.active .faq-question i { transform: rotate(180deg); }

.empty-state { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty-state i { font-size: 56px; margin-bottom: 14px; opacity: 0.25; color: var(--primary); }
.empty-state h3 { margin-bottom: 8px; color: var(--text); font-weight: 800; }

/* ─── Sell Button (P2P) ─── */
.btn-sell {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(16,185,129,0.35);
    border: none;
}
.btn-sell:hover { transform: translateY(-1px); filter: brightness(1.05); color: #fff !important; }

/* ─── Marketplace Stats Bar ─── */
.marketplace-stats-section { padding: 0 0 20px; }
.marketplace-stats {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.mstat { text-align: center; }
.mstat-icon {
    width: 40px; height: 40px; border-radius: 10px; margin: 0 auto 8px;
    background: var(--gradient-soft); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.mstat-val { font-size: 20px; font-weight: 800; color: var(--text); }
.mstat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }

.section-title-row h2 i { color: var(--primary); margin-right: 8px; font-size: 18px; }

/* ─── Sell Page ─── */
.sell-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.escrow-steps { list-style: none; counter-reset: step; }
.escrow-steps li {
    display: flex; align-items: flex-start; gap: 12px; padding: 10px 0;
    font-size: 13px; color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.escrow-steps li:last-child { border-bottom: none; }
.escrow-steps li span {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    background: var(--gradient); color: #fff; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.escrow-steps-card h3 { font-size: 16px; margin-bottom: 12px; color: var(--primary); }

/* ─── Product Detail V2 ─── */
.product-page { padding: 32px 0 48px; }
.product-detail-v2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.gallery-main {
    border-radius: var(--radius); overflow: hidden; background: var(--gradient-soft);
    aspect-ratio: 4/3; border: 1px solid var(--border);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumb {
    width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
    border: 2px solid transparent; cursor: pointer; padding: 0; background: none;
}
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-preview h4 { font-size: 14px; margin-bottom: 10px; color: var(--primary); }
.video-wrap { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/9; background: #000; }
.video-wrap iframe { width: 100%; height: 100%; border: none; }

.product-cat-badge {
    display: inline-block; background: var(--gradient-soft); color: var(--primary);
    padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 700; margin-bottom: 10px;
}
.product-info-v2 h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.3px; }
.product-stats-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.price-block { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.price-block .price-lg { font-size: 32px; font-weight: 800; color: var(--accent-blue); }
.price-old { font-size: 18px; color: var(--text-muted); text-decoration: line-through; }
.price-discount { background: linear-gradient(135deg,#ef4444,#f97316); color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; }
.product-short-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; line-height: 1.7; }

.seller-card-mini {
    display: flex; align-items: center; gap: 12px; padding: 14px;
    background: var(--bg-input); border-radius: var(--radius-sm);
    border: 1px solid var(--border); margin-bottom: 16px; text-decoration: none; color: inherit;
    transition: var(--transition);
}
.seller-card-mini:hover { border-color: var(--primary-light); box-shadow: var(--shadow); }
.seller-card-mini img { width: 44px; height: 44px; border-radius: 50%; }
.seller-card-mini div { flex: 1; }
.seller-card-mini strong { display: block; font-size: 14px; color: var(--text); }
.seller-card-mini span { font-size: 12px; color: var(--text-muted); }
.seller-card-mini span .fa-check-circle { color: var(--info); }

.escrow-info-box {
    background: var(--gradient-soft); border: 1px solid rgba(109,40,217,0.15);
    border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 20px;
}
.escrow-info-box h4 { font-size: 14px; color: var(--primary); margin-bottom: 10px; }
.mini-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.mini-steps span { background: var(--bg-card); padding: 4px 8px; border-radius: 6px; }
.mini-steps i { font-size: 9px; color: var(--primary-light); }

.product-actions-v2 { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-buy { flex: 1; min-width: 180px; }
.buy-form { flex: 1; min-width: 180px; }
.buy-form .btn { width: 100%; }

.product-tabs { display: flex; gap: 4px; margin-bottom: 0; }
.product-tabs .tab-btn {
    padding: 12px 20px; border: none; background: var(--bg-input);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0; cursor: pointer;
    font-weight: 700; font-size: 14px; color: var(--text-muted); transition: var(--transition);
}
.product-tabs .tab-btn.active { background: var(--bg-card); color: var(--primary); border: 1px solid var(--border); border-bottom-color: var(--bg-card); margin-bottom: -1px; }
.product-tabs + .tab-content { border-radius: 0 var(--radius) var(--radius) var(--radius); }
.product-description { line-height: 1.8; color: var(--text-muted); font-size: 15px; }

.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
    background: var(--bg-card); border-radius: var(--radius); padding: 28px;
    width: 100%; max-width: 440px; box-shadow: var(--shadow-lg);
}
.modal-box h3 { margin-bottom: 20px; font-size: 18px; }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
    .marketplace-stats { grid-template-columns: repeat(3, 1fr); }
    .sell-layout { grid-template-columns: 1fr; }
    .home-layout { grid-template-columns: 1fr; }
    .home-sidebar { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
    .product-grid-v2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
    .hero-slide-v2 { grid-template-columns: 1fr; padding: 36px 32px; text-align: center; }
    .hero-content p { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { display: none; }
    .product-detail, .product-detail-v2 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .marketplace-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
    .main-nav { display: none; flex-direction: column; padding-bottom: 16px; }
    .main-nav.show { display: flex; }
    .main-nav a { border-bottom: none; border-radius: 8px; }
    .main-nav a.active { background: var(--gradient-soft); }
    .search-form { order: 3; max-width: 100%; width: 100%; }
    .header-top { gap: 12px; }
    .user-chip-info { display: none; }
    .product-grid-v2 { grid-template-columns: 1fr; }
    .hero-carousel { border-radius: var(--radius); min-height: 280px; }
    .hero-slide-v2 { padding: 28px 24px; min-height: 280px; }
    .section { padding: 36px 0; }
}
