/* ==========================================================
   CYBERTECH PC
   RESET
========================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

picture {
    display: block;
}

svg {
    display: block;
}

button,
input,
textarea,
select {
    font: inherit;
    outline: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
	
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

/* ==========================================================
   ROOT VARIABLES
========================================================== */

:root {
    /* Colors */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --accent: #ff6a00;
    --accent-light: #ff8c38;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #eef2ff;
    --dark: #0f172a;
    --dark-2: #111827;
    --dark-3: #1e293b;
    --text: #1f2937;
    --text-light: #64748b;
    --border: #dbe2ea;

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    /* Shadow */
    --shadow-xs: 0 2px 5px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.10);
    --shadow-md: 0 15px 40px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 25px 70px rgba(0, 0, 0, 0.30);

    /* Animation */
    --speed-fast: 0.2s;
    --speed: 0.3s;
    --speed-slow: 0.45s;
}

[data-theme="dark"] {
    --bg: #0b1220;
    --surface: #131d31;
    --surface-2: #1b2740;
    --text: #ffffff;
    --text-light: #b9c4d6;
    --border: rgba(255, 255, 255, 0.08);
}

/* ==========================================================
   BODY
========================================================== */

body {
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}

/* ==========================================================
   UTILITIES
========================================================== */

.container {
    width: min(1400px, 95%);
    margin-inline: auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--speed), box-shadow var(--speed);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 14px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

section {
    padding-block: 50px;
}

.section-title {
    margin-bottom: 40px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.1rem;
    font-weight: 800;
}

.section-title p {
    color: var(--text-light);
    margin-top: 10px;
}

/* ==========================================================
   HEADER
========================================================== */

.header {
    position: sticky;
    top: 12px;
    z-index: 1000;
    width: min(1400px, 96%);
    margin: 12px auto 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 22px;
    border-radius: 20px;
    background: rgb(255 255 255 / 80%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.30);
    transition: 0.3s ease;
}

.header:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.40);
}

/* LOGO */

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 900;
    color: #fff;
    white-space: nowrap;
}

.header-logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

/* NAVIGATION */

.header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    color: #d6dceb;
    font-weight: 600;
    transition: 0.25s;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.header-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
}

/* SEARCH */

.search-box {
    flex: 0 1 420px;
}

.search-wrapper {
    position: relative;
}

.search-wrapper input {
    width: 100%;
    height: 48px;
    padding-inline: 18px 52px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
    transition: 0.25s;
}

.search-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.camera-btn {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    transition: 0.25s;
}

.camera-btn:hover {
    background: var(--primary-dark);
}

/* ACTIONS */

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle,
.cart-btn,
.user-btn {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transition: 0.25s;
}

.theme-toggle:hover,
.cart-btn:hover,
.user-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* CART BADGE */

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
}

/* HEADER TABLET */

@media (max-width: 992px) {
    .header {
        flex-wrap: wrap;
        padding: 16px;
    }
    .search-box {
        order: 3;
        flex: 1 1 100%;
    }
    .header-nav {
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* HEADER MOBILE */

@media (max-width: 768px) {
    .header {
        width: 95%;
        padding: 12px;
        gap: 10px;
    }
    .header-logo {
        font-size: 1rem;
    }
    .header-logo img {
        width: 42px;
        height: 42px;
    }
    .header-nav {
        display: none;
    }
    .search-box {
        flex-basis: 100%;
    }
    .search-wrapper input {
        height: 44px;
        font-size: 14px;
    }
    .header-actions {
        gap: 6px;
    }
    .theme-toggle,
    .cart-btn,
    .user-btn {
        width: 40px;
        height: 40px;
    }
}

/* HEADER SMALL MOBILE */

@media (max-width: 480px) {
    .header {
        border-radius: 16px;
    }
    .header-logo {
        font-size: 0.9rem;
    }
    .search-wrapper input {
        height: 42px;
    }
    .camera-btn {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================
   HEADER FIXES (מובייל)
========================================================== */
.premium-hero עיצוב לסלידדר ול
עם אפקטים עדינים
/* ==========================================================
   CYBERTECH PC
   RESET
========================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

picture {
    display: block;
}

svg {
    display: block;
}

button,
input,
textarea,
select {
    font: inherit;
    outline: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
	
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

/* ==========================================================
   ROOT VARIABLES
========================================================== */

:root {
    /* Colors */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --accent: #ff6a00;
    --accent-light: #ff8c38;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #eef2ff;
    --dark: #0f172a;
    --dark-2: #111827;
    --dark-3: #1e293b;
    --text: #1f2937;
    --text-light: #64748b;
    --border: #dbe2ea;

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    /* Shadow */
    --shadow-xs: 0 2px 5px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.10);
    --shadow-md: 0 15px 40px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 25px 70px rgba(0, 0, 0, 0.30);

    /* Animation */
    --speed-fast: 0.2s;
    --speed: 0.3s;
    --speed-slow: 0.45s;
}

[data-theme="dark"] {
    --bg: #0b1220;
    --surface: #131d31;
    --surface-2: #1b2740;
    --text: #ffffff;
    --text-light: #b9c4d6;
    --border: rgba(255, 255, 255, 0.08);
}

/* ==========================================================
   BODY
========================================================== */

body {
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}

/* ==========================================================
   UTILITIES
========================================================== */

.container {
    width: min(1400px, 95%);
    margin-inline: auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--speed), box-shadow var(--speed);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 14px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

section {
    padding-block: 50px;
}

.section-title {
    margin-bottom: 40px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.1rem;
    font-weight: 800;
}

.section-title p {
    color: var(--text-light);
    margin-top: 10px;
}

/* ==========================================================
   HEADER
========================================================== */

.header {
    position: sticky;
    top: 12px;
    z-index: 1000;
    width: min(1400px, 96%);
    margin: 12px auto 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 22px;
    border-radius: 20px;
    background: rgb(255 255 255 / 80%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.30);
    transition: 0.3s ease;
}

.header:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.40);
}

/* LOGO */

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 900;
    color: #fff;
    white-space: nowrap;
}

.header-logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

/* NAVIGATION */

.header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    color: #d6dceb;
    font-weight: 600;
    transition: 0.25s;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.header-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
}

/* SEARCH */

.search-box {
    flex: 0 1 420px;
}

.search-wrapper {
    position: relative;
}

.search-wrapper input {
    width: 100%;
    height: 48px;
    padding-inline: 18px 52px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
    transition: 0.25s;
}

.search-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.camera-btn {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    transition: 0.25s;
}

.camera-btn:hover {
    background: var(--primary-dark);
}

/* ACTIONS */

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle,
.cart-btn,
.user-btn {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transition: 0.25s;
}

.theme-toggle:hover,
.cart-btn:hover,
.user-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* CART BADGE */

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
}

/* HEADER TABLET */

@media (max-width: 992px) {
    .header {
        flex-wrap: wrap;
        padding: 16px;
    }
    .search-box {
        order: 3;
        flex: 1 1 100%;
    }
    .header-nav {
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* HEADER MOBILE */

@media (max-width: 768px) {
    .header {
        width: 95%;
        padding: 12px;
        gap: 10px;
    }
    .header-logo {
        font-size: 1rem;
    }
    .header-logo img {
        width: 42px;
        height: 42px;
    }
    .header-nav {
        display: none;
    }
    .search-box {
        flex-basis: 100%;
    }
    .search-wrapper input {
        height: 44px;
        font-size: 14px;
    }
    .header-actions {
        gap: 6px;
    }
    .theme-toggle,
    .cart-btn,
    .user-btn {
        width: 40px;
        height: 40px;
    }
}

/* HEADER SMALL MOBILE */

@media (max-width: 480px) {
    .header {
        border-radius: 16px;
    }
    .header-logo {
        font-size: 0.9rem;
    }
    .search-wrapper input {
        height: 42px;
    }
    .camera-btn {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================
   HEADER FIXES (מובייל)
========================================================== */

@media (max-width: 768px) {
    .header {
        width: 96% !important;
        padding: 12px 14px !important;
        border-radius: 16px !important;
        top: 8px !important;
        margin: 8px auto 16px !important;
        gap: 8px !important;
    }
    .header-logo {
        font-size: 0.95rem !important;
        gap: 8px !important;
    }
    .header-logo img {
        width: 38px !important;
        height: 38px !important;
    }
    .header-actions {
        gap: 4px !important;
    }
    .theme-toggle,
    .cart-btn,
    .user-btn {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
    }
    .search-wrapper input {
        height: 55px !important;
        font-size: 16px !important;
        padding-inline: 18px 49px !important;
    }
    .camera-btn {
        width: 30px !important;
        height: 30px !important;
        left: 6px !important;
    }
    .cart-badge {
        min-width: 18px !important;
        height: 18px !important;
        font-size: 0.6rem !important;
        top: -4px !important;
        right: -4px !important;
    }
}

@media (max-width: 480px) {
    .header {
        width: 97% !important;
        padding: 10px 10px !important;
        border-radius: 14px !important;
        top: 6px !important;
        margin: 6px auto 12px !important;
    }
    .header-logo {
        font-size: 0.82rem !important;
    }
    .header-logo img {
        width: 32px !important;
        height: 32px !important;
    }
    .theme-toggle,
    .cart-btn,
    .user-btn {
        width: 32px !important;
        height: 32px !important;
    }
    .header-actions {
        gap: 3px !important;
    }
}

/* ==========================================================
   PREMIUM HERO 2026
========================================================== */

.premium-hero {
    position: relative;
    width: min(1400px, 96%);
    margin: 30px auto;
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 40px;
    align-items: center;

    /* רק זה השתנה */
    padding: 10px 22px;

    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #172554, #1e3a8a);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.premium-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.25), transparent 45%);
    pointer-events: none;
}

.premium-left {
    gap: 10px; /* במקום 18px */
}

.premium-left h1,
.premium-left h2,
.premium-left p {
    margin: 0;
}

.premium-left h1 {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.1;
    color: #fff;
    font-weight: 900;
}

.premium-left h2 {
    font-size: clamp(1.2rem, 2vw, 2rem);
    color: #dbeafe;
}

.premium-left p {
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 480px;
}

.premium-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-btn {
    min-width: 170px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    transition: 0.30s;
}

.hero-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
}

.hero-btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    backdrop-filter: blur(10px);
}

.hero-btn:hover {
    transform: translateY(-4px);
}

/* ==========================================================
   HERO SLIDER
========================================================== */

.premium-right {
    position: relative;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    min-height: 470px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.40);
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img {
    width: 92%;
    height: 400px;
    object-fit: contain;
    transition: transform 0.5s ease;
    position: relative;
	overflow: hidden;
    z-index: 1;
	border-radius:98px;
}



/* ---- FIXED slide-title (רקע אטום, טקסט קריא) ---- */

.slide-title {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 22px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(40, 45, 43, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	border-radius:35px;
}

/* ==========================================================
   SLIDER DOTS & PROGRESS
========================================================== */

.slider-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.slider-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #94a3b8;
    transition: 0.3s;
    cursor: pointer;
}

.slider-dot.active {
    background: #2563eb;
    transform: scale(1.3);
}

.slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.slider-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
}

/* ==========================================================
   HERO RESPONSIVE
========================================================== */

@media (max-width: 992px) {
    .premium-hero {
        grid-template-columns: 1fr;
        padding: 26px;
    }
    .premium-left {
        text-align: center;
        align-items: center;
    }
    .hero-slider {
        min-height: 380px;
    }
    .slide img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .premium-hero {
        padding: 18px;
        gap: 20px;
        border-radius: 20px;
    }
    .premium-left h1 {
        font-size: 1.8rem;
    }
    .premium-left h2 {
        font-size: 1.15rem;
    }
    .premium-left p {
        font-size: 0.95rem;
    }
    .hero-btn {
        width: 100%;
    }
.hero-slider {
    min-height: 270px;
    border-radius: 20px;
    overflow: hidden;
}

.slide {
    border-radius: 20px;
    overflow: hidden;
}

.slide img {
    display: block;
    width: 95%;
    height: 210px;
    margin-inline: auto;

    object-fit: cover;
    border-radius: 18px !important;
}

.slide-title {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 10px 14px;

    font-size: 0.9rem;
    border-radius: 12px;
    background: rgba(40, 45, 43, 0.7);
}

.hero-slider {
    position: relative;
    height: 400px;
    min-height: 0;
    padding: 14px;

    border-radius: 26px !important;
    overflow: hidden !important;
}

.hero-slider .slide {
    position: absolute;
    inset: 14px;

    border-radius: 20px !important;
    overflow: hidden !important;
}

.hero-slider .slide .slider-image {
    position: absolute !important;
    inset: 0 !important;

    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover;
    border-radius: 20px !important;
    clip-path: inset(0 round 20px);

    transform: none !important;
}

/* מבטל הגדלה שמסתירה את הפינות */
.hero-slider .slide.active .slider-image {
    transform: none !important;
}

/* ==========================================================
   FINAL RESPONSIVE PRODUCTS + CATEGORY CARDS
   Tablet: 3 products per row
   Mobile: 2 products per row
========================================================== */

/* טאבלט — הסינון מעל המוצרים ושלושה כרטיסים בשורה */
@media (min-width: 601px) and (max-width: 992px) {
    html body .products-with-facets,
    html body #productsArea {
        width: calc(100% - 24px) !important;
        max-width: 100% !important;
        margin-inline: auto !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 16px !important;
    }

    html body .product-facet-sidebar,
    html body #productFacetSidebar {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    html body .products-with-facets > .products-grid,
    html body .products-with-facets > #productsGrid,
    html body #productsArea > #productsGrid {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }

    html body #productsGrid .product-card {
        min-width: 0 !important;
        width: 100% !important;
        border-radius: 17px !important;
    }

    html body #productsGrid .product-image {
        height: 155px !important;
        padding: 12px !important;
    }

    html body #productsGrid .product-name {
        min-height: 3.9em !important;
        margin: 0 10px 6px !important;
        font-size: .82rem !important;
        line-height: 1.45 !important;
        -webkit-line-clamp: 3 !important;
    }

    html body #productsGrid .product-price {
        margin: 0 10px 8px !important;
        font-size: 1.16rem !important;
    }

    html body #productsGrid .product-stock {
        margin: 8px 10px 4px !important;
        padding: 3px 8px !important;
        font-size: .64rem !important;
    }

    html body #productsGrid .product-form {
        padding: 0 10px 10px !important;
    }
}

