/* ==========================================================================
   Like Lombard - Shop Dark Theme
   Activated via <html data-theme="dark">
   ========================================================================== */

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-btn:hover,
.theme-toggle-btn:focus {
    background: rgba(255, 255, 255, 0.16);
    color: #ffda00;
    border-color: rgba(255, 218, 0, 0.45);
    outline: none;
}

.theme-toggle-btn .theme-icon-sun {
    display: none;
}

.theme-toggle-btn .theme-icon-moon {
    display: inline-flex;
}

html[data-theme="dark"] .theme-toggle-btn .theme-icon-sun {
    display: inline-flex;
    color: #ffda00;
}

html[data-theme="dark"] .theme-toggle-btn .theme-icon-moon {
    display: none;
}

/* ==========================================================================
   Dark Theme Overrides (html[data-theme="dark"])
   ========================================================================== */

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] body.shop-body {
    background-color: #1e1e1e;
    color: #e8e8e8;
}

/* Cards & Filter bar */
html[data-theme="dark"] .card,
html[data-theme="dark"] .card.filters,
html[data-theme="dark"] .shop-filters-card,
html[data-theme="dark"] .filters_panel,
html[data-theme="dark"] .shop-filter-bar {
    background-color: #262626 !important;
    border-color: #383838 !important;
    color: #e8e8e8;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .card .info h4,
html[data-theme="dark"] .card .info h5 {
    color: #f0f0f0;
}

html[data-theme="dark"] .card .info p {
    color: #c7c7c7;
}

html[data-theme="dark"] .tarfi_b {
    background-color: #2d2d2d !important;
    border-color: #383838 !important;
    color: #e8e8e8;
}

/* Select2 in Shop */
html[data-theme="dark"] .select2-container--bootstrap .select2-selection {
    background-color: #1a1a1a !important;
    border-color: #383838 !important;
    color: #e8e8e8 !important;
}

html[data-theme="dark"] .select2-container--bootstrap .select2-selection--single .select2-selection__rendered {
    color: #e8e8e8 !important;
}

html[data-theme="dark"] .select2-container--bootstrap .select2-selection--single .select2-selection__arrow b {
    border-color: #999999 transparent transparent transparent !important;
}

html[data-theme="dark"] .select2-container--bootstrap .select2-dropdown {
    background-color: #262626 !important;
    border-color: #484848 !important;
    color: #e8e8e8 !important;
}

html[data-theme="dark"] .select2-container--bootstrap .select2-search--dropdown .select2-search__field {
    background-color: #1a1a1a !important;
    border-color: #383838 !important;
    color: #e8e8e8 !important;
}

html[data-theme="dark"] .select2-container--bootstrap .select2-results__option {
    color: #e8e8e8;
}

html[data-theme="dark"] .select2-container--bootstrap .select2-results__option[aria-selected="true"] {
    background-color: #2d2d2d;
    color: #ffffff;
}

html[data-theme="dark"] .select2-container--bootstrap .select2-results__option--highlighted[aria-selected] {
    background-color: #0284c7;
    color: #ffffff;
}

html[data-theme="dark"] .shop-body .form-control,
html[data-theme="dark"] .shop-body select.form-control {
    background-color: #1a1a1a !important;
    border-color: #383838 !important;
    color: #e8e8e8 !important;
}

html[data-theme="dark"] .shop-body .form-control::placeholder {
    color: #858585 !important;
}

html[data-theme="dark"] .shop-body .form-control:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 0.2rem rgba(2, 132, 199, 0.25) !important;
}

/* Empty state */
html[data-theme="dark"] .empty-products,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .no-products-found {
    background-color: #262626 !important;
    border-color: #484848 !important;
    color: #c7c7c7;
}

html[data-theme="dark"] .empty-products h4,
html[data-theme="dark"] .empty-state h4,
html[data-theme="dark"] .no-products-found h4 {
    color: #f0f0f0;
}

/* Product Cards */
html[data-theme="dark"] .product {
    background-color: #262626 !important;
    border-color: #383838 !important;
    color: #e8e8e8;
}

html[data-theme="dark"] .product:hover {
    border-color: #525252 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .img-block {
    background-color: #2d2d2d;
}

html[data-theme="dark"] .product .name {
    color: #f0f0f0;
}

html[data-theme="dark"] .product .name span {
    background-color: #2d2d2d;
    color: #c7c7c7;
}

html[data-theme="dark"] .product .name span.red {
    background-color: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
}

html[data-theme="dark"] .product .charac,
html[data-theme="dark"] .product .price_text {
    color: #c7c7c7;
}

html[data-theme="dark"] .product .info {
    color: #999999;
}

html[data-theme="dark"] .product .box-2,
html[data-theme="dark"] .product .actions {
    border-top-color: #383838 !important;
}

html[data-theme="dark"] .actions a:not(.wh) {
    color: #999999;
}

html[data-theme="dark"] .actions a:not(.wh):hover {
    color: #38bdf8;
}

html[data-theme="dark"] .blue_ {
    color: #38bdf8;
}

/* Buttons & Badges */
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-outline-secondary {
    background-color: #2d2d2d;
    border-color: #484848;
    color: #e8e8e8;
}

html[data-theme="dark"] .btn-light:hover,
html[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: #363636;
    color: #ffffff;
}

/* Modals */
html[data-theme="dark"] .modal-content {
    background-color: #262626 !important;
    border: 1px solid #383838;
    color: #e8e8e8;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
    border-color: #383838 !important;
}

html[data-theme="dark"] .modal-title {
    color: #f0f0f0;
}

html[data-theme="dark"] .close,
html[data-theme="dark"] .close:not(:disabled):not(.disabled) {
    color: #999999 !important;
    text-shadow: none;
    opacity: 0.85;
}

html[data-theme="dark"] .close:hover,
html[data-theme="dark"] .close:focus,
html[data-theme="dark"] .close:not(:disabled):not(.disabled):hover,
html[data-theme="dark"] .close:not(:disabled):not(.disabled):focus {
    color: #ffffff !important;
    opacity: 1;
}

html[data-theme="dark"] .tab_info tr:first-child {
    background-color: #2d2d2d !important;
    color: #f0f0f0;
}

html[data-theme="dark"] .tab_info td,
html[data-theme="dark"] .tab_info th {
    border-color: #383838 !important;
    color: #e8e8e8;
}

/* Footer */
html[data-theme="dark"] .shop-footer {
    background-color: #242424 !important;
    border-top: 1px solid #383838;
    color: #999999;
}

html[data-theme="dark"] .shop-footer a {
    color: #38bdf8;
}

/* Scrollbar (Light & Dark, uniform narrow 6px) */
*,
html {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

::-webkit-scrollbar,
.cat-as-btn::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb,
.cat-as-btn::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover,
.cat-as-btn::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

html[data-theme="dark"],
html[data-theme="dark"] * {
    scrollbar-color: #484848 #1e1e1e;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1e1e1e;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb,
html[data-theme="dark"] .cat-as-btn::-webkit-scrollbar-thumb {
    background: #484848;
    border-radius: 3px;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .cat-as-btn::-webkit-scrollbar-thumb:hover {
    background: #5c5c5c;
}
