/* מצב כהה – משתני צבע */
body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --card-bg: #2d2d2d;
    --border-color: #404040;
    --accent-color: #d46b4a; /* כתום חמים בגרסה כהה */
}

body.dark-mode {
    background: var(--bg-color);
    color: var(--text-color);
}

body.dark-mode a {
    color: #f3c5b5;
}

body.dark-mode a:hover {
    color: #ffd8c9;
}

body.dark-mode header,
body.dark-mode footer,
body.dark-mode .sidebar,
body.dark-mode .sidebar-content,
body.dark-mode .sidebar-section,
body.dark-mode .content,
body.dark-mode .container,
body.dark-mode .card,
body.dark-mode .panel,
body.dark-mode .deal-card,
body.dark-mode .hot-card,
body.dark-mode .item-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-mode .mobile-quick-nav,
body.dark-mode .mobile-sheet,
body.dark-mode .mobile-sheet-header,
body.dark-mode .mobile-sheet-body,
body.dark-mode .mobile-sidebar-tabs {
    background: #242424 !important;
    border-color: #3a3a3a !important;
}

body.dark-mode .mobile-quick-btn,
body.dark-mode .mobile-sheet-close,
body.dark-mode .mobile-tab-btn {
    background: #2d2d2d !important;
    color: #f0f0f0 !important;
    border-color: #4a4a4a !important;
}

body.dark-mode .mobile-quick-btn.is-active,
body.dark-mode .mobile-tab-btn.is-active {
    background: #b85a3a !important;
    border-color: #b85a3a !important;
    color: #fff !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode button,
body.dark-mode .search-box,
body.dark-mode .btn,
body.dark-mode .a11y-mini-btn,
body.dark-mode .a11y-btn {
    background: #2b2b2b;
    color: #f0f0f0;
    border-color: #4b4b4b;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #b9b9b9;
}

body.dark-mode .search-results,
body.dark-mode .search-result-item,
body.dark-mode .result-info,
body.dark-mode .table,
body.dark-mode table,
body.dark-mode th,
body.dark-mode td {
    background: #252525;
    color: #ececec;
    border-color: #3f3f3f;
}

body.dark-mode .result-category,
body.dark-mode .item-meta,
body.dark-mode .footer-brand-note,
body.dark-mode .footer-contact,
body.dark-mode .hot-description,
body.dark-mode .item-description,
body.dark-mode .cat-link,
body.dark-mode .cat-toggle {
    color: #d3d3d3 !important;
}

body.dark-mode .cat-link:hover,
body.dark-mode .cat-link.active,
body.dark-mode summary.cat-summary,
body.dark-mode .trust-pill {
    background: #303030 !important;
    border-color: #474747 !important;
    color: #f0f0f0 !important;
}

body.dark-mode .section-title {
    border-bottom-color: var(--border-color);
}

body.dark-mode .nav a {
    color: var(--text-color);
}

body.dark-mode .nav a:hover {
    color: var(--accent-color);
}

body.dark-mode .sidebar.collapsed::after {
    background-color: var(--accent-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cline x1='9' y1='4' x2='9' y2='20'/%3E%3C/svg%3E");
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

body.dark-mode .a11y-panel,
body.dark-mode .a11y-row,
body.dark-mode .a11y-range {
    background: #232323;
    color: #efefef;
    border-color: #3d3d3d;
}

#darkModeToggle .ui-icon,
#mobileThemeToggle .ui-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    line-height: 1;
}

#darkModeToggle .ui-icon svg,
#mobileThemeToggle .ui-icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

/* Item page dark-mode coverage */
body.dark-mode .product-gallery,
body.dark-mode .product-info {
    background: #242424 !important;
    border-color: #3f3f3f !important;
}

body.dark-mode .main-media {
    background: #1d1d1d !important;
}

body.dark-mode .nav-arrow {
    background: rgba(40, 40, 40, 0.9) !important;
    color: #f1f1f1 !important;
    border: 1px solid #4a4a4a;
}

body.dark-mode .product-meta,
body.dark-mode .clicks-count,
body.dark-mode .back-link,
body.dark-mode .footer-brand-note,
body.dark-mode .footer-contact {
    color: #d2d2d2 !important;
}

body.dark-mode nav[aria-label="ניווט פירורי לחם"] {
    color: #cfcfcf !important;
}

body.dark-mode nav[aria-label="ניווט פירורי לחם"] a {
    color: #f3c5b5 !important;
}

body.dark-mode .product-description {
    border-top-color: #444 !important;
    border-bottom-color: #444 !important;
}

body.dark-mode .product-price {
    background: linear-gradient(135deg, #3a2d27 0%, #2f241f 100%) !important;
    border-color: #5a3c31 !important;
}

body.dark-mode .price-label {
    color: #efc3b3 !important;
}

body.dark-mode .price-value {
    color: #ffbca1 !important;
}

body.dark-mode .share-panel {
    background: #2a211d !important;
    border-color: #594138 !important;
}

body.dark-mode .share-title,
body.dark-mode .share-btn {
    color: #f0d3c7 !important;
}

body.dark-mode .share-btn {
    background: #2f2723 !important;
    border-color: #6a4a3d !important;
}

body.dark-mode .share-btn:hover {
    background: #3a2d27 !important;
    border-color: #8b5a47 !important;
}

body.dark-mode .copy-status {
    color: #8fd2a2 !important;
}

body.dark-mode .no-media-placeholder {
    background: #242424 !important;
    color: #d8d8d8 !important;
    border: 1px solid #404040;
}

@media (max-width: 768px) {
    body.dark-mode {
        background: #171717;
        color: #efefef;
    }

    body.dark-mode .header-inner,
    body.dark-mode .main-content,
    body.dark-mode .content-wrapper,
    body.dark-mode .layout {
        background: transparent;
    }
}

/* מעבר חלק */
body, header, .sidebar-content, .hot-card, .item-card, .nav a {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