/* מובייל — שני כרטיסי מוצר בכל שורה */
@media (max-width: 600px) {
    html body .products-with-facets,
    html body #productsArea {
        width: calc(100% - 14px) !important;
        max-width: 100% !important;
        margin-inline: auto !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    html body .product-facet-sidebar,
    html body #productFacetSidebar {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 14px !important;
    }

    html body .products-with-facets > .products-grid,
    html body .products-with-facets > #productsGrid,
    html body #productsArea > #productsGrid {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    html body #productsGrid .product-card {
        min-width: 0 !important;
        width: 100% !important;
        border-radius: 13px !important;
    }

    html body #productsGrid .product-image {
        height: 122px !important;
        padding: 8px !important;
    }

    html body #productsGrid .product-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    html body #productsGrid .product-name {
        min-height: 3.75em !important;
        margin: 0 7px 4px !important;
        font-size: .72rem !important;
        line-height: 1.35 !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
    }

    html body #productsGrid .product-price {
        margin: 0 7px 6px !important;
        font-size: .96rem !important;
        white-space: nowrap !important;
    }

    html body #productsGrid .product-stock {
        max-width: calc(100% - 12px) !important;
        margin: 6px 6px 3px !important;
        padding: 3px 6px !important;
        overflow: hidden !important;
        font-size: .56rem !important;
        line-height: 1.25 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body #productsGrid .product-form {
        gap: 6px !important;
        padding: 0 7px 7px !important;
    }

    html body #productsGrid .qty-row {
        gap: 5px !important;
    }

    html body #productsGrid .qty-btn {
        flex: 0 0 28px !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        padding: 0 !important;
        border-radius: 7px !important;
        font-size: .82rem !important;
    }

    html body #productsGrid .qty-input {
        flex: 0 1 38px !important;
        width: 38px !important;
        min-width: 0 !important;
        height: 28px !important;
        padding: 0 !important;
        border-radius: 7px !important;
        font-size: .72rem !important;
    }

    html body #productsGrid .add-btn {
        width: 100% !important;
        min-height: 35px !important;
        height: auto !important;
        padding: 7px 4px !important;
        border-radius: 8px !important;
        font-size: .67rem !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }
}

/* מסכים צרים במיוחד — נשארים שני מוצרים בשורה */
@media (max-width: 360px) {
    html body .products-with-facets > #productsGrid,
    html body #productsArea > #productsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    html body #productsGrid .product-image {
        height: 102px !important;
        padding: 6px !important;
    }

    html body #productsGrid .product-name {
        font-size: .66rem !important;
    }

    html body #productsGrid .qty-btn {
        flex-basis: 25px !important;
        width: 25px !important;
        min-width: 25px !important;
        height: 26px !important;
    }

    html body #productsGrid .qty-input {
        width: 32px !important;
        height: 26px !important;
    }
}

/* ==========================================================
   CATEGORY CARDS — KEEP HORIZONTAL SCROLL + ARROWS
========================================================== */

@media (max-width: 992px) {
    html body .categories-home {
        width: 100% !important;
        max-width: 100% !important;
        padding-inline: 10px !important;
        overflow: visible !important;
    }

    html body .categories-carousel-wrapper {
        position: relative !important;
        width: 100% !important;
        padding-inline: 43px !important;
        overflow: hidden !important;
    }

    html body #categoriesCarousel.categories-carousel {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        grid-template-columns: none !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 8px 3px 13px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-behavior: smooth !important;
        scroll-snap-type: x proximity !important;
        overscroll-behavior-inline: contain !important;
        scrollbar-width: thin !important;
        scrollbar-color: #93c5fd transparent !important;
        -webkit-overflow-scrolling: touch;
    }

    html body #categoriesCarousel::-webkit-scrollbar {
        display: block !important;
        height: 6px !important;
    }

    html body #categoriesCarousel::-webkit-scrollbar-track {
        background: transparent !important;
    }

    html body #categoriesCarousel::-webkit-scrollbar-thumb {
        background: #93c5fd !important;
        border-radius: 999px !important;
    }

    html body #categoriesCarousel .category-carousel-item {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        scroll-snap-align: start !important;
        background: var(--surface, #fff) !important;
        border: 1px solid var(--border, #dbe2ea) !important;
        box-shadow: 0 5px 16px rgba(15, 23, 42, .08) !important;
    }

    html body .categories-carousel-wrapper > .carousel-arrow {
        position: absolute !important;
        top: 50% !important;
        z-index: 30 !important;
        width: 36px !important;
        height: 44px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transform: translateY(-58%) !important;
        border-radius: 11px !important;
    }

    html body .categories-carousel-wrapper > .carousel-arrow-left {
        left: 3px !important;
    }

    html body .categories-carousel-wrapper > .carousel-arrow-right {
        right: 3px !important;
    }
}

/* בטאבלט רואים שלוש כרטיסיות קטגוריה בכל מסך */
@media (min-width: 601px) and (max-width: 992px) {
    html body #categoriesCarousel .category-carousel-item {
        flex: 0 0 calc((100% - 24px) / 3) !important;
        padding: 14px 10px !important;
        border-radius: 16px !important;
    }

    html body #categoriesCarousel .category-image {
        height: 100px !important;
        padding: 6px !important;
    }
}

/* במובייל רואים שתי כרטיסיות קטגוריה בכל מסך */
@media (max-width: 600px) {
    html body .categories-carousel-wrapper {
        padding-inline: 37px !important;
    }

    html body #categoriesCarousel.categories-carousel {
        gap: 9px !important;
    }

    html body #categoriesCarousel .category-carousel-item {
        flex: 0 0 calc((100% - 9px) / 2) !important;
        padding: 9px 7px 10px !important;
        border-radius: 13px !important;
    }

    html body #categoriesCarousel .category-image {
        height: 76px !important;
        padding: 3px !important;
        margin-bottom: 5px !important;
    }

    html body #categoriesCarousel .category-info h3 {
        font-size: .74rem !important;
        line-height: 1.3 !important;
    }

    html body #categoriesCarousel .category-info p {
        font-size: .62rem !important;
    }

    html body .categories-carousel-wrapper > .carousel-arrow {
        width: 31px !important;
        height: 40px !important;
    }
}
    .slider-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        min-height: 220px;
    }
    .slide img {
        height: 170px;
    }
    .premium-left h1 {
        font-size: 1.45rem;
    }
    .premium-left p {
        font-size: 0.88rem;
    }
    .slide-title {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 8px 12px;
        font-size: 0.82rem;
        border-radius: 10px;
        background: rgba(40, 45, 43, 0.7);
    }
}

/* ==========================================================
   PREMIUM HERO FIXES (מובייל)
========================================================== */

@media (max-width: 768px) {
    .premium-hero {
        width: min(1400px, 96%) !important;
        padding: 18px 16px !important;
        gap: 16px !important;
        border-radius: 20px !important;
        margin: 16px auto !important;
    }
    .premium-left {
        gap: 12px !important;
    }
    .premium-left h1 {
        font-size: 1.6rem !important;
    }
    .premium-left h2 {
        font-size: 1.1rem !important;
    }
    .premium-left p {
        font-size: 0.9rem !important;
        max-width: 100% !important;
    }
    .premium-buttons {
        flex-direction: column !important;
        width: 100% !important;
    }
    .hero-btn {
        width: 100% !important;
        min-width: unset !important;
        height: 46px !important;
    }
    .hero-slider {
        min-height: 250px !important;
        border-radius: 16px !important;
    }
    .slide img {
        height: 190px !important;
        width: 92% !important;
    }
    .slide-title {
        font-size: 0.85rem !important;
        padding: 10px 12px !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 14px !important;
        background: rgba(40, 45, 43, 0.7) !important;
    }
    .slider-dots {
        bottom: 10px !important;
        gap: 6px !important;
    }
    .slider-dot {
        width: 8px !important;
        height: 8px !important;
    }
}

@media (max-width: 480px) {
    .premium-hero {
        padding: 14px 12px !important;
        gap: 12px !important;
        border-radius: 16px !important;
        margin: 12px auto !important;
    }
    .premium-left h1 {
        font-size: 1.3rem !important;
    }
    .premium-left h2 {
        font-size: 1rem !important;
    }
    .premium-left p {
        font-size: 0.82rem !important;
    }
    .hero-btn {
        height: 42px !important;
        font-size: 0.85rem !important;
        border-radius: 12px !important;
    }
    .hero-slider {
        min-height: 200px !important;
    }
    .slide img {
        height: 125px !important;
    }
    .slide-title {
        font-size: 0.78rem !important;
        padding: 8px 10px !important;
    }
}

/* ==========================================================
   BODY OVERFLOW FIX
========================================================== */

@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }
    .container {
        width: 100% !important;
        padding-inline: 10px !important;
    }
}

/* ==========================================================
   CATEGORIES
========================================================== */

.categories-home {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 20px;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 36px;
}

.section-title span {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent, #ff6a00);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text, #1f2937);
}

[data-theme="dark"] .section-title h2 {
    color: #fff;
}

/* CAROUSEL WRAPPER */

.categories-carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 55px;
    width: 100%;
}

.categories-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: auto;
    scroll-snap-type: none !important;
    overflow-anchor: none;
    overscroll-behavior-inline: contain;
    padding: 10px 4px 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 100%;
}

.categories-carousel::-webkit-scrollbar {
    display: none;
}

.category-carousel-item {
    flex: 0 0 220px;
    min-width: 200px;
    max-width: 240px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #dbe2ea);
    border-radius: 20px;
    padding: 24px 16px 20px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: block;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.category-carousel-item:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--primary, #2563eb);
}

.category-carousel-item .category-image {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    margin-bottom: 10px;
}

.category-carousel-item .category-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 50%;
    transition: none;
    display: block;
}

.category-carousel-item:hover .category-image img {
    transform: none;
}

/* ==========================================================
   CATEGORY CARDS — ABSOLUTE VISUAL STABILITY
   High-specificity reset protects the carousel from legacy
   hover/active rules loaded elsewhere in the project.
========================================================== */

html body #categoriesCarousel .category-carousel-item,
html body #categoriesCarousel .category-carousel-item:hover,
html body #categoriesCarousel .category-carousel-item:focus,
html body #categoriesCarousel .category-carousel-item:focus-visible,
html body #categoriesCarousel .category-carousel-item:active {
    transform: none !important;
    translate: none !important;
    rotate: none !important;
    scale: 1 !important;
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
    backface-visibility: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

html body #categoriesCarousel .category-carousel-item .category-image,
html body #categoriesCarousel .category-carousel-item:hover .category-image,
html body #categoriesCarousel .category-carousel-item:focus .category-image,
html body #categoriesCarousel .category-carousel-item:active .category-image,
html body #categoriesCarousel .category-carousel-item .category-image img,
html body #categoriesCarousel .category-carousel-item:hover .category-image img,
html body #categoriesCarousel .category-carousel-item:focus .category-image img,
html body #categoriesCarousel .category-carousel-item:active .category-image img {
    transform: none !important;
    translate: none !important;
    rotate: none !important;
    scale: 1 !important;
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
}

html body #categoriesCarousel .category-carousel-item .category-image img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

html body #categoriesCarousel.is-carousel-scrolling .category-carousel-item,
html body #categoriesCarousel.is-carousel-scrolling .category-carousel-item:hover {
    transform: none !important;
    scale: 1 !important;
    transition: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="dark"] body #categoriesCarousel .category-carousel-item,
[data-theme="dark"] body #categoriesCarousel .category-carousel-item:hover,
[data-theme="dark"] body #categoriesCarousel .category-carousel-item:focus,
[data-theme="dark"] body #categoriesCarousel .category-carousel-item:active {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.22) !important;
}

.category-carousel-item .category-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text, #1f2937);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.category-carousel-item:hover .category-info h3 {
    color: var(--primary, #2563eb);
}

.category-carousel-item .category-info p {
    font-size: 0.8rem;
    color: var(--text-light, #64748b);
    font-weight: 600;
}

[data-theme="dark"] .category-carousel-item {
    background: var(--surface, #131d31);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .category-carousel-item:hover {
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.22);
}

/* Freeze hover/transition effects while the carousel is moving. */
.categories-carousel.is-carousel-scrolling .category-carousel-item,
.categories-carousel.is-carousel-scrolling .category-carousel-item:hover,
.categories-carousel.is-carousel-scrolling .category-image img,
.categories-carousel.is-carousel-scrolling .category-carousel-item:hover .category-image img {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    pointer-events: none;
}

[data-theme="dark"] .category-carousel-item .category-info h3 {
    color: #fff;
}

[data-theme="dark"] .category-carousel-item:hover .category-info h3 {
    color: var(--primary-light, #60a5fa);
}

/* CAROUSEL ARROWS */

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 15px;
    color: transparent;
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(239,246,255,.88));
    border: 1px solid rgba(37, 99, 235, .22);
    font-size: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    backdrop-filter: blur(14px) saturate(145%);
    box-shadow:
        0 9px 24px rgba(37, 99, 235, .15),
        inset 0 1px 0 rgba(255,255,255,.95);
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
    isolation: isolate;
}

.carousel-arrow::before {
    content: "";
    width: 11px;
    height: 11px;
    border-right: 3px solid #1d4ed8;
    border-bottom: 3px solid #1d4ed8;
    border-radius: 1px;
}

.carousel-arrow:hover {
    transform: translateY(-50%);
    background: #ffffff;
    border-color: rgba(37, 99, 235, .48);
    box-shadow:
        0 12px 28px rgba(37, 99, 235, .22),
        inset 0 1px 0 #ffffff;
}

.carousel-arrow:active {
    transform: translateY(-50%);
    background: #eff6ff;
    box-shadow:
        0 5px 14px rgba(37, 99, 235, .16),
        inset 0 1px 3px rgba(37, 99, 235, .08);
}

.carousel-arrow:focus-visible {
    outline: 3px solid rgba(59, 130, 246, .28);
    outline-offset: 3px;
}

.carousel-arrow:disabled,
.carousel-arrow[aria-disabled="true"] {
    opacity: .34 !important;
    cursor: default;
    box-shadow: none;
}

.carousel-arrow-left {
    left: 7px;
}

.carousel-arrow-left::before {
    transform: rotate(135deg);
}

.carousel-arrow-right {
    right: 7px;
}

.carousel-arrow-right::before {
    transform: rotate(-45deg);
}

[data-theme="dark"] .carousel-arrow {
    background: linear-gradient(145deg, rgba(30,41,59,.94), rgba(15,23,42,.88));
    border-color: rgba(96, 165, 250, .30);
    box-shadow:
        0 10px 26px rgba(0,0,0,.28),
        inset 0 1px 0 rgba(255,255,255,.08);
}

[data-theme="dark"] .carousel-arrow::before {
    border-color: #93c5fd;
}

[data-theme="dark"] .carousel-arrow:hover {
    background: #1e293b;
    border-color: rgba(147, 197, 253, .58);
}

/* CATEGORIES TABLET */

@media (max-width: 992px) and (min-width: 601px) {
    .categories-carousel-wrapper {
        padding: 0 20px;
        overflow: visible;
    }
    .categories-carousel {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        overflow: visible;
        padding: 10px 0 20px;
    }
    .category-carousel-item {
        flex: none;
        width: 100%;
        min-width: auto;
        max-width: none;
        padding: 20px 14px;
    }
    .category-carousel-item .category-image {
        height: 110px;
        padding: 8px;
    }
    .carousel-arrow {
        display: none;
    }
}

/* CATEGORIES MOBILE */

@media (max-width: 600px) {
    .categories-home {
        padding: 0 12px;
        margin-bottom: 30px;
    }
    .section-title {
        margin-bottom: 24px;
    }
    .section-title h2 {
        font-size: 1.4rem;
    }
    .section-title span {
        font-size: 0.65rem;
    }
    .categories-carousel-wrapper {
        padding: 0;
        overflow: visible;
    }
    .categories-carousel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        overflow: visible;
        padding: 0 0 16px;
    }
    .category-carousel-item {
        flex: none;
        width: 100%;
        min-width: auto;
        max-width: none;
        padding: 9px 12px 12px;
        border-radius: 16px;
    }
    .category-carousel-item .category-image {
        height: 70px;
        padding: 2px;
    }
    .category-carousel-item .category-image img {
        border-radius: 40%;
    }
    .category-carousel-item .category-info h3 {
        font-size: 0.82rem;
    }
    .category-carousel-item .category-info p {
        font-size: 0.7rem;
    }
    .category-carousel-item:hover {
        transform: none;
    }
    .category-carousel-item:hover .category-image img {
        transform: none;
    }
    .carousel-arrow {
        display: none;
    }
}

