html.dark {
    color-scheme: dark;
    background: #0f172a;
}

html.low-data *,
body.low-data-active * {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

html.low-data .shadow-sm,
html.low-data .shadow-md,
html.low-data .shadow-lg,
html.low-data .shadow-xl,
html.low-data .shadow-2xl,
body.low-data-active .shadow-sm,
body.low-data-active .shadow-md,
body.low-data-active .shadow-lg,
body.low-data-active .shadow-xl,
body.low-data-active .shadow-2xl {
    box-shadow: none !important;
}

html.low-data [data-low-data-hide],
body.low-data-active [data-low-data-hide] {
    display: none !important;
}

html.low-data video,
body.low-data-active video {
    display: none !important;
}

html.low-data .listing-card,
body.low-data-active .listing-card {
    border-radius: 16px !important;
}

.item-card img,
.listing-card img,
.card-image img {
    width: 100%;
    height: 260px;
    object-fit: contain !important;
    object-position: center;
    background: #0f172a;
}

.card-image {
    height: 260px;
    background: #0f172a;
}

@media (max-width: 768px) {
    .item-card img,
    .listing-card img,
    .card-image img {
        height: 280px;
        object-fit: contain !important;
    }

    .card-image {
        height: 280px;
    }
}

html.dark body,
html.dark main,
html.dark .bg-slate-50,
html.dark .md\:bg-slate-50,
html.dark .sm\:bg-slate-50,
html.dark .lg\:bg-slate-50,
html.dark .bg-slate-50\/50,
html.dark .bg-slate-50\/60,
html.dark .md\:bg-slate-50\/50,
html.dark .md\:bg-slate-50\/60,
html.dark .bg-gray-100,
html.dark .md\:bg-gray-100,
html.dark .bg-gray-50,
html.dark .md\:bg-gray-50,
html.dark .bg-gray-50\/50,
html.dark .md\:bg-gray-50\/50 {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

html.dark .bg-white,
html.dark .md\:bg-white,
html.dark .sm\:bg-white,
html.dark .lg\:bg-white,
html.dark .xl\:bg-white,
html.dark .bg-white\/95,
html.dark .bg-white\/90,
html.dark .bg-white\/80,
html.dark .bg-white\/70,
html.dark .bg-white\/50 {
    background-color: #111827 !important;
    color: #f8fafc !important;
}

html.dark .bg-slate-100,
html.dark .md\:bg-slate-100,
html.dark .bg-gray-100 {
    background-color: #1f2937 !important;
}

html.dark .bg-slate-800,
html.dark .bg-gray-900,
html.dark .listing-card,
html.dark .item-card {
    background-color: #020617 !important;
}

html.dark .listing-card {
    background: #111827 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.dark .listing-card .card-image,
html.dark .listing-card .card-image img {
    background-color: #0f172a !important;
}

html.dark .text-slate-900,
html.dark .md\:text-slate-900,
html.dark .sm\:text-slate-900,
html.dark .text-gray-900,
html.dark .md\:text-gray-900,
html.dark .text-slate-800,
html.dark .md\:text-slate-800,
html.dark .text-gray-800,
html.dark .md\:text-gray-800,
html.dark .text-gray-700,
html.dark .md\:text-gray-700,
html.dark .text-slate-700,
html.dark .md\:text-slate-700,
html.dark .sm\:text-slate-700 {
    color: #f8fafc !important;
}

html.dark .text-slate-600,
html.dark .md\:text-slate-600,
html.dark .sm\:text-slate-600,
html.dark .text-gray-600,
html.dark .md\:text-gray-600,
html.dark .text-slate-500,
html.dark .md\:text-slate-500,
html.dark .text-gray-500,
html.dark .md\:text-gray-500,
html.dark .sm\:text-gray-500 {
    color: #cbd5e1 !important;
}

html.dark .text-slate-400,
html.dark .md\:text-slate-400,
html.dark .sm\:text-slate-400,
html.dark .text-gray-400,
html.dark .md\:text-gray-400,
html.dark .text-slate-300,
html.dark .md\:text-slate-300,
html.dark .text-gray-300,
html.dark .md\:text-gray-300,
html.dark .sm\:text-gray-300 {
    color: #94a3b8 !important;
}

html.dark .border-slate-50,
html.dark .md\:border-slate-50,
html.dark .border-slate-100,
html.dark .md\:border-slate-100,
html.dark .border-slate-200,
html.dark .md\:border-slate-200,
html.dark .border-slate-300,
html.dark .md\:border-slate-300,
html.dark .border-gray-50,
html.dark .md\:border-gray-50,
html.dark .border-gray-100,
html.dark .md\:border-gray-100,
html.dark .border-gray-200,
html.dark .md\:border-gray-200,
html.dark .border-gray-300,
html.dark .md\:border-gray-300,
html.dark .border-white\/10,
html.dark .md\:border-white\/10 {
    border-color: #334155 !important;
}

html.dark .divide-gray-50 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: #334155 !important;
}

html.dark input,
html.dark select,
html.dark textarea,
html.dark option {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
}

html.dark table thead tr,
html.dark .bg-emerald-50\/30,
html.dark .md\:bg-emerald-50\/30,
html.dark .hover\:bg-gray-50\/50:hover,
html.dark .hover\:bg-slate-50:hover,
html.dark .hover\:bg-gray-50:hover {
    background-color: #1e293b !important;
}

html.dark .hover\:bg-emerald-50:hover,
html.dark .hover\:bg-emerald-50\/30:hover,
html.dark .hover\:bg-white\/10:hover,
html.dark .md\:hover\:bg-slate-50:hover {
    background-color: #162033 !important;
}

html.dark .shadow-sm,
html.dark .shadow-md,
html.dark .shadow-lg,
html.dark .shadow-xl,
html.dark .shadow-2xl {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important;
}

html.dark .bg-emerald-50,
html.dark .md\:bg-emerald-50,
html.dark .bg-emerald-100 {
    background-color: rgba(5, 150, 105, 0.18) !important;
}

html.dark .text-emerald-700,
html.dark .md\:text-emerald-700,
html.dark .sm\:text-emerald-700,
html.dark .text-emerald-800,
html.dark .md\:text-emerald-800,
html.dark .text-emerald-900 {
    color: #6ee7b7 !important;
}

html.dark .bg-red-50,
html.dark .bg-red-100 {
    background-color: rgba(220, 38, 38, 0.18) !important;
}

html.dark .bg-orange-50,
html.dark .bg-orange-100,
html.dark .bg-amber-50,
html.dark .bg-amber-100,
html.dark .bg-yellow-100 {
    background-color: rgba(245, 158, 11, 0.18) !important;
}

html.dark .bg-blue-50,
html.dark .bg-cyan-50 {
    background-color: rgba(14, 165, 233, 0.16) !important;
}

html.dark a:hover {
    color: #6ee7b7;
}

html.dark img {
    filter: brightness(0.92);
}

html.dark [data-theme-toggle] {
    border-color: rgba(255, 255, 255, 0.16) !important;
}

html.dark .max-w-7xl,
html.dark .max-w-6xl,
html.dark .max-w-5xl,
html.dark .max-w-4xl,
html.dark .max-w-3xl,
html.dark .max-w-2xl {
    color: #f8fafc;
}

html.dark aside.bg-white,
html.dark section.bg-white,
html.dark article.bg-white,
html.dark div.bg-white,
html.dark form.bg-white,
html.dark .unlock-modal-panel,
html.dark #notification-dropdown,
html.dark [data-search-suggestions] {
    background-color: #111827 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.dark .unlock-modal-panel .sticky,
html.dark .sticky.bg-white,
html.dark .hidden.md\:block.bg-white {
    background-color: #111827 !important;
    border-color: #334155 !important;
}

html.dark .rounded-xl.bg-slate-50,
html.dark .rounded-2xl.bg-slate-50,
html.dark .rounded.bg-slate-50,
html.dark .description-box,
html.dark .item-description,
html.dark .listing-description {
    background-color: #162033 !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

html.dark label[data-plan-card],
html.dark .category-sidebar,
html.dark .filter-panel,
html.dark .search-panel {
    background-color: #111827 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.dark span[style*="background:#ecfdf5"],
html.dark span[style*="background: #ecfdf5"] {
    background: #064e3b !important;
    color: #a7f3d0 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
}

/* Legacy dark-class fallback. Theme.js now writes html[data-theme]. */
html.dark,
html.dark body,
body.dark {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

html.dark [class*="bg-slate-50"],
html.dark [class*="bg-gray-50"],
html.dark [class*="bg-white"],
body.dark [class*="bg-slate-50"],
body.dark [class*="bg-gray-50"],
body.dark [class*="bg-white"] {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

html.dark section[class*="bg-white"],
html.dark aside[class*="bg-white"],
html.dark form[class*="bg-white"],
html.dark div[class*="bg-white"],
body.dark section[class*="bg-white"],
body.dark aside[class*="bg-white"],
body.dark form[class*="bg-white"],
body.dark div[class*="bg-white"] {
    background-color: #111827 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.dark .flex-1[class*="bg-slate-50"],
html.dark .flex-1[class*="md:bg-slate-50"],
html.dark div[class*="md:bg-slate-50"],
body.dark .flex-1[class*="bg-slate-50"],
body.dark .flex-1[class*="md:bg-slate-50"],
body.dark div[class*="md:bg-slate-50"] {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

html.dark .listing-card,
body.dark .listing-card {
    background: #111827 !important;
    background-color: #111827 !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38) !important;
}

html.dark .listing-card > .p-5,
body.dark .listing-card > .p-5 {
    background-color: #111827 !important;
    color: #f8fafc !important;
}

html.dark .listing-card .card-image,
html.dark .listing-card .card-image img,
body.dark .listing-card .card-image,
body.dark .listing-card .card-image img {
    background-color: #0f172a !important;
}

html.dark .listing-card h3,
html.dark .listing-card h3 a,
html.dark .listing-card p,
html.dark .listing-card span,
body.dark .listing-card h3,
body.dark .listing-card h3 a,
body.dark .listing-card p,
body.dark .listing-card span {
    color: inherit;
}

html.dark .listing-card h3,
html.dark .listing-card h3 a,
body.dark .listing-card h3,
body.dark .listing-card h3 a,
html.dark h2,
html.dark h3,
body.dark h2,
body.dark h3 {
    color: #f8fafc !important;
}

html.dark .listing-card .text-slate-600,
html.dark .listing-card .text-slate-700,
html.dark .listing-card .md\:text-slate-600,
html.dark .listing-card .md\:text-slate-700,
body.dark .listing-card .text-slate-600,
body.dark .listing-card .text-slate-700,
body.dark .listing-card .md\:text-slate-600,
body.dark .listing-card .md\:text-slate-700 {
    color: #cbd5e1 !important;
}

html.dark .listing-card .border-slate-100,
html.dark .listing-card .md\:border-slate-100,
body.dark .listing-card .border-slate-100,
body.dark .listing-card .md\:border-slate-100 {
    border-color: #334155 !important;
}

html.dark .listing-card .bg-emerald-50,
html.dark .listing-card .md\:bg-emerald-50,
body.dark .listing-card .bg-emerald-50,
body.dark .listing-card .md\:bg-emerald-50 {
    background-color: rgba(16, 185, 129, 0.16) !important;
    color: #6ee7b7 !important;
}

html.dark .listing-card a[href*="item"],
body.dark .listing-card a[href*="item"] {
    color: #f8fafc !important;
}

html.dark .listing-card a[href*="item"].bg-emerald-500,
html.dark .listing-card a[href*="item"].md\:bg-slate-900,
body.dark .listing-card a[href*="item"].bg-emerald-500,
body.dark .listing-card a[href*="item"].md\:bg-slate-900 {
    background-color: #10b981 !important;
    color: #ffffff !important;
}

html.dark [class*="border-slate-"],
html.dark [class*="border-gray-"],
body.dark [class*="border-slate-"],
body.dark [class*="border-gray-"] {
    border-color: #334155 !important;
}

html.dark [class*="text-slate-900"],
html.dark [class*="text-slate-800"],
html.dark [class*="text-gray-900"],
html.dark [class*="text-gray-800"],
body.dark [class*="text-slate-900"],
body.dark [class*="text-slate-800"],
body.dark [class*="text-gray-900"],
body.dark [class*="text-gray-800"] {
    color: #f8fafc !important;
}

html.dark [class*="text-slate-700"],
html.dark [class*="text-slate-600"],
html.dark [class*="text-gray-700"],
html.dark [class*="text-gray-600"],
body.dark [class*="text-slate-700"],
body.dark [class*="text-slate-600"],
body.dark [class*="text-gray-700"],
body.dark [class*="text-gray-600"] {
    color: #cbd5e1 !important;
}

html.dark [class*="text-slate-500"],
html.dark [class*="text-slate-400"],
html.dark [class*="text-gray-500"],
html.dark [class*="text-gray-400"],
body.dark [class*="text-slate-500"],
body.dark [class*="text-slate-400"],
body.dark [class*="text-gray-500"],
body.dark [class*="text-gray-400"] {
    color: #94a3b8 !important;
}

html.dark input,
html.dark select,
html.dark textarea,
body.dark input,
body.dark select,
body.dark textarea,
html.dark [data-search-suggestions],
body.dark [data-search-suggestions] {
    background-color: #111827 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

/* Single source of truth: theme.js writes only html[data-theme]. */
html[data-theme="dark"],
html[data-theme="dark"] body {
    color-scheme: dark;
    background: #020617 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] main,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .marketplace-content,
html[data-theme="dark"] .content,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] .products-area,
html[data-theme="dark"] .listings-area,
html[data-theme="dark"] .recent-listings,
html[data-theme="dark"] .trending-section,
html[data-theme="dark"] .listings-section,
html[data-theme="dark"] .products-grid,
html[data-theme="dark"] .seller-dashboard,
html[data-theme="dark"] .dashboard-content,
html[data-theme="dark"] .flex-1[class*="bg-slate-50"],
html[data-theme="dark"] .flex-1[class*="md:bg-slate-50"],
html[data-theme="dark"] div[class*="md:bg-slate-50"],
html[data-theme="dark"] [class*="bg-slate-50"],
html[data-theme="dark"] [class*="bg-gray-50"] {
    background: #020617 !important;
    background-color: #020617 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] section[class*="bg-white"],
html[data-theme="dark"] aside[class*="bg-white"],
html[data-theme="dark"] form[class*="bg-white"],
html[data-theme="dark"] div[class*="bg-white"],
html[data-theme="dark"] article[class*="bg-white"],
html[data-theme="dark"] [class*="md:bg-white"],
html[data-theme="dark"] [class*="bg-white"] {
    background: #111827 !important;
    background-color: #111827 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .listing-card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .seller-card,
html[data-theme="dark"] .stats-card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .unlock-modal-panel {
    background: #0f172a !important;
    background-color: #0f172a !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .listing-card > .p-5,
html[data-theme="dark"] .listing-card > .md\:p-4,
html[data-theme="dark"] .product-card > div,
html[data-theme="dark"] .card > div {
    background: #0f172a !important;
    background-color: #0f172a !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .listing-card .card-image,
html[data-theme="dark"] .listing-card .card-image img,
html[data-theme="dark"] .product-card img,
html[data-theme="dark"] .card-image {
    background-color: #020617 !important;
}

html[data-theme="dark"] .listing-card *,
html[data-theme="dark"] .product-card *,
html[data-theme="dark"] .card * {
    color: inherit;
}

html[data-theme="dark"] .listing-card a[href*="item"].bg-emerald-500,
html[data-theme="dark"] .listing-card a[href*="item"].md\:bg-slate-900 {
    background-color: #10b981 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .listing-card h3,
html[data-theme="dark"] .listing-card h3 a,
html[data-theme="dark"] [class*="text-slate-900"],
html[data-theme="dark"] [class*="text-slate-800"],
html[data-theme="dark"] [class*="text-gray-900"],
html[data-theme="dark"] [class*="text-gray-800"] {
    color: #f8fafc !important;
}

html[data-theme="dark"] [class*="text-slate-700"],
html[data-theme="dark"] [class*="text-slate-600"],
html[data-theme="dark"] [class*="text-gray-700"],
html[data-theme="dark"] [class*="text-gray-600"] {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] [class*="text-slate-500"],
html[data-theme="dark"] [class*="text-slate-400"],
html[data-theme="dark"] [class*="text-gray-500"],
html[data-theme="dark"] [class*="text-gray-400"] {
    color: #94a3b8 !important;
}

html[data-theme="dark"] [class*="border-slate-"],
html[data-theme="dark"] [class*="border-gray-"],
html[data-theme="dark"] [class*="border-white"] {
    border-color: #334155 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] option,
html[data-theme="dark"] [data-search-suggestions] {
    background: #111827 !important;
    background-color: #111827 !important;
    color: #ffffff !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #94a3b8 !important;
}

html[data-theme="dark"] input[type="file"]::file-selector-button {
    background: #1f2937 !important;
    color: #ffffff !important;
    border: 1px solid #475569 !important;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
}

html[data-theme="dark"] [data-theme-toggle] {
    border-color: rgba(255, 255, 255, 0.18) !important;
}

html[data-theme="light"],
html[data-theme="light"] body {
    color-scheme: light;
    background: #f8fafc !important;
    color: #0f172a !important;
}

html[data-theme="light"] main,
html[data-theme="light"] .main-content,
html[data-theme="light"] .marketplace-content,
html[data-theme="light"] .content,
html[data-theme="light"] .page-content,
html[data-theme="light"] .products-area,
html[data-theme="light"] .listings-area,
html[data-theme="light"] .recent-listings,
html[data-theme="light"] .trending-section,
html[data-theme="light"] .listings-section,
html[data-theme="light"] .products-grid,
html[data-theme="light"] .seller-dashboard,
html[data-theme="light"] .dashboard-content,
html[data-theme="light"] .flex-1[class*="bg-slate-50"],
html[data-theme="light"] .flex-1[class*="md:bg-slate-50"],
html[data-theme="light"] div[class*="md:bg-slate-50"],
html[data-theme="light"] [class*="bg-slate-50"],
html[data-theme="light"] [class*="bg-gray-50"] {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

html[data-theme="light"] body[class*="bg-slate-950"],
html[data-theme="light"] section[class*="bg-slate-950"],
html[data-theme="light"] div[class*="bg-slate-950"]:not(#mobile-menu):not([id*="toast"]):not([id*="low-data"]) {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

html[data-theme="light"] .listing-card,
html[data-theme="light"] .product-card,
html[data-theme="light"] .card,
html[data-theme="light"] .seller-card,
html[data-theme="light"] .stats-card,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .unlock-modal-panel,
html[data-theme="light"] section[class*="bg-white"],
html[data-theme="light"] aside[class*="bg-white"],
html[data-theme="light"] form[class*="bg-white"],
html[data-theme="light"] div[class*="bg-white"],
html[data-theme="light"] article[class*="bg-white"],
html[data-theme="light"] [class*="md:bg-white"],
html[data-theme="light"] [class*="bg-white"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .listing-card > .p-5,
html[data-theme="light"] .listing-card > .md\:p-4,
html[data-theme="light"] .product-card > div,
html[data-theme="light"] .card > div {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
}

html[data-theme="light"] .listing-card a[href*="item"].bg-emerald-500,
html[data-theme="light"] .listing-card a[href*="item"].md\:bg-slate-900 {
    background-color: #059669 !important;
    color: #ffffff !important;
}

html[data-theme="light"] .listing-card .card-image,
html[data-theme="light"] .listing-card .card-image img,
html[data-theme="light"] .product-card img,
html[data-theme="light"] .card-image {
    background-color: #f8fafc !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] option,
html[data-theme="light"] [data-search-suggestions] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #d1d5db !important;
}

html[data-theme="light"] input[type="file"]::file-selector-button {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
}

html[data-theme="light"] [class*="text-slate-900"],
html[data-theme="light"] [class*="text-slate-800"],
html[data-theme="light"] [class*="text-gray-900"],
html[data-theme="light"] [class*="text-gray-800"],
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] .listing-card h3,
html[data-theme="light"] .listing-card h3 a {
    color: #0f172a !important;
}

html[data-theme="light"] [class*="text-slate-700"],
html[data-theme="light"] [class*="text-slate-600"],
html[data-theme="light"] [class*="text-gray-700"],
html[data-theme="light"] [class*="text-gray-600"] {
    color: #334155 !important;
}

html[data-theme="light"] [class*="text-slate-500"],
html[data-theme="light"] [class*="text-slate-400"],
html[data-theme="light"] [class*="text-gray-500"],
html[data-theme="light"] [class*="text-gray-400"] {
    color: #64748b !important;
}

html[data-theme="light"] [class*="border-slate-"],
html[data-theme="light"] [class*="border-gray-"] {
    border-color: #e5e7eb !important;
}