@media (max-width: 380px) {
    .categories-carousel {
        gap: 8px;
    }
    .category-carousel-item {
        padding: 12px 8px 10px;
        border-radius: 12px;
    }
    .category-carousel-item .category-image {
        height: 60px;
        padding: 4px;
    }
    .category-carousel-item .category-info h3 {
        font-size: 0.72rem;
    }
    .category-carousel-item .category-info p {
        font-size: 0.62rem;
    }
}

/* ==========================================================
   PRODUCTS GRID
========================================================== */

.products-grid {
    width: min(100%, 1320px);
    max-width: 1320px;
    margin: 0 auto;
    padding: 22px 18px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    position: relative;
    z-index: 1;
}

@media (min-width: 993px) and (max-width: 1180px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.product-card {
    width: 100%;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #dbe2ea);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary, #2563eb);
}

[data-theme="dark"] .product-card {
    background: var(--surface, #131d31);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .product-card:hover {
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.product-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2, #eef2ff);
    padding: 20px;
}

[data-theme="dark"] .product-image {
    background: var(--dark-3, #1e293b);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.45s ease;
    pointer-events: none;
    user-select: none;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-stock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    margin: 12px 14px 6px;
}

.stock-ok {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.stock-low {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.stock-out {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text, #1f2937);
    margin: 0 14px 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

[data-theme="dark"] .product-name {
    color: #fff;
}

.product-name:hover {
    color: var(--primary, #2563eb);
}

.product-price {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent, #ff6a00), var(--accent-light, #ff8c38));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 14px 12px;
    direction: ltr;
    display: inline-block;
}

.product-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 14px 14px;
    margin-top: auto;
}

.qty-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border, #dbe2ea);
    border-radius: 10px;
    background: var(--surface-2, #eef2ff);
    color: var(--text, #1f2937);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.qty-btn:hover:not(:disabled) {
    border-color: var(--primary, #2563eb);
    background: rgba(37, 99, 235, 0.1);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--border, #dbe2ea);
    border-radius: 10px;
    background: var(--surface, #ffffff);
    color: var(--text, #1f2937);
    font-weight: 700;
    font-size: 1rem;
    -moz-appearance: textfield;
    outline: none;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary, #2563eb), var(--primary-light, #3b82f6));
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.25s ease;
}

.add-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.add-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #e2e8f0;
    color: #94a3b8;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    background: var(--surface, #ffffff);
    border: 1px dashed var(--border, #dbe2ea);
    border-radius: var(--radius-md, 16px);
    color: var(--text-light, #64748b);
    font-size: 1.1rem;
}

.no-results strong {
    color: var(--accent, #ff6a00);
}

/* PRODUCTS TABLET */

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        padding: 18px 16px;
    }
    .product-card {
        border-radius: 18px;
    }
    .product-image {
        height: 180px;
        padding: 16px;
    }
    .product-name {
        font-size: 0.9rem;
        margin: 0 12px 4px;
    }
    .product-stock {
        margin: 10px 12px 4px;
        font-size: 0.68rem;
    }
    .product-form {
        padding: 0 12px 12px;
        gap: 8px;
    }
    .qty-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .qty-input {
        width: 50px;
        height: 36px;
        font-size: 0.9rem;
    }
    .add-btn {
        height: 44px;
        font-size: 0.82rem;
    }
}

/* PRODUCTS MOBILE */

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px 10px;
    }
    .product-card {
        border-radius: 14px;
    }
    .product-image {
        height: 130px;
        padding: 10px;
    }
    .product-name {
        font-size: 0.75rem;
        margin: 0 8px 4px;
        min-height: 2.2em;
        -webkit-line-clamp: 2;
    }
    .product-price {
        font-size: 1rem;
        margin: 0 8px 6px;
    }
    .product-stock {
        margin: 6px 8px 2px;
        font-size: 0.6rem;
        padding: 3px 8px;
    }
    .product-form {
        padding: 0 8px 8px;
        gap: 6px;
    }
    .qty-row {
        gap: 6px;
    }
    .qty-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    .qty-input {
        width: 40px;
        height: 30px;
        font-size: 0.78rem;
        border-radius: 8px;
    }
    .add-btn {
        height: 36px;
        font-size: 0.72rem;
        border-radius: 8px;
    }
    .product-card:hover {
        transform: translateY(-3px);
    }
    .product-card:hover .product-image img {
        transform: scale(1.05);
    }
}

@media (max-width: 380px) {
    .products-grid {
        gap: 8px;
        padding: 8px 6px;
    }
    .product-image {
        height: 110px;
        padding: 8px;
    }
    .product-name {
        font-size: 0.68rem;
    }
    .qty-btn {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
    .qty-input {
        width: 34px;
        height: 26px;
        font-size: 0.7rem;
    }
    .add-btn {
        height: 32px;
        font-size: 0.65rem;
    }
}

/* PRODUCT TABLE */

.product-table {
    width: calc(100% - 24px);
    margin: 0 12px 8px;
    border-collapse: collapse;
    background: transparent;
}

.product-table td {
    padding: 8px 14px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent, #ff6a00);
    border-bottom: 1px solid var(--border, #dbe2ea);
}

[data-theme="dark"] .product-table td {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 992px) {
    .product-table td {
        padding: 6px 10px;
        font-size: 14px;
    }
    .product-table {
        width: calc(100% - 20px);
        margin: 0 10px 6px;
    }
}

@media (max-width: 600px) {
    .product-table td {
        padding: 4px 8px;
        font-size: 12px;
    }
    .product-table {
        width: calc(100% - 14px);
        margin: 0 7px 4px;
    }
}

@media (max-width: 380px) {
    .product-table td {
        padding: 3px 6px;
        font-size: 11px;
    }
    .product-table {
        width: calc(100% - 10px);
        margin: 0 5px 3px;
    }
}

/* ==========================================================
   PREFERS REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .category-carousel-item:hover {
        transform: none;
    }
    .category-carousel-item:hover .category-image img {
        transform: none;
    }
    .product-card:hover {
        transform: translateY(-2px);
    }
    .product-card:hover .product-image img {
        transform: none;
    }
}

/* ==========================================================
   MODERN FILTER PANEL (גרסה אחת נקייה)
========================================================== */

.filter-toggle-area {
    position: relative;
    z-index: 40;
    width: 100%;
    max-width: 1400px;
    margin: 24px auto 14px;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
}

.filter-toggle-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 22px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: 0;
    border-radius: 13px;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.filter-toggle-btn .filter-arrow {
    transition: transform 0.22s ease;
}

.filter-toggle-btn.active .filter-arrow {
    transform: rotate(180deg);
}

/* PANEL */

#filterPanel {
    position: relative;
    z-index: 35;
    width: calc(100% - 40px);
    max-width: 1400px;
    display: none;
    margin: 0 auto 28px;
    padding: 24px;
    overflow: visible;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 22px;
    box-sizing: border-box;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.11);
}

#filterPanel.active,
#filterPanel.is-open {
    display: block;
}

/* HEADER */

#filterPanel .filter-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 22px;
}

#filterPanel .filter-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 900;
}

#filterPanel .product-count-badge {
    padding: 7px 12px;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

/* GRID */
.grid-container {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(290px, 1.4fr) minmax(220px, 1fr) auto;
  width: 100%; /* מתיחה לכל רוחב האב */
  max-width: 1400px; /* אופציונלי: הגבלת רוחב מקסימלי למסכים ענקיים */
  gap: 20px; /* הוספת מרווח אופקי ואנכי בין העמודות */
}


#filterPanel .filter-grid {
    width: 100%;
    display: grid;
    
    align-items: end;
    gap: 18px;
    margin: 0;
    padding: 0;
    overflow: visible;
    box-sizing: border-box;
}

#filterPanel .filter-box {
    position: relative;
    min-width: 0;
    display: block;
    margin: 0;
    padding: 0;
    overflow: visible;
}

#filterPanel .filter-box>label {
    display: block;
    margin: 0 0 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

/* CUSTOM SELECT (קטגוריות) */

#categorySelect {
    position: relative;
    z-index: 100;
    width: 100%;
}

#categorySelect .select-header {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

#categorySelect.open .select-header {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

#categorySelect .select-header .arrow {
    transition: transform 0.25s ease;
}

#categorySelect.open .select-header .arrow {
    transform: rotate(180deg);
}

#categorySelect .select-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 99999;
    display: none;
    max-height: 300px;
    padding: 7px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    box-sizing: border-box;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.20);
}

#categorySelect.open .select-menu,
#categorySelect .select-menu.active {
    display: block;
}

#categorySelect .select-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    color: #334155;
    background: transparent;
    border-radius: 9px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

#categorySelect .select-item:hover {
    color: #1d4ed8;
    background: #eff6ff;
}

#categorySelect .select-item.active {
    color: #ffffff;
    background: #2563eb;
}

/* PRICE */

#filterPanel .price-modern {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 10px;
}

#filterPanel .price-field {
    min-width: 0;
}

#filterPanel .price-field span {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

#filterPanel .price-modern input,
#filterPanel .modern-sort {
    width: 100%;
    min-height: 50px;
    padding: 10px 12px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-sizing: border-box;
    font: inherit;
    font-size: 14px;
}

#filterPanel .price-modern input:focus,
#filterPanel .modern-sort:focus {
    outline: 0;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

#filterPanel .price-line {
    padding-bottom: 14px;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 900;
}

/* ACTIONS */

#filterPanel .filter-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

#filterPanel .modern-filter-submit,
#filterPanel .modern-reset {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 12px;
    box-sizing: border-box;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

#filterPanel .modern-filter-submit {
    color: #ffffff;
    background: #2563eb;
    border: 0;
    cursor: pointer;
}

#filterPanel .modern-reset {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #dbe3ee;
}

/* FILTER TABLET */

@media (max-width: 1050px) {
    #filterPanel .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* FILTER MOBILE */

@media (max-width: 650px) {
    .filter-toggle-area {
        padding: 0 12px;
    }
    #filterToggleBtn {
        width: 100%;
    }
    #filterPanel {
        width: calc(100% - 24px);
        padding: 18px 14px;
    }
    #filterPanel .filter-header {
        align-items: flex-start;
        flex-direction: column;
    }
    #filterPanel .filter-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    #filterPanel .filter-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    #categorySelect .select-menu {
        max-height: 260px;
    }
}

/* ==========================================================
   MODAL
========================================================== */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 99999;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: min(520px, 95%);
    background: #1b2434;
    color: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.image-drop-zone {
    border: 2px dashed #3b82f6;
    border-radius: 18px;
    padding: 45px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.image-drop-zone:hover {
    background: #22314d;
}

.cart-items {
    max-height: 420px;
    overflow: auto;
}

.checkout-btn {
    width: 100%;
    height: 50px;
    border-radius: 14px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
}

/* ==========================================================
   IMAGE SEARCH MODAL
========================================================== */

.image-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    overflow: hidden;
}

.image-search-box {
    width: min(520px, 95vw);
    max-height: 90vh;
    overflow: hidden;
    background: #111827;
    border: 1px solid rgba(0, 255, 120, 0.3);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 0 40px rgba(0, 255, 120, 0.25);
    display: flex;
    flex-direction: column;
}

.image-search-box h3 {
    margin: 0 0 10px;
    color: #00ff88;
    text-align: center;
}

.image-drop-zone {
    flex-shrink: 0;
    height: 160px;
    border: 2px dashed #00ff88;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin: 15px 0;
}

.image-drop-zone:hover {
    background: rgba(0, 255, 120, 0.08);
}

.image-preview {
    max-height: 200px;
    overflow: hidden;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 12px;
}

.image-search-results {
    margin-top: 15px;
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
}

.image-search-results::-webkit-scrollbar {
    width: 8px;
}

.image-search-results::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 10px;
}

.image-result-item {
    background: #1f2937;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.2s;
}

.image-result-item:hover {
    transform: translateY(-2px);
    border-color: #00ff88;
}

.image-result-item img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 10px;
}

.image-search-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #00ff88;
    color: #001;
    font-weight: 800;
    cursor: pointer;
    margin-top: 15px;
}

.image-search-submit:hover {
    filter: brightness(1.1);
}

.close-image-search {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* ==========================================================
   CART DRAWER
========================================================== */

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    height: 100%;
    background: #111827;
    color: white;
    z-index: 9998;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    transition: 0.35s;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.cart-drawer-header button {
    background: none;
    border: 0;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
}

.cart-drawer-items {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid #333;
}

.cart-total-box {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    margin-bottom: 20px;
}

.checkout-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    padding: 15px;
    border-radius: 15px;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 600px) {
    .cart-drawer {
        width: 100%;
    }
}

/* ==========================================================
   CYBERTECH PC — FINAL SAFE INTEGRATION
   Clean, scoped fixes only. No global layout displacement.
========================================================== */

/* ----------------------------------------------------------
   Header integration
---------------------------------------------------------- */

.header {
    isolation: isolate;
}

.header .header-logo,
.header .search-box,
.header .header-actions {
    min-width: 0;
}

.header .search-box {
    position: relative;
}

.header .search-wrapper {
    width: 100%;
}

.header .header-actions {
    flex-shrink: 0;
}

.header .header-link,
.header .theme-toggle {
    position: relative;
}

/*
 * The user requested removal of the detached red cart counter.
 * This affects only the badge inside the site header.
 */


/* Search results must float below the search field, not alter page layout. */
.header #searchResults,
.header #searchSuggestions {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 5000;
    max-height: 380px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ----------------------------------------------------------
   Filter panel — one normal in-flow component
---------------------------------------------------------- */

#filterForm {
    position: relative;
    z-index: 35;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
}

#filterPanel {
    float: none;
    clear: both;
}

#filterPanel.active,
#filterPanel.is-open,
#filterPanel.open {
    display: block;
}

#filterPanel:not(.active):not(.is-open):not(.open) {
    display: none;
}

/* Category dropdown is closed until JavaScript opens it. */
#categorySelect .select-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 9999;

    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    width: 100%;
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
}

#categorySelect.open .select-menu,
#categorySelect .select-menu.active,
#categorySelect .select-menu.open {
    display: block;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ----------------------------------------------------------
   Restore normal category and product layout
---------------------------------------------------------- */

.categories-home,
.categories-carousel-wrapper,
.categories-carousel,
.products-grid,
#productsGrid {
    float: none;
    clear: both;
    transform: none;
    visibility: visible;
    opacity: 1;
}

.categories-home {
    display: block;
}

.products-grid,
#productsGrid {
    display: grid;
}

/* ----------------------------------------------------------
   Dark theme filter compatibility
---------------------------------------------------------- */

[data-theme="dark"] #filterPanel {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] #filterPanel .filter-header h3,
[data-theme="dark"] #filterPanel .filter-box > label,
[data-theme="dark"] #categorySelect .select-header,
[data-theme="dark"] #filterPanel .price-modern input,
[data-theme="dark"] #filterPanel .modern-sort {
    color: var(--text);
}

[data-theme="dark"] #categorySelect .select-header,
[data-theme="dark"] #categorySelect .select-menu,
[data-theme="dark"] #filterPanel .price-modern input,
[data-theme="dark"] #filterPanel .modern-sort {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] #categorySelect .select-item {
    color: var(--text-light);
}

[data-theme="dark"] #categorySelect .select-item:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.25);
}

/* ----------------------------------------------------------
   Responsive header aligned to the existing HTML
---------------------------------------------------------- */

@media (max-width: 992px) {
    .header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
    }

    .header .search-box {
        grid-column: 1 / -1;
        order: initial;
    }
}

@media (max-width: 768px) {
    .header {
        grid-template-columns: 1fr auto;
    }

    .header .header-logo {
        grid-column: 1;
        grid-row: 1;
    }

    .header .header-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .header .search-box {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .header .header-link span:not(.icon),
    .header .theme-toggle #themeLabel {
        display: none;
    }

    .header .header-link,
    .header .theme-toggle {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 650px) {
    #filterPanel .filter-grid {
        grid-template-columns: 1fr;
    }

    #filterPanel .filter-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================
   PRODUCT PRICE — REMOVE LEGACY DUPLICATE
   Keep the main price shown after .product-name.
========================================================== */

/* Legacy markup sometimes renders an extra price directly after the image. */
.product-card > .product-image + .product-price,
.product-card > .product-stock + .product-image + .product-price {
    display: none !important;
}

/* ==========================================================
   PRODUCT FACET SIDEBAR — BRAND + SERIES
========================================================== */

.products-with-facets {
    width: min(1320px, calc(100% - 40px));
    margin: 0 auto 42px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    direction: rtl;
}

.products-with-facets > .products-grid,
.products-with-facets > #productsGrid {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    direction: rtl;
    transition: opacity .18s ease, transform .18s ease;
}

.products-with-facets.is-filtering > .products-grid {
    opacity: .48;
    transform: translateY(4px);
    pointer-events: none;
}

.product-facet-sidebar {
    position: sticky;
    top: 96px;
    z-index: 20;
    min-width: 0;
    color: #0f172a;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .09);
    overflow: hidden;
}

.facet-mobile-toggle {
    display: none;
}

.facet-sidebar-body {
    padding: 20px;
}

.facet-sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.facet-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
}

.facet-sidebar-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.35;
}

.facet-result-count {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 900;
}

.facet-group {
    padding: 18px 0;
    border-bottom: 1px solid #e2e8f0;
}

.facet-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 11px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 900;
}

.facet-group-title small {
    min-width: 25px;
    padding: 2px 7px;
    text-align: center;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 11px;
}

.facet-options {
    max-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-left: 4px;
    overflow-y: auto;
    scrollbar-width: thin;
      bar-color: #cbd5e1 transparent;
}

.facet-option {
    min-height: px;
    display: grid;
    grid-template-columns: 21px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    color: #475569;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.facet-option:hover {
    color: #1d4ed8;
    background: #f8fafc;
    border-color: #dbeafe;
}

.facet-option.is-checked {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.facet-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.facet-square {
    width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.facet-option input:checked + .facet-square {
    background: #2563eb;
    border-color: #2563eb;
    transform: scale(1.04);
}

.facet-option input:checked + .facet-square::after {
    content: "✓";
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.facet-option input:focus-visible + .facet-square {
    outline: 3px solid rgba(37, 99, 235, .25);
    outline-offset: 2px;
}

.facet-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 750;
}

.facet-count {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
}

.facet-empty {
    margin: 0;
    padding: 10px;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 9px;
    font-size: 12px;
}

.facet-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-top: 17px;
}

.facet-reset {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #f1f5f9;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}

.facet-reset:hover {
    color: #b91c1c;
    background: #fff1f2;
    border-color: #fecdd3;
}

.facet-auto-note {
    color: #64748b;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}

.facet-active-badge {
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #2563eb;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

[data-theme="dark"] .product-facet-sidebar {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .facet-sidebar-header,
[data-theme="dark"] .facet-group {
    border-color: var(--border);
}

[data-theme="dark"] .facet-sidebar-header h2,
[data-theme="dark"] .facet-group-title {
    color: #ffffff;
}

[data-theme="dark"] .facet-option {
    color: var(--text-light);
}

[data-theme="dark"] .facet-option:hover,
[data-theme="dark"] .facet-option.is-checked {
    color: #93c5fd;
    background: rgba(37, 99, 235, .16);
    border-color: rgba(96, 165, 250, .35);
}

[data-theme="dark"] .facet-square {
    background: var(--surface-2);
    border-color: #64748b;
}

/* Desktop: always keep five products visible in the same row. */
@media (min-width: 1181px) and (max-width: 1349px) {
    .products-with-facets > .products-grid,
    .products-with-facets > #productsGrid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Compact desktop cards: full readable title without splitting words. */
@media (min-width: 1181px) {
    .products-with-facets {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 16px;
    }

    .product-card {
        min-width: 0;
        height: 100%;
    }

    .product-image {
        height: 178px;
        padding: 14px;
    }

    .product-name {
        display: block;
        min-height: 5.8em;
        max-height: none;
        margin: 0 11px 7px;
        overflow: visible;
        font-size: 0.84rem;
        line-height: 1.45;
        text-align: center;
        direction: rtl;
        unicode-bidi: plaintext;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
        -webkit-line-clamp: unset;
        -webkit-box-orient: initial;
    }

    .product-price {
        margin-inline: 11px;
        font-size: 1.18rem;
        white-space: nowrap;
    }

    .product-stock {
        margin-inline: 11px;
        padding-inline: 9px;
        white-space: nowrap;
    }

    .product-form {
        padding-inline: 11px;
    }
}

/* Compact laptop layout: three products until there is room for four. */
@media (min-width: 1051px) and (max-width: 1180px) {
    .products-with-facets {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 16px;
    }

    .products-with-facets > .products-grid,
    .products-with-facets > #productsGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .products-with-facets {
        grid-template-columns: 235px minmax(0, 1fr);
        gap: 16px;
    }
    .products-with-facets > .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 820px) {
    .products-with-facets {
        width: calc(100% - 24px);
        display: block;
    }
    .product-facet-sidebar {
        position: relative;
        top: auto;
        margin-bottom: 16px;
        border-radius: 16px;
    }
    .facet-mobile-toggle {
        width: 100%;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 11px 15px;
        color: #fff;
        background: #fff;
        border: 0;
        font: inherit;
        font-size: 14px;
        font-weight: 900;
        cursor: pointer;
    }
    .facet-sidebar-body {
        display: none;
        padding: 16px;
        border-top: 1px solid #e2e8f0;
    }
    .product-facet-sidebar.is-mobile-open .facet-sidebar-body {
        display: block;
    }
    .products-with-facets > .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    [data-theme="dark"] .facet-mobile-toggle {
        color: #ffffff;
        background: var(--surface);
    }
}

@media (max-width: 480px) {
    .products-with-facets {
        width: calc(100% - 16px);
    }
    .products-with-facets > .products-grid {
        gap: 9px;
    }
    .facet-options {
        max-height: 220px;
    }
}

/* The correct price remains directly after the product name. */
.product-card > .product-name + .product-price {
    display: inline-block !important;
}

/* ==========================================================
   DYNAMIC PRODUCT PRICE DUPLICATE — CSS FALLBACK
========================================================== */

.product-card:has(> .product-price ~ .product-price) > .product-price:first-of-type {
    display: none !important;
}









/* ==========================================================
   SEARCH SUGGESTIONS — PREMIUM DESIGN
========================================================== */

.search-wrapper {
    position: relative;
    width: 100%;
    z-index: 3000;
}

#searchSuggestions,
#searchResults {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;

    width: 100%;
    max-height: 430px;

    display: none;
    overflow-y: auto;
    overflow-x: hidden;

    padding: 10px;

    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe3ee;
    border-radius: 16px;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.20),
        0 4px 14px rgba(15, 23, 42, 0.08);

    backdrop-filter: blur(18px);
    z-index: 99999;
    direction: rtl;
}

/* פתיחת התוצאות */
#searchSuggestions.active,
#searchSuggestions.show,
#searchResults.active,
#searchResults.show {
    display: block;
}

/* במקרה שה-JS מוסיף תוכן בלי class */
#searchSuggestions:not(:empty),
#searchResults:not(:empty) {
    display: block;
}

/* פס גלילה */
#searchSuggestions::-webkit-scrollbar,
#searchResults::-webkit-scrollbar {
    width: 7px;
}

#searchSuggestions::-webkit-scrollbar-track,
#searchResults::-webkit-scrollbar-track {
    background: transparent;
}

#searchSuggestions::-webkit-scrollbar-thumb,
#searchResults::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

/* פריט תוצאה */
.search-suggestion,
.search-result-item,
.suggestion-item {
    width: 100%;
    min-height: 92px;

    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;

    padding: 10px 12px;
    margin-bottom: 7px;

    color: #1e293b;
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 13px;

    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.search-suggestion:last-child,
.search-result-item:last-child,
.suggestion-item:last-child {
    margin-bottom: 0;
}

.search-suggestion:hover,
.search-result-item:hover,
.suggestion-item:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

/* תמונת מוצר */
.search-suggestion img,
.search-result-item img,
.suggestion-item img {
    width: 78px;
    height: 72px;

    display: block;
    object-fit: contain;

    padding: 5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

/* אזור הטקסט */
.search-suggestion-info,
.search-result-info,
.suggestion-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* שם המוצר */
.search-suggestion-name,
.search-result-name,
.suggestion-name {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 800;

    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* מחיר */
.search-suggestion-price,
.search-result-price,
.suggestion-price {
    color: #2563eb;
    font-size: 15px;
    font-weight: 900;
    direction: ltr;
    text-align: right;
}

/* כפתור או חץ */
.search-suggestion-action,
.search-result-action,
.suggestion-action {
    min-width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    background: #2563eb;
    border-radius: 10px;

    font-size: 16px;
    font-weight: 900;
}

/* הודעה כאשר אין תוצאות */
.search-no-results,
.no-search-results {
    padding: 24px 16px;
    color: #64748b;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}

/* מצב טעינה */
.search-loading {
    padding: 20px;
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

/* ==========================================================
   DARK MODE
========================================================== */

[data-theme="dark"] #searchSuggestions,
[data-theme="dark"] #searchResults {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .search-suggestion,
[data-theme="dark"] .search-result-item,
[data-theme="dark"] .suggestion-item {
    color: #ffffff;
    background: #172033;
}

[data-theme="dark"] .search-suggestion:hover,
[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .suggestion-item:hover {
    background: #1e3a5f;
    border-color: rgba(96, 165, 250, 0.45);
}

[data-theme="dark"] .search-suggestion img,
[data-theme="dark"] .search-result-item img,
[data-theme="dark"] .suggestion-item img {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .search-suggestion-name,
[data-theme="dark"] .search-result-name,
[data-theme="dark"] .suggestion-name {
    color: #ffffff;
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 768px) {

    #searchSuggestions,
    #searchResults {
        top: calc(100% + 7px);
        max-height: 360px;
        padding: 7px;
        border-radius: 13px;
    }

    .search-suggestion,
    .search-result-item,
    .suggestion-item {
        min-height: 76px;
        grid-template-columns: 62px minmax(0, 1fr) auto;
        gap: 9px;
        padding: 8px;
        border-radius: 10px;
    }

    .search-suggestion img,
    .search-result-item img,
    .suggestion-item img {
        width: 62px;
        height: 58px;
        border-radius: 9px;
    }

    .search-suggestion-name,
    .search-result-name,
    .suggestion-name {
        font-size: 12px;
    }

    .search-suggestion-price,
    .search-result-price,
    .suggestion-price {
        font-size: 13px;
    }

    .search-suggestion-action,
    .search-result-action,
    .suggestion-action {
        min-width: 30px;
        height: 30px;
        font-size: 14px;
    }
}



/* קישור העגלה הוא נקודת העיגון של תג הכמות */
.header .cart-header-link,
.header a[href*="cart"] {
    position: relative !important;
    overflow: visible !important;
}

/* מיקום תג הכמות ליד העגלה */
.header .cart-badge {
    position: absolute !important;

    top: -7px !important;
    left: -7px !important;
    right: auto !important;
    bottom: auto !important;

    min-width: 20px;
    height: 20px;
    padding: 0 5px;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    background: #ef4444;
    color: #fff;

    font-size: 11px;
    line-height: 1;
    font-weight: 900;

    z-index: 10;
    pointer-events: none;
}

/* ==========================================================
   FINAL SNOW-WHITE GLASS HEADER
   Targets the existing .header directly — no HTML class needed.
========================================================== */
html body .header,
html[data-theme="dark"] body .header {
    position: sticky !important;
    top: 10px !important;
    z-index: 1200 !important;
    isolation: isolate;

    width: min(1220px, calc(100% - 28px)) !important;
    min-height: 68px !important;
    margin: 10px auto 18px !important;
    padding: 9px 15px !important;

    display: grid !important;
    grid-template-columns: auto minmax(300px, 1fr) auto !important;
    align-items: center !important;
    gap: 20px !important;

    color: #172033 !important;
 background: linear-gradient(135deg, rgba(255,255,255, 0.05), rgba(240,247,255, 0.05)),
              rgba(255,255,255, 0.10) !important;
              
  /* אפקט טשטוש חזק (הכרחי כדי שהתוכן מאחור לא יפריע לעיניים) */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  /* מסגרת לבנה עדינה מאוד שמסמנת את גבולות הכרטיס */
  border: 1px solid rgba(255, 255, 255, 0.15);
  
  /* הפינות המעוגלות שלך */
  border-radius: 39px;

    -webkit-backdrop-filter: blur(26px) saturate(170%) !important;
    backdrop-filter: blur(26px) saturate(170%) !important;

    box-shadow:
        0 16px 38px rgba(30,41,59,.14),
        inset 0 1px 0 rgba(255,255,255,1),
        inset 0 -1px 0 rgba(148,163,184,.12) !important;
}

html body .header::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
    background:
        radial-gradient(circle at 18% 0%, rgba(255,255,255,.98), transparent 34%),
        linear-gradient(112deg, transparent 24%, rgba(255,255,255,.44) 50%, transparent 72%);
}

html body .header .header-logo,
html[data-theme="dark"] body .header .header-logo {
    color: #111827 !important;
}

html body .header .header-logo-copy strong,
html[data-theme="dark"] body .header .header-logo-copy strong {
    color: #111827 !important;
}

html body .header .header-logo-copy small,
html[data-theme="dark"] body .header .header-logo-copy small {
    color: #64748b !important;
}

html body .header .header-logo-mark {
    color: #fff !important;
    background: linear-gradient(145deg, #2563eb, #1d4ed8) !important;
    border: 1px solid rgba(255,255,255,.95) !important;
    box-shadow: 0 7px 16px rgba(37,99,235,.24), inset 0 1px 0 rgba(255,255,255,.35) !important;
}

html body .header .search-box {
    position: relative;
    width: 100% !important;
    min-width: 0;
}

html body .header .search-wrapper input,
html[data-theme="dark"] body .header .search-wrapper input {
    width: 100% !important;
    height: 46px !important;
    padding: 0 17px 0 52px !important;
    color: #111827 !important;
    background: rgb(255 255 255 / 50%) !important;
    border: 1px solid rgba(148,163,184,.32) !important;
    border-radius: 13px !important;
    -webkit-backdrop-filter: blur(12px) saturate(130%) !important;
    backdrop-filter: blur(12px) saturate(130%) !important;
    box-shadow: inset 0 1px 0 #fff, 0 5px 14px rgba(30,41,59,.075) !important;
	opacity:0.80;
}

html body .header .search-wrapper input::placeholder {
    color: #64748b !important;
}

html body .header .search-wrapper input:focus {
    border-color: rgba(37,99,235,.72) !important;
    box-shadow: 0 0 0 4px rgba(37,99,235,.11), inset 0 1px 0 #fff !important;
}

html body .header .camera-btn {
    left: 6px !important;
    width: 34px !important;
    height: 34px !important;
    color: #fff !important;
    background: #2563eb !important;
    border-radius: 9px !important;
    box-shadow: 0 6px 14px rgba(37,99,235,.25) !important;
}

html body .header .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

html body .header .header-icon-link,
html body .header .header-link,
html body .header .theme-toggle,
html[data-theme="dark"] body .header .header-icon-link,
html[data-theme="dark"] body .header .header-link,
html[data-theme="dark"] body .header .theme-toggle {
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 9px !important;
    color: #334155 !important;
    background: rgba(255,255,255,.54) !important;
    border: 1px solid rgba(148,163,184,.20) !important;
    border-radius: 11px !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95) !important;
}

html body .header .header-icon-link:hover,
html body .header .header-link:hover,
html body .header .theme-toggle:hover {
    color: #1d4ed8 !important;
    background: rgba(255,255,255,.92) !important;
    border-color: rgba(37,99,235,.24) !important;
}

html body .header .whatsapp-link { color: #059669 !important; }
html body .header .header-action-divider { background: rgba(100,116,139,.25) !important; }
html body .header .cart-badge { border: 2px solid #fff !important; }

@media (max-width: 768px) {
    html body .header,
    html[data-theme="dark"] body .header {
        width: calc(100% - 16px) !important;
        top: 6px !important;
        grid-template-columns: 1fr auto !important;
        gap: 8px 10px !important;
        padding: 8px 10px !important;
        border-radius: 14px !important;
    }

    html body .header .header-logo { grid-column: 1; grid-row: 1; }
    html body .header .header-actions { grid-column: 2; grid-row: 1; }
    html body .header .search-box { grid-column: 1 / -1; grid-row: 2; }
    html body .header .header-link span:not(.icon),
    html body .header .theme-toggle #themeLabel { display: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
    html body .header { background: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

.scroll {
  position:absolute;
  display: flex;
  flex-direction: row; /* ברירת מחדל */
  justify-content: flex-start; /* הצמדה אופקית להתחלה */
  align-items: flex-end;      /* הצמדה אנכית לתחתית */
  direction: rtl;
  background: transparent !important;
  right:-5.5%;
}
/* התאמה למובייל (מסכים קטנים מ-768 פיקסלים) */
@media (max-width: 768px) {
  .my-element {
    right: 0; /* הצמדה לגבול הימני ללא חריגה */
    /* או ערך קטן יותר כמו: right: -2%; */
  }
}

.bottom-image {
 
    width: 380px !important;

}


.hero-slider {
    position: relative;
    height: 400px;
    min-height: 0;
    padding: 14px;

    border-radius: 26px !important;
    overflow: hidden !important;
}

.hero-slider .slide {
    position: absolute;
    inset: 14px;

    border-radius: 20px !important;
    overflow: hidden !important;
}

.hero-slider .slide .slider-image {
    position: absolute !important;
    inset: 0 !important;

    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover;
    border-radius: 20px !important;
    clip-path: inset(0 round 20px);

    transform: none !important;
}

/* מבטל הגדלה שמסתירה את הפינות */
.hero-slider .slide.active .slider-image {
    transform: none !important;
}

/* ==========================================================
   FINAL MOBILE PRODUCTS — ALWAYS TWO CARDS PER ROW
========================================================== */
@media (max-width: 600px) {
    html body .products-with-facets,
    html body #productsArea {
        width: calc(100% - 14px) !important;
        max-width: 100% !important;
        margin-inline: auto !important;
        display: block !important;
    }

    html body .products-with-facets > .products-grid,
    html body .products-with-facets > #productsGrid,
    html body #productsArea > #productsGrid {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    html body #productsGrid > .product-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

/* ==========================================================
   FINAL CATEGORY VISIBILITY — DESKTOP, TABLET AND MOBILE
========================================================== */

/* במחשב אין כפתור פתיחה: טבלת הסינון מוצגת ישירות. */
html body .smart-filter-toggle-wrap,
html body #smartFilterToggle {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (min-width: 601px) {
    html body #productFacetSidebar {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

html body section.categories-home {
    position: relative !important;
    z-index: 5 !important;
    width: min(1400px, calc(100% - 24px)) !important;
    max-width: 1400px !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 190px !important;
    max-height: none !important;
    margin: 18px auto 34px !important;
    padding: 0 14px !important;
    display: block !important;
    float: none !important;
    clear: both !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    transform: none !important;
}

html body section.categories-home .categories-carousel-wrapper {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 185px !important;
    padding: 0 52px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden !important;
}

html body section.categories-home #categoriesCarousel {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 180px !important;
    margin: 0 !important;
    padding: 8px 4px 14px !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: stretch !important;
    gap: 14px !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    scroll-snap-type: x proximity !important;
    scrollbar-width: thin !important;
    scrollbar-color: #93c5fd transparent !important;
    -webkit-overflow-scrolling: touch;
    transform: none !important;
}

html body section.categories-home #categoriesCarousel::-webkit-scrollbar {
    display: block !important;
    height: 6px !important;
}

html body section.categories-home #categoriesCarousel::-webkit-scrollbar-track {
    background: transparent !important;
}

html body section.categories-home #categoriesCarousel::-webkit-scrollbar-thumb {
    background: #93c5fd !important;
    border-radius: 999px !important;
}

html body section.categories-home #categoriesCarousel > .category-carousel-item {
    position: relative !important;
    flex: 0 0 210px !important;
    width: 210px !important;
    min-width: 210px !important;
    max-width: 210px !important;
    min-height: 165px !important;
    margin: 0 !important;
    padding: 12px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden !important;
    color: var(--text, #1f2937) !important;
    background: var(--surface, #fff) !important;
    border: 1px solid var(--border, #dbe2ea) !important;
    border-radius: 17px !important;
    box-shadow: 0 5px 17px rgba(15, 23, 42, .09) !important;
    scroll-snap-align: start !important;
    transform: none !important;
}

html body section.categories-home #categoriesCarousel .category-image {
    width: 100% !important;
    height: 104px !important;
    min-height: 104px !important;
    margin: 0 0 6px !important;
    padding: 5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden !important;
}

html body section.categories-home #categoriesCarousel .category-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
    object-fit: contain !important;
    transform: none !important;
}

html body section.categories-home #categoriesCarousel .category-info {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: center !important;
}

html body section.categories-home .carousel-arrow {
    position: absolute !important;
    top: 50% !important;
    z-index: 40 !important;
    width: 40px !important;
    height: 46px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(-56%) !important;
}

html body section.categories-home .carousel-arrow-left {
    left: 4px !important;
}

html body section.categories-home .carousel-arrow-right {
    right: 4px !important;
}

/* טאבלט — שלוש כרטיסיות קטגוריה נראות במקביל. */
@media (min-width: 601px) and (max-width: 992px) {
    html body section.categories-home #categoriesCarousel > .category-carousel-item {
        flex-basis: calc((100% - 28px) / 3) !important;
        width: calc((100% - 28px) / 3) !important;
        min-width: calc((100% - 28px) / 3) !important;
        max-width: calc((100% - 28px) / 3) !important;
    }
}

/* מובייל — שתי קטגוריות ושני מוצרים בשורה, ללא ממשקי סינון. */
@media (max-width: 600px) {
    html body .quick-filter-toggle-wrap,
    html body #quickFilterSection,
    html body .filter-toggle-area,
    html body #filterPanel {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* במובייל טבלת המותגים והסדרות מוסתרת לחלוטין. */
    html body #productFacetSidebar,
    html body #productFacetSidebar[hidden],
    html body #productFacetSidebar:not([hidden]) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* כותרת מובייל: הלוגו נשאר מלא ותג העגלה אינו מוסתר. */
    html body .header,
    html[data-theme="dark"] body .header {
        grid-template-columns: minmax(0, 1fr) auto !important;
        overflow: visible !important;
    }

    html body .header .header-logo {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        display: grid !important;
        grid-template-columns: 32px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 7px !important;
        overflow: visible !important;
        white-space: nowrap !important;
    }

    html body .header .header-logo-mark {
        width: 32px !important;
        min-width: 32px !important;
        height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 9px !important;
        font-size: .72rem !important;
    }

    html body .header .header-logo-copy {
        min-width: 0 !important;
        width: auto !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
        gap: 0 !important;
        overflow: visible !important;
        white-space: nowrap !important;
        text-overflow: clip !important;
    }

    html body .header .header-logo-copy strong,
    html body .header .header-logo-copy small {
        width: auto !important;
        max-width: none !important;
        display: block !important;
        overflow: visible !important;
        white-space: nowrap !important;
        text-overflow: clip !important;
        line-height: 1.12 !important;
    }

    html body .header .header-logo-copy strong {
        font-size: .82rem !important;
    }

    html body .header .header-logo-copy small {
        margin-top: 2px !important;
        font-size: .56rem !important;
        letter-spacing: .02em !important;
    }

    html body .header .header-actions {
        min-width: 0 !important;
        max-width: max-content !important;
        gap: 3px !important;
        overflow: visible !important;
    }

    html body .header .header-actions .header-icon-link,
    html body .header .header-actions .header-link,
    html body .header .header-actions .theme-toggle {
        position: relative !important;
        flex: 0 0 36px !important;
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    html body .header .header-actions .header-action-divider {
        display: none !important;
    }

    html body .header .header-actions .cart-header-link > .cart-badge,
    html body .header .header-actions .header-link > .cart-badge {
        position: absolute !important;
        top: -8px !important;
        right: auto !important;
        bottom: auto !important;
        left: -8px !important;
        z-index: 100 !important;
        min-width: 20px !important;
        width: auto !important;
        height: 20px !important;
        padding: 0 5px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: visible !important;
        color: #fff !important;
        background: #ef4444 !important;
        border: 2px solid #fff !important;
        border-radius: 999px !important;
        font-size: 10px !important;
        line-height: 1 !important;
        font-weight: 900 !important;
        pointer-events: none !important;
    }

    /* מסתירים רק את המילה עגלה — לעולם לא את מונה הפריטים. */
    html body .header .cart-header-link > span:not(.icon):not(.cart-badge) {
        display: none !important;
    }

    /* ======================================================
       MOBILE HERO SLIDER — FRAME NEVER EXCEEDS THE SCREEN
    ====================================================== */
    html body .premium-hero {
        width: calc(100% - 14px) !important;
        max-width: calc(100% - 14px) !important;
        min-width: 0 !important;
        height: auto !important;
        max-height: none !important;
        margin: 12px auto 20px !important;
        padding: 13px !important;
        gap: 14px !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        overflow: hidden !important;
        border-radius: 17px !important;
        box-sizing: border-box !important;
    }

    html body .premium-hero .premium-left,
    html body .premium-hero .premium-right {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    html body .premium-hero .premium-right {
        padding: 0 !important;
        display: block !important;
        overflow: hidden !important;
        border-radius: 15px !important;
    }

    /* המסגרת החיצונית עוטפת את כל הסליידר ולא חורגת ממנו. */
    html body .premium-hero .hero-slider-box,
    html body .premium-hero .slider-wrapper {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 5px !important;
        display: block !important;
        overflow: hidden !important;
        background: rgba(255, 255, 255, .055) !important;
        border: 1px solid rgba(147, 197, 253, .48) !important;
        border-radius: 16px !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 22px rgba(2,8,23,.2) !important;
        box-sizing: border-box !important;
    }

    html body .premium-hero .hero-slider {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 238px !important;
        min-height: 238px !important;
        max-height: 238px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        overflow: hidden !important;
        background-size: cover !important;
        background-position: center !important;
        border: 0 !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
    }

    html body .premium-hero .hero-slider .slide {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px 10px 62px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }

    html body .premium-hero .hero-slider .slide img,
    html body .premium-hero .hero-slider .slide .slider-image {
        position: static !important;
        inset: auto !important;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        object-fit: contain !important;
        object-position: center !important;
        border-radius: 9px !important;
        clip-path: none !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    html body .premium-hero .hero-slider .slide-title {
        position: absolute !important;
        right: 9px !important;
        bottom: 27px !important;
        left: 9px !important;
        z-index: 12 !important;
        width: auto !important;
        max-width: calc(100% - 18px) !important;
        margin: 0 !important;
        padding: 6px 9px !important;
        overflow: hidden !important;
        border-radius: 9px !important;
        font-size: .77rem !important;
        line-height: 1.35 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    html body .premium-hero .hero-slider .slider-dots {
        bottom: 10px !important;
        max-width: calc(100% - 20px) !important;
    }

    html body .premium-hero .hero-slider .slider-progress {
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    html body section.categories-home {
        width: calc(100% - 12px) !important;
        min-height: 145px !important;
        margin: 12px auto 24px !important;
        padding: 0 4px !important;
    }

    html body section.categories-home .categories-carousel-wrapper {
        min-height: 142px !important;
        padding-inline: 36px !important;
    }

    html body section.categories-home #categoriesCarousel {
        min-height: 138px !important;
        gap: 8px !important;
        padding: 5px 2px 11px !important;
    }

    html body section.categories-home #categoriesCarousel > .category-carousel-item {
        flex-basis: calc((100% - 8px) / 2) !important;
        width: calc((100% - 8px) / 2) !important;
        min-width: calc((100% - 8px) / 2) !important;
        max-width: calc((100% - 8px) / 2) !important;
        min-height: 125px !important;
        padding: 7px 5px 8px !important;
        border-radius: 13px !important;
    }

    html body section.categories-home #categoriesCarousel .category-image {
        height: 76px !important;
        min-height: 76px !important;
        padding: 3px !important;
    }

    html body section.categories-home #categoriesCarousel .category-info h3 {
        font-size: .72rem !important;
        line-height: 1.25 !important;
    }

    html body section.categories-home #categoriesCarousel .category-info p {
        font-size: .6rem !important;
    }

    html body section.categories-home .carousel-arrow {
        width: 29px !important;
        height: 38px !important;
    }

    html body .products-with-facets,
    html body #productsArea {
        display: block !important;
        grid-template-columns: none !important;
    }

    html body #productsArea > #productsGrid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


/* ==========================================================
   HERO RESPONSIVE
========================================================== */

@media (max-width: 992px) {
    .premium-hero {
        grid-template-columns: 1fr;
        padding: 26px;
    }
    .premium-left {
        text-align: center;
        align-items: center;
    }
    .hero-slider {
        min-height: 380px;
    }
    .slide img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .premium-hero {
        padding: 18px;
        gap: 20px;
        border-radius: 20px;
    }
    .premium-left h1 {
        font-size: 1.8rem;
    }
    .premium-left h2 {
        font-size: 1.15rem;
    }
    .premium-left p {
        font-size: 0.95rem;
    }
    .hero-btn {
        width: 100%;
    }
.hero-slider {
    min-height: 270px;
    border-radius: 20px;
    overflow: hidden;
}

.slide {
    border-radius: 20px;
    overflow: hidden;
}

.slide img {
    display: block;
    width: 95%;
    height: 210px;
    margin-inline: auto;

    object-fit: cover;
    border-radius: 18px !important;
}

.slide-title {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 10px 14px;

    font-size: 0.9rem;
    border-radius: 12px;
    background: rgba(40, 45, 43, 0.7);
}

.hero-slider {
    position: relative;
    height: 400px;
    min-height: 0;
    padding: 14px;

    border-radius: 26px !important;
    overflow: hidden !important;
}

.hero-slider .slide {
    position: absolute;
    inset: 14px;

    border-radius: 20px !important;
    overflow: hidden !important;
}

.hero-slider .slide .slider-image {
    position: absolute !important;
    inset: 0 !important;

    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover;
    border-radius: 20px !important;
    clip-path: inset(0 round 20px);

    transform: none !important;
}

/* מבטל הגדלה שמסתירה את הפינות */
.hero-slider .slide.active .slider-image {
    transform: none !important;
}
    .slider-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        min-height: 220px;
    }
    .slide img {
        height: 170px;
    }
    .premium-left h1 {
        font-size: 1.45rem;
    }
    .premium-left p {
        font-size: 0.88rem;
    }
    .slide-title {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 8px 12px;
        font-size: 0.82rem;
        border-radius: 10px;
        background: rgba(40, 45, 43, 0.7);
    }
}

/* ==========================================================
   PREMIUM HERO FIXES (מובייל)
========================================================== */

@media (max-width: 768px) {
    .premium-hero {
        width: min(1400px, 96%) !important;
        padding: 18px 16px !important;
        gap: 16px !important;
        border-radius: 20px !important;
        margin: 16px auto !important;
    }
    .premium-left {
        gap: 12px !important;
    }
    .premium-left h1 {
        font-size: 1.6rem !important;
    }
    .premium-left h2 {
        font-size: 1.1rem !important;
    }
    .premium-left p {
        font-size: 0.9rem !important;
        max-width: 100% !important;
    }
    .premium-buttons {
        flex-direction: column !important;
        width: 100% !important;
    }
    .hero-btn {
        width: 100% !important;
        min-width: unset !important;
        height: 46px !important;
    }
    .hero-slider {
        min-height: 250px !important;
        border-radius: 16px !important;
    }
    .slide img {
        height: 190px !important;
        width: 92% !important;
    }
    .slide-title {
        font-size: 0.85rem !important;
        padding: 10px 12px !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 14px !important;
        background: rgba(40, 45, 43, 0.7) !important;
    }
    .slider-dots {
        bottom: 10px !important;
        gap: 6px !important;
    }
    .slider-dot {
        width: 8px !important;
        height: 8px !important;
    }
}

@media (max-width: 480px) {
    .premium-hero {
        padding: 14px 12px !important;
        gap: 12px !important;
        border-radius: 16px !important;
        margin: 12px auto !important;
    }
    .premium-left h1 {
        font-size: 1.3rem !important;
    }
    .premium-left h2 {
        font-size: 1rem !important;
    }
    .premium-left p {
        font-size: 0.82rem !important;
    }
    .hero-btn {
        height: 42px !important;
        font-size: 0.85rem !important;
        border-radius: 12px !important;
    }
    .hero-slider {
        min-height: 200px !important;
    }
    .slide img {
        height: 125px !important;
    }
    .slide-title {
        font-size: 0.78rem !important;
        padding: 8px 10px !important;
    }
}

/* ==========================================================
   BODY OVERFLOW FIX
========================================================== */

@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }
    .container {
        width: 100% !important;
        padding-inline: 10px !important;
    }
}

/* ==========================================================
   CATEGORIES
========================================================== */

.categories-home {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 20px;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 36px;
}

.section-title span {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent, #ff6a00);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text, #1f2937);
}

[data-theme="dark"] .section-title h2 {
    color: #fff;
}

/* CAROUSEL WRAPPER */

.categories-carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 55px;
    width: 100%;
}

.categories-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: auto;
    scroll-snap-type: none !important;
    overflow-anchor: none;
    overscroll-behavior-inline: contain;
    padding: 10px 4px 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 100%;
}

.categories-carousel::-webkit-scrollbar {
    display: none;
}

.category-carousel-item {
    flex: 0 0 220px;
    min-width: 200px;
    max-width: 240px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #dbe2ea);
    border-radius: 20px;
    padding: 24px 16px 20px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: block;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.category-carousel-item:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--primary, #2563eb);
}

.category-carousel-item .category-image {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    margin-bottom: 10px;
}

.category-carousel-item .category-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 50%;
    transition: none;
    display: block;
}

.category-carousel-item:hover .category-image img {
    transform: none;
}

/* ==========================================================
   CATEGORY CARDS — ABSOLUTE VISUAL STABILITY
   High-specificity reset protects the carousel from legacy
   hover/active rules loaded elsewhere in the project.
========================================================== */

html body #categoriesCarousel .category-carousel-item,
html body #categoriesCarousel .category-carousel-item:hover,
html body #categoriesCarousel .category-carousel-item:focus,
html body #categoriesCarousel .category-carousel-item:focus-visible,
html body #categoriesCarousel .category-carousel-item:active {
    transform: none !important;
    translate: none !important;
    rotate: none !important;
    scale: 1 !important;
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
    backface-visibility: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

html body #categoriesCarousel .category-carousel-item .category-image,
html body #categoriesCarousel .category-carousel-item:hover .category-image,
html body #categoriesCarousel .category-carousel-item:focus .category-image,
html body #categoriesCarousel .category-carousel-item:active .category-image,
html body #categoriesCarousel .category-carousel-item .category-image img,
html body #categoriesCarousel .category-carousel-item:hover .category-image img,
html body #categoriesCarousel .category-carousel-item:focus .category-image img,
html body #categoriesCarousel .category-carousel-item:active .category-image img {
    transform: none !important;
    translate: none !important;
    rotate: none !important;
    scale: 1 !important;
    animation: none !important;
    transition: none !important;
    will-change: auto !important;
}

html body #categoriesCarousel .category-carousel-item .category-image img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

html body #categoriesCarousel.is-carousel-scrolling .category-carousel-item,
html body #categoriesCarousel.is-carousel-scrolling .category-carousel-item:hover {
    transform: none !important;
    scale: 1 !important;
    transition: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="dark"] body #categoriesCarousel .category-carousel-item,
[data-theme="dark"] body #categoriesCarousel .category-carousel-item:hover,
[data-theme="dark"] body #categoriesCarousel .category-carousel-item:focus,
[data-theme="dark"] body #categoriesCarousel .category-carousel-item:active {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.22) !important;
}

.category-carousel-item .category-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text, #1f2937);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.category-carousel-item:hover .category-info h3 {
    color: var(--primary, #2563eb);
}

.category-carousel-item .category-info p {
    font-size: 0.8rem;
    color: var(--text-light, #64748b);
    font-weight: 600;
}

[data-theme="dark"] .category-carousel-item {
    background: var(--surface, #131d31);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .category-carousel-item:hover {
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.22);
}

/* Freeze hover/transition effects while the carousel is moving. */
.categories-carousel.is-carousel-scrolling .category-carousel-item,
.categories-carousel.is-carousel-scrolling .category-carousel-item:hover,
.categories-carousel.is-carousel-scrolling .category-image img,
.categories-carousel.is-carousel-scrolling .category-carousel-item:hover .category-image img {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    pointer-events: none;
}

[data-theme="dark"] .category-carousel-item .category-info h3 {
    color: #fff;
}

[data-theme="dark"] .category-carousel-item:hover .category-info h3 {
    color: var(--primary-light, #60a5fa);
}

/* CAROUSEL ARROWS */

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 15px;
    color: transparent;
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(239,246,255,.88));
    border: 1px solid rgba(37, 99, 235, .22);
    font-size: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    backdrop-filter: blur(14px) saturate(145%);
    box-shadow:
        0 9px 24px rgba(37, 99, 235, .15),
        inset 0 1px 0 rgba(255,255,255,.95);
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
    isolation: isolate;
}

.carousel-arrow::before {
    content: "";
    width: 11px;
    height: 11px;
    border-right: 3px solid #1d4ed8;
    border-bottom: 3px solid #1d4ed8;
    border-radius: 1px;
}

.carousel-arrow:hover {
    transform: translateY(-50%);
    background: #ffffff;
    border-color: rgba(37, 99, 235, .48);
    box-shadow:
        0 12px 28px rgba(37, 99, 235, .22),
        inset 0 1px 0 #ffffff;
}

.carousel-arrow:active {
    transform: translateY(-50%);
    background: #eff6ff;
    box-shadow:
        0 5px 14px rgba(37, 99, 235, .16),
        inset 0 1px 3px rgba(37, 99, 235, .08);
}

.carousel-arrow:focus-visible {
    outline: 3px solid rgba(59, 130, 246, .28);
    outline-offset: 3px;
}

.carousel-arrow:disabled,
.carousel-arrow[aria-disabled="true"] {
    opacity: .34 !important;
    cursor: default;
    box-shadow: none;
}

.carousel-arrow-left {
    left: 7px;
}

.carousel-arrow-left::before {
    transform: rotate(135deg);
}

.carousel-arrow-right {
    right: 7px;
}

.carousel-arrow-right::before {
    transform: rotate(-45deg);
}

[data-theme="dark"] .carousel-arrow {
    background: linear-gradient(145deg, rgba(30,41,59,.94), rgba(15,23,42,.88));
    border-color: rgba(96, 165, 250, .30);
    box-shadow:
        0 10px 26px rgba(0,0,0,.28),
        inset 0 1px 0 rgba(255,255,255,.08);
}

[data-theme="dark"] .carousel-arrow::before {
    border-color: #93c5fd;
}

[data-theme="dark"] .carousel-arrow:hover {
    background: #1e293b;
    border-color: rgba(147, 197, 253, .58);
}

/* CATEGORIES TABLET */

@media (max-width: 992px) and (min-width: 601px) {
    .categories-carousel-wrapper {
        padding: 0 20px;
        overflow: visible;
    }
    .categories-carousel {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        overflow: visible;
        padding: 10px 0 20px;
    }
    .category-carousel-item {
        flex: none;
        width: 100%;
        min-width: auto;
        max-width: none;
        padding: 20px 14px;
    }
    .category-carousel-item .category-image {
        height: 110px;
        padding: 8px;
    }
    .carousel-arrow {
        display: none;
    }
}

/* CATEGORIES MOBILE */

@media (max-width: 600px) {
    .categories-home {
        padding: 0 12px;
        margin-bottom: 30px;
    }
    .section-title {
        margin-bottom: 24px;
    }
    .section-title h2 {
        font-size: 1.4rem;
    }
    .section-title span {
        font-size: 0.65rem;
    }
    .categories-carousel-wrapper {
        padding: 0;
        overflow: visible;
    }
    .categories-carousel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        overflow: visible;
        padding: 0 0 16px;
    }
    .category-carousel-item {
        flex: none;
        width: 100%;
        min-width: auto;
        max-width: none;
        padding: 9px 12px 12px;
        border-radius: 16px;
    }
    .category-carousel-item .category-image {
        height: 70px;
        padding: 2px;
    }
    .category-carousel-item .category-image img {
        border-radius: 40%;
    }
    .category-carousel-item .category-info h3 {
        font-size: 0.82rem;
    }
    .category-carousel-item .category-info p {
        font-size: 0.7rem;
    }
    .category-carousel-item:hover {
        transform: none;
    }
    .category-carousel-item:hover .category-image img {
        transform: none;
    }
    .carousel-arrow {
        display: none;
    }
}

@media (max-width: 380px) {
    .categories-carousel {
        gap: 8px;
    }
    .category-carousel-item {
        padding: 12px 8px 10px;
        border-radius: 12px;
    }
    .category-carousel-item .category-image {
        height: 60px;
        padding: 4px;
    }
    .category-carousel-item .category-info h3 {
        font-size: 0.72rem;
    }
    .category-carousel-item .category-info p {
        font-size: 0.62rem;
    }
}

/* ==========================================================
   PRODUCTS GRID
========================================================== */

.products-grid {
    width: min(100%, 1320px);
    max-width: 1320px;
    margin: 0 auto;
    padding: 22px 18px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    position: relative;
    z-index: 1;
}

@media (min-width: 993px) and (max-width: 1180px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.product-card {
    width: 100%;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #dbe2ea);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary, #2563eb);
}

[data-theme="dark"] .product-card {
    background: var(--surface, #131d31);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .product-card:hover {
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.product-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2, #eef2ff);
    padding: 20px;
}

[data-theme="dark"] .product-image {
    background: var(--dark-3, #1e293b);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.45s ease;
    pointer-events: none;
    user-select: none;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-stock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    margin: 12px 14px 6px;
}

.stock-ok {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.stock-low {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.stock-out {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text, #1f2937);
    margin: 0 14px 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

[data-theme="dark"] .product-name {
    color: #fff;
}

.product-name:hover {
    color: var(--primary, #2563eb);
}

.product-price {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent, #ff6a00), var(--accent-light, #ff8c38));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 14px 12px;
    direction: ltr;
    display: inline-block;
}

.product-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 14px 14px;
    margin-top: auto;
}

.qty-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border, #dbe2ea);
    border-radius: 10px;
    background: var(--surface-2, #eef2ff);
    color: var(--text, #1f2937);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.qty-btn:hover:not(:disabled) {
    border-color: var(--primary, #2563eb);
    background: rgba(37, 99, 235, 0.1);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--border, #dbe2ea);
    border-radius: 10px;
    background: var(--surface, #ffffff);
    color: var(--text, #1f2937);
    font-weight: 700;
    font-size: 1rem;
    -moz-appearance: textfield;
    outline: none;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary, #2563eb), var(--primary-light, #3b82f6));
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.25s ease;
}

.add-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.add-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #e2e8f0;
    color: #94a3b8;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    background: var(--surface, #ffffff);
    border: 1px dashed var(--border, #dbe2ea);
    border-radius: var(--radius-md, 16px);
    color: var(--text-light, #64748b);
    font-size: 1.1rem;
}

.no-results strong {
    color: var(--accent, #ff6a00);
}

/* PRODUCTS TABLET */

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        padding: 18px 16px;
    }
    .product-card {
        border-radius: 18px;
    }
    .product-image {
        height: 180px;
        padding: 16px;
    }
    .product-name {
        font-size: 0.9rem;
        margin: 0 12px 4px;
    }
    .product-stock {
        margin: 10px 12px 4px;
        font-size: 0.68rem;
    }
    .product-form {
        padding: 0 12px 12px;
        gap: 8px;
    }
    .qty-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .qty-input {
        width: 50px;
        height: 36px;
        font-size: 0.9rem;
    }
    .add-btn {
        height: 44px;
        font-size: 0.82rem;
    }
}

/* PRODUCTS MOBILE */

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px 10px;
    }
    .product-card {
        border-radius: 14px;
    }
    .product-image {
        height: 130px;
        padding: 10px;
    }
    .product-name {
        font-size: 0.75rem;
        margin: 0 8px 4px;
        min-height: 2.2em;
        -webkit-line-clamp: 2;
    }
    .product-price {
        font-size: 1rem;
        margin: 0 8px 6px;
    }
    .product-stock {
        margin: 6px 8px 2px;
        font-size: 0.6rem;
        padding: 3px 8px;
    }
    .product-form {
        padding: 0 8px 8px;
        gap: 6px;
    }
    .qty-row {
        gap: 6px;
    }
    .qty-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    .qty-input {
        width: 40px;
        height: 30px;
        font-size: 0.78rem;
        border-radius: 8px;
    }
    .add-btn {
        height: 36px;
        font-size: 0.72rem;
        border-radius: 8px;
    }
    .product-card:hover {
        transform: translateY(-3px);
    }
    .product-card:hover .product-image img {
        transform: scale(1.05);
    }
}

@media (max-width: 380px) {
    .products-grid {
        gap: 8px;
        padding: 8px 6px;
    }
    .product-image {
        height: 110px;
        padding: 8px;
    }
    .product-name {
        font-size: 0.68rem;
    }
    .qty-btn {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
    .qty-input {
        width: 34px;
        height: 26px;
        font-size: 0.7rem;
    }
    .add-btn {
        height: 32px;
        font-size: 0.65rem;
    }
}

/* PRODUCT TABLE */

.product-table {
    width: calc(100% - 24px);
    margin: 0 12px 8px;
    border-collapse: collapse;
    background: transparent;
}

.product-table td {
    padding: 8px 14px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent, #ff6a00);
    border-bottom: 1px solid var(--border, #dbe2ea);
}

[data-theme="dark"] .product-table td {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 992px) {
    .product-table td {
        padding: 6px 10px;
        font-size: 14px;
    }
    .product-table {
        width: calc(100% - 20px);
        margin: 0 10px 6px;
    }
}

@media (max-width: 600px) {
    .product-table td {
        padding: 4px 8px;
        font-size: 12px;
    }
    .product-table {
        width: calc(100% - 14px);
        margin: 0 7px 4px;
    }
}

@media (max-width: 380px) {
    .product-table td {
        padding: 3px 6px;
        font-size: 11px;
    }
    .product-table {
        width: calc(100% - 10px);
        margin: 0 5px 3px;
    }
}

/* ==========================================================
   PREFERS REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .category-carousel-item:hover {
        transform: none;
    }
    .category-carousel-item:hover .category-image img {
        transform: none;
    }
    .product-card:hover {
        transform: translateY(-2px);
    }
    .product-card:hover .product-image img {
        transform: none;
    }
}

/* ==========================================================
   MODERN FILTER PANEL (גרסה אחת נקייה)
========================================================== */

.filter-toggle-area {
    position: relative;
    z-index: 40;
    width: 100%;
    max-width: 1400px;
    margin: 24px auto 14px;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
}

.filter-toggle-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 22px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: 0;
    border-radius: 13px;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.filter-toggle-btn .filter-arrow {
    transition: transform 0.22s ease;
}

.filter-toggle-btn.active .filter-arrow {
    transform: rotate(180deg);
}

/* PANEL */

#filterPanel {
    position: relative;
    z-index: 35;
    width: calc(100% - 40px);
    max-width: 1400px;
    display: none;
    margin: 0 auto 28px;
    padding: 24px;
    overflow: visible;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 22px;
    box-sizing: border-box;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.11);
}

#filterPanel.active,
#filterPanel.is-open {
    display: block;
}

/* HEADER */

#filterPanel .filter-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 22px;
}

#filterPanel .filter-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 900;
}

#filterPanel .product-count-badge {
    padding: 7px 12px;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

/* GRID */
.grid-container {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(290px, 1.4fr) minmax(220px, 1fr) auto;
  width: 100%; /* מתיחה לכל רוחב האב */
  max-width: 1400px; /* אופציונלי: הגבלת רוחב מקסימלי למסכים ענקיים */
  gap: 20px; /* הוספת מרווח אופקי ואנכי בין העמודות */
}


#filterPanel .filter-grid {
    width: 100%;
    display: grid;
    
    align-items: end;
    gap: 18px;
    margin: 0;
    padding: 0;
    overflow: visible;
    box-sizing: border-box;
}

#filterPanel .filter-box {
    position: relative;
    min-width: 0;
    display: block;
    margin: 0;
    padding: 0;
    overflow: visible;
}

#filterPanel .filter-box>label {
    display: block;
    margin: 0 0 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

/* CUSTOM SELECT (קטגוריות) */

#categorySelect {
    position: relative;
    z-index: 100;
    width: 100%;
}

#categorySelect .select-header {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

#categorySelect.open .select-header {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

#categorySelect .select-header .arrow {
    transition: transform 0.25s ease;
}

#categorySelect.open .select-header .arrow {
    transform: rotate(180deg);
}

#categorySelect .select-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 99999;
    display: none;
    max-height: 300px;
    padding: 7px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    box-sizing: border-box;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.20);
}

#categorySelect.open .select-menu,
#categorySelect .select-menu.active {
    display: block;
}

#categorySelect .select-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    color: #334155;
    background: transparent;
    border-radius: 9px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

#categorySelect .select-item:hover {
    color: #1d4ed8;
    background: #eff6ff;
}

#categorySelect .select-item.active {
    color: #ffffff;
    background: #2563eb;
}

/* PRICE */

#filterPanel .price-modern {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 10px;
}

#filterPanel .price-field {
    min-width: 0;
}

#filterPanel .price-field span {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

#filterPanel .price-modern input,
#filterPanel .modern-sort {
    width: 100%;
    min-height: 50px;
    padding: 10px 12px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-sizing: border-box;
    font: inherit;
    font-size: 14px;
}

#filterPanel .price-modern input:focus,
#filterPanel .modern-sort:focus {
    outline: 0;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

#filterPanel .price-line {
    padding-bottom: 14px;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 900;
}

/* ACTIONS */

#filterPanel .filter-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

#filterPanel .modern-filter-submit,
#filterPanel .modern-reset {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 12px;
    box-sizing: border-box;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

#filterPanel .modern-filter-submit {
    color: #ffffff;
    background: #2563eb;
    border: 0;
    cursor: pointer;
}

#filterPanel .modern-reset {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #dbe3ee;
}

/* FILTER TABLET */

@media (max-width: 1050px) {
    #filterPanel .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* FILTER MOBILE */

@media (max-width: 650px) {
    .filter-toggle-area {
        padding: 0 12px;
    }
    #filterToggleBtn {
        width: 100%;
    }
    #filterPanel {
        width: calc(100% - 24px);
        padding: 18px 14px;
    }
    #filterPanel .filter-header {
        align-items: flex-start;
        flex-direction: column;
    }
    #filterPanel .filter-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    #filterPanel .filter-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    #categorySelect .select-menu {
        max-height: 260px;
    }
}

/* ==========================================================
   MODAL
========================================================== */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 99999;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: min(520px, 95%);
    background: #1b2434;
    color: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.image-drop-zone {
    border: 2px dashed #3b82f6;
    border-radius: 18px;
    padding: 45px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.image-drop-zone:hover {
    background: #22314d;
}

.cart-items {
    max-height: 420px;
    overflow: auto;
}

.checkout-btn {
    width: 100%;
    height: 50px;
    border-radius: 14px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
}

/* ==========================================================
   IMAGE SEARCH MODAL
========================================================== */

.image-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    overflow: hidden;
}

.image-search-box {
    width: min(520px, 95vw);
    max-height: 90vh;
    overflow: hidden;
    background: #111827;
    border: 1px solid rgba(0, 255, 120, 0.3);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 0 40px rgba(0, 255, 120, 0.25);
    display: flex;
    flex-direction: column;
}

.image-search-box h3 {
    margin: 0 0 10px;
    color: #00ff88;
    text-align: center;
}

.image-drop-zone {
    flex-shrink: 0;
    height: 160px;
    border: 2px dashed #00ff88;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin: 15px 0;
}

.image-drop-zone:hover {
    background: rgba(0, 255, 120, 0.08);
}

.image-preview {
    max-height: 200px;
    overflow: hidden;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 12px;
}

.image-search-results {
    margin-top: 15px;
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
}

.image-search-results::-webkit-scrollbar {
    width: 8px;
}

.image-search-results::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 10px;
}

.image-result-item {
    background: #1f2937;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.2s;
}

.image-result-item:hover {
    transform: translateY(-2px);
    border-color: #00ff88;
}

.image-result-item img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 10px;
}

.image-search-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #00ff88;
    color: #001;
    font-weight: 800;
    cursor: pointer;
    margin-top: 15px;
}

.image-search-submit:hover {
    filter: brightness(1.1);
}

.close-image-search {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* ==========================================================
   CART DRAWER
========================================================== */

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    height: 100%;
    background: #111827;
    color: white;
    z-index: 9998;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    transition: 0.35s;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.cart-drawer-header button {
    background: none;
    border: 0;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
}

.cart-drawer-items {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid #333;
}

.cart-total-box {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    margin-bottom: 20px;
}

.checkout-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    padding: 15px;
    border-radius: 15px;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 600px) {
    .cart-drawer {
        width: 100%;
    }
}

/* ==========================================================
   CYBERTECH PC — FINAL SAFE INTEGRATION
   Clean, scoped fixes only. No global layout displacement.
========================================================== */

/* ----------------------------------------------------------
   Header integration
---------------------------------------------------------- */

.header {
    isolation: isolate;
}

.header .header-logo,
.header .search-box,
.header .header-actions {
    min-width: 0;
}

.header .search-box {
    position: relative;
}

.header .search-wrapper {
    width: 100%;
}

.header .header-actions {
    flex-shrink: 0;
}

.header .header-link,
.header .theme-toggle {
    position: relative;
}

/*
 * The user requested removal of the detached red cart counter.
 * This affects only the badge inside the site header.
 */


/* Search results must float below the search field, not alter page layout. */
.header #searchResults,
.header #searchSuggestions {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 5000;
    max-height: 380px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ----------------------------------------------------------
   Filter panel — one normal in-flow component
---------------------------------------------------------- */

#filterForm {
    position: relative;
    z-index: 35;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
}

#filterPanel {
    float: none;
    clear: both;
}

#filterPanel.active,
#filterPanel.is-open,
#filterPanel.open {
    display: block;
}

#filterPanel:not(.active):not(.is-open):not(.open) {
    display: none;
}

/* Category dropdown is closed until JavaScript opens it. */
#categorySelect .select-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 9999;

    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    width: 100%;
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
}

#categorySelect.open .select-menu,
#categorySelect .select-menu.active,
#categorySelect .select-menu.open {
    display: block;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ----------------------------------------------------------
   Restore normal category and product layout
---------------------------------------------------------- */

.categories-home,
.categories-carousel-wrapper,
.categories-carousel,
.products-grid,
#productsGrid {
    float: none;
    clear: both;
    transform: none;
    visibility: visible;
    opacity: 1;
}

.categories-home {
    display: block;
}

.products-grid,
#productsGrid {
    display: grid;
}

/* ----------------------------------------------------------
   Dark theme filter compatibility
---------------------------------------------------------- */

[data-theme="dark"] #filterPanel {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] #filterPanel .filter-header h3,
[data-theme="dark"] #filterPanel .filter-box > label,
[data-theme="dark"] #categorySelect .select-header,
[data-theme="dark"] #filterPanel .price-modern input,
[data-theme="dark"] #filterPanel .modern-sort {
    color: var(--text);
}

[data-theme="dark"] #categorySelect .select-header,
[data-theme="dark"] #categorySelect .select-menu,
[data-theme="dark"] #filterPanel .price-modern input,
[data-theme="dark"] #filterPanel .modern-sort {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] #categorySelect .select-item {
    color: var(--text-light);
}

[data-theme="dark"] #categorySelect .select-item:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.25);
}

/* ----------------------------------------------------------
   Responsive header aligned to the existing HTML
---------------------------------------------------------- */

@media (max-width: 992px) {
    .header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
    }

    .header .search-box {
        grid-column: 1 / -1;
        order: initial;
    }
}

@media (max-width: 768px) {
    .header {
        grid-template-columns: 1fr auto;
    }

    .header .header-logo {
        grid-column: 1;
        grid-row: 1;
    }

    .header .header-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .header .search-box {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .header .header-link span:not(.icon),
    .header .theme-toggle #themeLabel {
        display: none;
    }

    .header .header-link,
    .header .theme-toggle {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 650px) {
    #filterPanel .filter-grid {
        grid-template-columns: 1fr;
    }

    #filterPanel .filter-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================
   PRODUCT PRICE — REMOVE LEGACY DUPLICATE
   Keep the main price shown after .product-name.
========================================================== */

/* Legacy markup sometimes renders an extra price directly after the image. */
.product-card > .product-image + .product-price,
.product-card > .product-stock + .product-image + .product-price {
    display: none !important;
}

/* ==========================================================
   PRODUCT FACET SIDEBAR — BRAND + SERIES
========================================================== */

.products-with-facets {
    width: min(1320px, calc(100% - 40px));
    margin: 0 auto 42px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    direction: rtl;
}

.products-with-facets > .products-grid,
.products-with-facets > #productsGrid {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    direction: rtl;
    transition: opacity .18s ease, transform .18s ease;
}

.products-with-facets.is-filtering > .products-grid {
    opacity: .48;
    transform: translateY(4px);
    pointer-events: none;
}

.product-facet-sidebar {
    position: sticky;
    top: 96px;
    z-index: 20;
    min-width: 0;
    color: #0f172a;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .09);
    overflow: hidden;
}

.facet-mobile-toggle {
    display: none;
}

.facet-sidebar-body {
    padding: 20px;
}

.facet-sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.facet-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
}

.facet-sidebar-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.35;
}

.facet-result-count {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 900;
}

.facet-group {
    padding: 18px 0;
    border-bottom: 1px solid #e2e8f0;
}

.facet-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 11px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 900;
}

.facet-group-title small {
    min-width: 25px;
    padding: 2px 7px;
    text-align: center;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 11px;
}

.facet-options {
    max-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-left: 4px;
    overflow-y: auto;
    scrollbar-width: thin;
      bar-color: #cbd5e1 transparent;
}

.facet-option {
    min-height: px;
    display: grid;
    grid-template-columns: 21px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    color: #475569;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.facet-option:hover {
    color: #1d4ed8;
    background: #f8fafc;
    border-color: #dbeafe;
}

.facet-option.is-checked {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.facet-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.facet-square {
    width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.facet-option input:checked + .facet-square {
    background: #2563eb;
    border-color: #2563eb;
    transform: scale(1.04);
}

.facet-option input:checked + .facet-square::after {
    content: "✓";
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.facet-option input:focus-visible + .facet-square {
    outline: 3px solid rgba(37, 99, 235, .25);
    outline-offset: 2px;
}

.facet-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 750;
}

.facet-count {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
}

.facet-empty {
    margin: 0;
    padding: 10px;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 9px;
    font-size: 12px;
}

.facet-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-top: 17px;
}

.facet-reset {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #f1f5f9;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}

.facet-reset:hover {
    color: #b91c1c;
    background: #fff1f2;
    border-color: #fecdd3;
}

.facet-auto-note {
    color: #64748b;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}

.facet-active-badge {
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #2563eb;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

[data-theme="dark"] .product-facet-sidebar {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .facet-sidebar-header,
[data-theme="dark"] .facet-group {
    border-color: var(--border);
}

[data-theme="dark"] .facet-sidebar-header h2,
[data-theme="dark"] .facet-group-title {
    color: #ffffff;
}

[data-theme="dark"] .facet-option {
    color: var(--text-light);
}

[data-theme="dark"] .facet-option:hover,
[data-theme="dark"] .facet-option.is-checked {
    color: #93c5fd;
    background: rgba(37, 99, 235, .16);
    border-color: rgba(96, 165, 250, .35);
}

[data-theme="dark"] .facet-square {
    background: var(--surface-2);
    border-color: #64748b;
}

/* Desktop: always keep five products visible in the same row. */
@media (min-width: 1181px) and (max-width: 1349px) {
    .products-with-facets > .products-grid,
    .products-with-facets > #productsGrid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Compact desktop cards: full readable title without splitting words. */
@media (min-width: 1181px) {
    .products-with-facets {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 16px;
    }

    .product-card {
        min-width: 0;
        height: 100%;
    }

    .product-image {
        height: 178px;
        padding: 14px;
    }

    .product-name {
        display: block;
        min-height: 5.8em;
        max-height: none;
        margin: 0 11px 7px;
        overflow: visible;
        font-size: 0.84rem;
        line-height: 1.45;
        text-align: center;
        direction: rtl;
        unicode-bidi: plaintext;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
        -webkit-line-clamp: unset;
        -webkit-box-orient: initial;
    }

    .product-price {
        margin-inline: 11px;
        font-size: 1.18rem;
        white-space: nowrap;
    }

    .product-stock {
        margin-inline: 11px;
        padding-inline: 9px;
        white-space: nowrap;
    }

    .product-form {
        padding-inline: 11px;
    }
}

/* Compact laptop layout: three products until there is room for four. */
@media (min-width: 1051px) and (max-width: 1180px) {
    .products-with-facets {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 16px;
    }

    .products-with-facets > .products-grid,
    .products-with-facets > #productsGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .products-with-facets {
        grid-template-columns: 235px minmax(0, 1fr);
        gap: 16px;
    }
    .products-with-facets > .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 820px) {
    .products-with-facets {
        width: calc(100% - 24px);
        display: block;
    }
    .product-facet-sidebar {
        position: relative;
        top: auto;
        margin-bottom: 16px;
        border-radius: 16px;
    }
    .facet-mobile-toggle {
        width: 100%;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 11px 15px;
        color: #fff;
        background: #fff;
        border: 0;
        font: inherit;
        font-size: 14px;
        font-weight: 900;
        cursor: pointer;
    }
    .facet-sidebar-body {
        display: none;
        padding: 16px;
        border-top: 1px solid #e2e8f0;
    }
    .product-facet-sidebar.is-mobile-open .facet-sidebar-body {
        display: block;
    }
    .products-with-facets > .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    [data-theme="dark"] .facet-mobile-toggle {
        color: #ffffff;
        background: var(--surface);
    }
}

@media (max-width: 480px) {
    .products-with-facets {
        width: calc(100% - 16px);
    }
    .products-with-facets > .products-grid {
        gap: 9px;
    }
    .facet-options {
        max-height: 220px;
    }
}

/* The correct price remains directly after the product name. */
.product-card > .product-name + .product-price {
    display: inline-block !important;
}

/* ==========================================================
   DYNAMIC PRODUCT PRICE DUPLICATE — CSS FALLBACK
========================================================== */

.product-card:has(> .product-price ~ .product-price) > .product-price:first-of-type {
    display: none !important;
}









/* ==========================================================
   SEARCH SUGGESTIONS — PREMIUM DESIGN
========================================================== */

.search-wrapper {
    position: relative;
    width: 100%;
    z-index: 3000;
}

#searchSuggestions,
#searchResults {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;

    width: 100%;
    max-height: 430px;

    display: none;
    overflow-y: auto;
    overflow-x: hidden;

    padding: 10px;

    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe3ee;
    border-radius: 16px;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.20),
        0 4px 14px rgba(15, 23, 42, 0.08);

    backdrop-filter: blur(18px);
    z-index: 99999;
    direction: rtl;
}

/* פתיחת התוצאות */
#searchSuggestions.active,
#searchSuggestions.show,
#searchResults.active,
#searchResults.show {
    display: block;
}

/* במקרה שה-JS מוסיף תוכן בלי class */
#searchSuggestions:not(:empty),
#searchResults:not(:empty) {
    display: block;
}

/* פס גלילה */
#searchSuggestions::-webkit-scrollbar,
#searchResults::-webkit-scrollbar {
    width: 7px;
}

#searchSuggestions::-webkit-scrollbar-track,
#searchResults::-webkit-scrollbar-track {
    background: transparent;
}

#searchSuggestions::-webkit-scrollbar-thumb,
#searchResults::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

/* פריט תוצאה */
.search-suggestion,
.search-result-item,
.suggestion-item {
    width: 100%;
    min-height: 92px;

    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;

    padding: 10px 12px;
    margin-bottom: 7px;

    color: #1e293b;
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 13px;

    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.search-suggestion:last-child,
.search-result-item:last-child,
.suggestion-item:last-child {
    margin-bottom: 0;
}

.search-suggestion:hover,
.search-result-item:hover,
.suggestion-item:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

/* תמונת מוצר */
.search-suggestion img,
.search-result-item img,
.suggestion-item img {
    width: 78px;
    height: 72px;

    display: block;
    object-fit: contain;

    padding: 5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

/* אזור הטקסט */
.search-suggestion-info,
.search-result-info,
.suggestion-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* שם המוצר */
.search-suggestion-name,
.search-result-name,
.suggestion-name {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 800;

    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* מחיר */
.search-suggestion-price,
.search-result-price,
.suggestion-price {
    color: #2563eb;
    font-size: 15px;
    font-weight: 900;
    direction: ltr;
    text-align: right;
}

/* כפתור או חץ */
.search-suggestion-action,
.search-result-action,
.suggestion-action {
    min-width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    background: #2563eb;
    border-radius: 10px;

    font-size: 16px;
    font-weight: 900;
}

/* הודעה כאשר אין תוצאות */
.search-no-results,
.no-search-results {
    padding: 24px 16px;
    color: #64748b;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}

/* מצב טעינה */
.search-loading {
    padding: 20px;
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

/* ==========================================================
   DARK MODE
========================================================== */

[data-theme="dark"] #searchSuggestions,
[data-theme="dark"] #searchResults {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .search-suggestion,
[data-theme="dark"] .search-result-item,
[data-theme="dark"] .suggestion-item {
    color: #ffffff;
    background: #172033;
}

[data-theme="dark"] .search-suggestion:hover,
[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .suggestion-item:hover {
    background: #1e3a5f;
    border-color: rgba(96, 165, 250, 0.45);
}

[data-theme="dark"] .search-suggestion img,
[data-theme="dark"] .search-result-item img,
[data-theme="dark"] .suggestion-item img {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .search-suggestion-name,
[data-theme="dark"] .search-result-name,
[data-theme="dark"] .suggestion-name {
    color: #ffffff;
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 768px) {

    #searchSuggestions,
    #searchResults {
        top: calc(100% + 7px);
        max-height: 360px;
        padding: 7px;
        border-radius: 13px;
    }

    .search-suggestion,
    .search-result-item,
    .suggestion-item {
        min-height: 76px;
        grid-template-columns: 62px minmax(0, 1fr) auto;
        gap: 9px;
        padding: 8px;
        border-radius: 10px;
    }

    .search-suggestion img,
    .search-result-item img,
    .suggestion-item img {
        width: 62px;
        height: 58px;
        border-radius: 9px;
    }

    .search-suggestion-name,
    .search-result-name,
    .suggestion-name {
        font-size: 12px;
    }

    .search-suggestion-price,
    .search-result-price,
    .suggestion-price {
        font-size: 13px;
    }

    .search-suggestion-action,
    .search-result-action,
    .suggestion-action {
        min-width: 30px;
        height: 30px;
        font-size: 14px;
    }
}



/* קישור העגלה הוא נקודת העיגון של תג הכמות */
.header .cart-header-link,
.header a[href*="cart"] {
    position: relative !important;
    overflow: visible !important;
}

/* מיקום תג הכמות ליד העגלה */
.header .cart-badge {
    position: absolute !important;

    top: -7px !important;
    left: -7px !important;
    right: auto !important;
    bottom: auto !important;

    min-width: 20px;
    height: 20px;
    padding: 0 5px;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    background: #ef4444;
    color: #fff;

    font-size: 11px;
    line-height: 1;
    font-weight: 900;

    z-index: 10;
    pointer-events: none;
}

/* ==========================================================
   FINAL SNOW-WHITE GLASS HEADER
   Targets the existing .header directly — no HTML class needed.
========================================================== */
html body .header,
html[data-theme="dark"] body .header {
    position: sticky !important;
    top: 10px !important;
    z-index: 1200 !important;
    isolation: isolate;

    width: min(1220px, calc(100% - 28px)) !important;
    min-height: 68px !important;
    margin: 10px auto 18px !important;
    padding: 9px 15px !important;

    display: grid !important;
    grid-template-columns: auto minmax(300px, 1fr) auto !important;
    align-items: center !important;
    gap: 20px !important;

    color: #172033 !important;
 background: linear-gradient(135deg, rgba(255,255,255, 0.05), rgba(240,247,255, 0.05)),
              rgba(255,255,255, 0.10) !important;
              
  /* אפקט טשטוש חזק (הכרחי כדי שהתוכן מאחור לא יפריע לעיניים) */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  /* מסגרת לבנה עדינה מאוד שמסמנת את גבולות הכרטיס */
  border: 1px solid rgba(255, 255, 255, 0.15);
  
  /* הפינות המעוגלות שלך */
  border-radius: 39px;

    -webkit-backdrop-filter: blur(26px) saturate(170%) !important;
    backdrop-filter: blur(26px) saturate(170%) !important;

    box-shadow:
        0 16px 38px rgba(30,41,59,.14),
        inset 0 1px 0 rgba(255,255,255,1),
        inset 0 -1px 0 rgba(148,163,184,.12) !important;
}

html body .header::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
    background:
        radial-gradient(circle at 18% 0%, rgba(255,255,255,.98), transparent 34%),
        linear-gradient(112deg, transparent 24%, rgba(255,255,255,.44) 50%, transparent 72%);
}

html body .header .header-logo,
html[data-theme="dark"] body .header .header-logo {
    color: #111827 !important;
}

html body .header .header-logo-copy strong,
html[data-theme="dark"] body .header .header-logo-copy strong {
    color: #111827 !important;
}

html body .header .header-logo-copy small,
html[data-theme="dark"] body .header .header-logo-copy small {
    color: #64748b !important;
}

html body .header .header-logo-mark {
    color: #fff !important;
    background: linear-gradient(145deg, #2563eb, #1d4ed8) !important;
    border: 1px solid rgba(255,255,255,.95) !important;
    box-shadow: 0 7px 16px rgba(37,99,235,.24), inset 0 1px 0 rgba(255,255,255,.35) !important;
}

html body .header .search-box {
    position: relative;
    width: 100% !important;
    min-width: 0;
}

html body .header .search-wrapper input,
html[data-theme="dark"] body .header .search-wrapper input {
    width: 100% !important;
    height: 46px !important;
    padding: 0 17px 0 52px !important;
    color: #111827 !important;
    background: rgb(255 255 255 / 50%) !important;
    border: 1px solid rgba(148,163,184,.32) !important;
    border-radius: 13px !important;
    -webkit-backdrop-filter: blur(12px) saturate(130%) !important;
    backdrop-filter: blur(12px) saturate(130%) !important;
    box-shadow: inset 0 1px 0 #fff, 0 5px 14px rgba(30,41,59,.075) !important;
	opacity:0.80;
}

html body .header .search-wrapper input::placeholder {
    color: #64748b !important;
}

html body .header .search-wrapper input:focus {
    border-color: rgba(37,99,235,.72) !important;
    box-shadow: 0 0 0 4px rgba(37,99,235,.11), inset 0 1px 0 #fff !important;
}

html body .header .camera-btn {
    left: 6px !important;
    width: 34px !important;
    height: 34px !important;
    color: #fff !important;
    background: #2563eb !important;
    border-radius: 9px !important;
    box-shadow: 0 6px 14px rgba(37,99,235,.25) !important;
}

html body .header .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

html body .header .header-icon-link,
html body .header .header-link,
html body .header .theme-toggle,
html[data-theme="dark"] body .header .header-icon-link,
html[data-theme="dark"] body .header .header-link,
html[data-theme="dark"] body .header .theme-toggle {
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 9px !important;
    color: #334155 !important;
    background: rgba(255,255,255,.54) !important;
    border: 1px solid rgba(148,163,184,.20) !important;
    border-radius: 11px !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95) !important;
}

html body .header .header-icon-link:hover,
html body .header .header-link:hover,
html body .header .theme-toggle:hover {
    color: #1d4ed8 !important;
    background: rgba(255,255,255,.92) !important;
    border-color: rgba(37,99,235,.24) !important;
}

html body .header .whatsapp-link { color: #059669 !important; }
html body .header .header-action-divider { background: rgba(100,116,139,.25) !important; }
html body .header .cart-badge { border: 2px solid #fff !important; }

@media (max-width: 768px) {
    html body .header,
    html[data-theme="dark"] body .header {
        width: calc(100% - 16px) !important;
        top: 6px !important;
        grid-template-columns: 1fr auto !important;
        gap: 8px 10px !important;
        padding: 8px 10px !important;
        border-radius: 14px !important;
    }

    html body .header .header-logo { grid-column: 1; grid-row: 1; }
    html body .header .header-actions { grid-column: 2; grid-row: 1; }
    html body .header .search-box { grid-column: 1 / -1; grid-row: 2; }
    html body .header .header-link span:not(.icon),
    html body .header .theme-toggle #themeLabel { display: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
    html body .header { background: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

.scroll {
  position:absolute;
  display: flex;
  flex-direction: row; /* ברירת מחדל */
  justify-content: flex-start; /* הצמדה אופקית להתחלה */
  align-items: flex-end;      /* הצמדה אנכית לתחתית */
  direction: rtl;
  background: transparent !important;
  right:-5.5%;
}
/* התאמה למובייל (מסכים קטנים מ-768 פיקסלים) */
@media (max-width: 768px) {
  .my-element {
    right: 0; /* הצמדה לגבול הימני ללא חריגה */
    /* או ערך קטן יותר כמו: right: -2%; */
  }
}

.bottom-image {
 
    width: 380px !important;

}


.hero-slider {
    position: relative;
    height: 400px;
    min-height: 0;
    padding: 14px;

    border-radius: 26px !important;
    overflow: hidden !important;
}

.hero-slider .slide {
    position: absolute;
    inset: 14px;

    border-radius: 20px !important;
    overflow: hidden !important;
}

.hero-slider .slide .slider-image {
    position: absolute !important;
    inset: 0 !important;

    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover;
    border-radius: 20px !important;
    clip-path: inset(0 round 20px);

    transform: none !important;
}

/* מבטל הגדלה שמסתירה את הפינות */
.hero-slider .slide.active .slider-image {
    transform: none !important;
}
