
/* ============================================================
   EcoFarm Agri — Products catalogue page
   تنسيقات محتوى المتجر فقط.
   الألوان والخط الأساسي من style.css
   ============================================================ */

/* إعدادات محلية لمحتوى المتجر فقط، وليست متغيرات عامة على :root */

.catalog-page {
    --catalog-green: var(--brand-dark);
    --catalog-green-deep: var(--brand-deep);
    --catalog-green-soft: #eaf5ec;
    --catalog-gold: var(--brand);

    --catalog-page: var(--body-bg);
    --catalog-surface: var(--surface);
    --catalog-text: var(--body-text);
    --catalog-muted: #64748b;
    --catalog-border: var(--border);

    --catalog-shadow: 0 18px 48px rgba(23, 58, 34, .07);
    --catalog-radius: 22px;

    background: var(--catalog-page);
    color: var(--catalog-text);

    font-family: inherit;
    font-size: 15px;
    line-height: 1.75;

    -webkit-font-smoothing: antialiased;

    overflow-x: hidden;

    transition:
        background-color .35s ease,
        color .35s ease;
}

/* إعدادات التمرير */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

html:not(.dark) {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

/* الأزرار والروابط داخل محتوى المتجر فقط */

.catalog-page button,
.catalog-page input,
.catalog-page select {
    font: inherit;
}

.catalog-page button,
.catalog-page a,
.catalog-page select {
    -webkit-tap-highlight-color: transparent;
}

.catalog-page a {
    color: inherit;
}

.catalog-page button {
    color: inherit;
}

/* أيقونات محتوى المتجر فقط.
   لا تصل هذه القاعدة إلى أيقونات الهيدر أو الفوتر. */

.catalog-page svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.catalog-page img {
    max-width: 100%;
}

/* ============================================================
   DARK MODE
   استخدام الكلاس الأصلي .dark على html
   ============================================================ */

.dark .catalog-page {
    --catalog-page: var(--night-body);
    --catalog-surface: #112217;
    --catalog-text: var(--night-text);
    --catalog-muted: #a1a1aa;
    --catalog-border: rgba(255, 255, 255, .08);
    --catalog-green-soft: rgba(22, 163, 74, .13);
    --catalog-shadow: 0 20px 48px rgba(0, 0, 0, .30);

    background: var(--catalog-page);
    color: var(--catalog-text);
}

/* ---------- Image hero: desktop height = 400px ---------- */
.catalog-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 400px;
    height: 400px;
    padding: 40px clamp(22px, 8.5vw, 140px) 58px;
    overflow: hidden;
    color: #fff;
    background: #174d2c url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=2200&q=88") center 52% / cover no-repeat;
}
.catalog-hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(100deg, rgba(8,37,21,.92) 0%, rgba(14,57,31,.76) 48%, rgba(15,64,33,.25) 100%); }
.catalog-hero::after { content: ""; position: absolute; z-index: -1; right: -130px; bottom: -250px; width: 560px; height: 560px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.035), 0 0 0 90px rgba(255,255,255,.025); }
.catalog-hero-content { position: relative; width: min(720px, 82%); animation: hero-rise .8s cubic-bezier(.22,1,.36,1) both; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow-pill { display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px; margin-bottom: 18px; border: 1px solid rgba(255,255,255,.25); border-radius: 30px; background: rgba(255,255,255,.10); color: #eff9ef; font-size: 11px; font-weight: 800; backdrop-filter: blur(8px); }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--catalog-gold); box-shadow: 0 0 0 4px rgba(244,169,31,.16); }
.hero-kicker { margin: 0 0 6px; font: 800 10px/1.5 Arial, sans-serif; letter-spacing: 3px; color: #d3e6d6; }
.catalog-hero h1 { margin: 0; color: #fff; font-size: clamp(37px, 4vw, 60px); line-height: 1.2; font-weight: 900; letter-spacing: -.8px; }
.catalog-hero h1 em,
.catalog-section-heading h2 em,
.information-section-header h2 em,
.related-heading h2 em { color: var(--catalog-gold); font-style: normal; }
.hero-description { max-width: 550px; margin: 14px 0 19px; color: rgba(255,255,255,.84); font-size: 14px; line-height: 1.95; }
.hero-proof-row { display: flex; flex-wrap: wrap; gap: 21px; color: rgba(255,255,255,.94); font-size: 11px; font-weight: 800; }
.hero-proof-row span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof-row svg { width: 15px; height: 15px; padding: 2px; border-radius: 50%; color: #174d2c; background: #d9f3c9; stroke-width: 2.4; }
.hero-floating-note { position: absolute; z-index: 2; left: clamp(22px, 8.5vw, 140px); bottom: 64px; display: flex; align-items: center; gap: 12px; padding: 13px 17px; border: 1px solid rgba(255,255,255,.28); border-radius: 16px; background: rgba(255,255,255,.12); backdrop-filter: blur(14px); box-shadow: 0 15px 35px rgba(0,0,0,.12); animation: note-float 5s ease-in-out infinite; }
html[dir="ltr"] .hero-floating-note { left: auto; right: clamp(22px, 8.5vw, 140px); }
@keyframes note-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.floating-note-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; background: #dff0d9; color: var(--catalog-green); }
.floating-note-icon svg { width: 23px; height: 23px; }
.hero-floating-note strong, .hero-floating-note small { display: block; }
.hero-floating-note strong { color: #fff; font-size: 12px; }
.hero-floating-note small { margin-top: 2px; color: rgba(255,255,255,.77); font-size: 10px; }
.hero-bottom-line { position: absolute; bottom: 23px; right: clamp(22px, 8.5vw, 140px); left: clamp(22px, 8.5vw, 140px); display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.7); font: 700 9px Arial, sans-serif; letter-spacing: 2px; }
html[dir="ltr"] .hero-bottom-line { direction:ltr; }
.hero-bottom-line span:nth-child(1) { color: var(--catalog-gold); font-size: 12px; }
.hero-bottom-line span:nth-child(2) { display: block; width: 58px; height: 1px; background: rgba(255,255,255,.45); }

/* ---------- Section and sidebar layout ---------- */
.catalog-section { width: min(100% - 48px, 1440px); margin: 0 auto; padding: 70px 0 90px; }
.catalog-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 0 0 35px; }
.section-overline { display: inline-flex; align-items: center; gap: 8px; color: var(--catalog-green); font-size: 10px; font-weight: 900; letter-spacing: 1.1px; text-transform: uppercase; }
.section-overline::before { content: ""; display: inline-block; width: 19px; height: 2px; border-radius: 4px; background: var(--catalog-gold); }
.catalog-section-heading h2,
.information-section-header h2,
.related-heading h2 { margin: 4px 0 7px; font-size: clamp(28px, 3vw, 39px); line-height: 1.35; font-weight: 900; letter-spacing: -.6px; }
.catalog-section-heading h2 em { color: var(--catalog-green); font-style: normal; }
.catalog-section-heading p,
.related-heading p,
.information-section-header p { margin: 0; color: var(--catalog-muted); font-size: 13px; }
.catalog-heading-mark { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 28px; color: var(--catalog-green); background: var(--catalog-green-soft); transform: rotate(-9deg); }
.catalog-heading-mark svg { width: 64px; height: 64px; fill: currentColor; stroke: none; opacity: .82; }
.catalog-layout { display: grid; grid-template-columns: minmax(235px, 285px) minmax(0, 1fr); align-items: start; gap: 27px; }
.catalog-sidebar { position: sticky; top: 20px; padding: 24px; border: 1px solid var(--catalog-border); border-radius: var(--catalog-radius); background: var(--catalog-surface); box-shadow: var(--catalog-shadow); transition: border-color .35s ease, background-color .35s ease, box-shadow .35s ease; }
.sidebar-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 25px; padding-bottom: 19px; border-bottom: 1px solid var(--catalog-border); }
.sidebar-topline .section-overline { font-size: 9px; }
.sidebar-topline h3 { margin: 4px 0 0; font-size: 19px; font-weight: 900; }
.text-reset { border: 0; padding: 4px 0; background: none; color: var(--catalog-green); font-size: 11px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.text-reset:hover { color: var(--catalog-gold); }
.sidebar-filter-group { margin: 0 0 20px; }
.sidebar-filter-group > label,
.control-select > label { display: block; margin-bottom: 8px; color: var(--catalog-text); font-size: 11px; font-weight: 900; }
.select-wrap { position: relative; min-width: 0; }
.select-wrap select { width: 100%; min-width: 0; height: 45px; padding: 0 13px 0 35px; appearance: none; outline: none; border: 1px solid var(--catalog-border); border-radius: 11px; background: var(--catalog-page); color: var(--catalog-text); font-size: 11px; font-weight: 700; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.select-wrap select:focus { border-color: var(--catalog-green); box-shadow: 0 0 0 3px rgba(36,118,66,.10); }
.select-wrap > svg { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); width: 15px; height: 15px; color: var(--catalog-muted); pointer-events: none; }
html[dir="ltr"] .select-wrap select { padding: 0 35px 0 13px; }
html[dir="ltr"] .select-wrap > svg { left: auto; right: 12px; }
.sidebar-help-card { position: relative; overflow: hidden; margin-top: 27px; padding: 19px 17px; border-radius: 16px; color: #fff; background: linear-gradient(140deg, #1f703e, #143e28); }
.sidebar-help-card::after { content: ""; position: absolute; width: 100px; height: 100px; left: -30px; bottom: -44px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 15px rgba(255,255,255,.04); }
.help-card-icon { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 11px; border-radius: 11px; color: #174d2c; background: #dcefd7; }
.help-card-icon svg { width: 20px; height: 20px; }
.sidebar-help-card strong { display: block; font-size: 13px; }
.sidebar-help-card p { margin: 6px 0 13px; color: rgba(255,255,255,.76); font-size: 10px; line-height: 1.9; }
.sidebar-help-card a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px; color: #ffe2a2; font-size: 10px; font-weight: 900; text-decoration: none; }
.sidebar-help-card a:hover { gap: 14px; }
.sidebar-footnote { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; color: var(--catalog-muted); font-size: 9px; line-height: 1.8; }
.sidebar-footnote svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; color: var(--catalog-green); }

/* ---------- Toolbar and controls ---------- */
.catalog-main { min-width: 0; }
.catalog-toolbar { min-height: 73px; display: flex; align-items: center; gap: 20px; padding: 14px 19px; margin-bottom: 14px; border: 1px solid var(--catalog-border); border-radius: 17px; background: var(--catalog-surface); box-shadow: 0 8px 26px rgba(23,58,34,.035); }
.toolbar-title { display: flex; align-items: center; gap: 11px; margin-inline-end: auto; }
.toolbar-title-icon { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 13px; color: var(--catalog-green); background: var(--catalog-green-soft); }
.toolbar-title-icon svg { width: 22px; height: 22px; }
.toolbar-title strong, .toolbar-title small { display: block; }
.toolbar-title strong { font-size: 14px; font-weight: 900; }
.toolbar-title small { color: var(--catalog-muted); font-size: 10px; }
.toolbar-count { display: flex; align-items: center; gap: 8px; color: var(--catalog-muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.count-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--catalog-green); box-shadow: 0 0 0 4px rgba(36,118,66,.1); }
.mobile-filter-toggle { display: none; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 13px; border: 1px solid var(--catalog-border); border-radius: 10px; background: var(--catalog-page); color: var(--catalog-text); font-size: 11px; font-weight: 900; }
.mobile-filter-toggle svg { width: 17px; height: 17px; }
.catalog-controls { display: grid; grid-template-columns: minmax(220px, 1.45fr) minmax(130px, .8fr) minmax(130px, .8fr) minmax(135px, .85fr); gap: 10px; margin-bottom: 17px; }
.catalog-search { position: relative; display: flex; align-items: center; min-width: 0; height: 52px; padding: 0 13px; border: 1px solid var(--catalog-border); border-radius: 13px; background: var(--catalog-surface); transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease; }
.catalog-search:focus-within { border-color: var(--catalog-green); box-shadow: 0 0 0 3px rgba(36,118,66,.10); }
.search-icon { flex: 0 0 auto; width: 20px; height: 20px; color: var(--catalog-green); }
.catalog-search input { width: 100%; min-width: 0; height: 100%; border: 0; outline: none; padding: 0 11px; background: transparent; color: var(--catalog-text); font-size: 11px; font-weight: 700; }
.catalog-search input::placeholder { color: #91a095; font-weight: 600; }
.clear-search { flex: 0 0 auto; display: grid; place-items: center; width: 25px; height: 25px; border: 0; border-radius: 50%; background: var(--catalog-green-soft); color: var(--catalog-green); font-size: 20px; line-height: 1; cursor: pointer; }
.clear-search[hidden], .search-suggestions[hidden], [hidden] { display: none !important; }
.search-suggestions { position: absolute; z-index: 25; top: calc(100% + 7px); right: 0; left: 0; max-height: 300px; overflow: auto; padding: 7px; border: 1px solid var(--catalog-border); border-radius: 13px; background: var(--catalog-surface); box-shadow: 0 18px 38px rgba(0,0,0,.14); }
.suggestion-option { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px; border: 0; border-radius: 9px; background: transparent; text-align: right; cursor: pointer; transition: background-color .2s ease; }
html[dir="ltr"] .suggestion-option { text-align:left; }
.suggestion-option:hover, .suggestion-option:focus { outline: none; background: var(--catalog-green-soft); }
.suggestion-thumb { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; overflow: hidden; border-radius: 9px; background: #fff; border: 1px solid var(--catalog-border); }
.suggestion-thumb img { width: 100%; height: 100%; object-fit: contain; }
.suggestion-text { min-width: 0; }
.suggestion-text strong, .suggestion-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-text strong { color: var(--catalog-text); font-size: 11px; }
.suggestion-text small { margin-top: 2px; color: var(--catalog-muted); font-size: 9px; }
.control-select { min-width: 0; }
.control-select > label { margin: 0 2px 4px; font-size: 9px; color: var(--catalog-muted); }
.control-select .select-wrap select { height: 38px; font-size: 10px; background: var(--catalog-surface); }
.control-select .select-wrap > svg { width: 14px; height: 14px; }
.active-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-height: 0; margin-bottom: 16px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid rgba(36,118,66,.16); border-radius: 50px; color: var(--catalog-green); background: var(--catalog-green-soft); font-size: 9px; font-weight: 800; }
.filter-chip button { display: grid; place-items: center; width: 15px; height: 15px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 14px; }

/* ---------- Product cards: 4 columns x 4 rows per page ---------- */
.products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: 17px; }
.catalog-product-card { position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--catalog-border); border-radius: 18px; background: var(--catalog-surface); box-shadow: 0 9px 26px rgba(23,58,34,.035); opacity: 0; transform: translateY(22px); animation: product-card-enter .55s cubic-bezier(.22,1,.36,1) forwards; animation-delay: var(--card-delay, 0s); transition: transform .38s cubic-bezier(.22,1,.36,1), box-shadow .38s ease, border-color .3s ease, background-color .35s ease; }
@keyframes product-card-enter { to { opacity: 1; transform: translateY(0); } }
.catalog-product-card::before { content: ""; position: absolute; z-index: 3; top: 0; inset-inline-start: 0; width: 0; height: 4px; background: linear-gradient(90deg, var(--catalog-green), var(--catalog-gold)); transition: width .42s ease; }
.catalog-product-card:hover { z-index: 2; transform: translateY(-8px); border-color: rgba(36,118,66,.35); box-shadow: 0 24px 45px -18px rgba(29,91,49,.32); }
.catalog-product-card:hover::before { width: 100%; }
.dark .catalog-product-card:hover { box-shadow: 0 25px 50px -18px rgba(0,0,0,.7); border-color: rgba(93,184,112,.45); }
/* غلاف صورة المنتج */
.catalog-page .product-card-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: calc(100% - 20px);
    height: 220px;
    margin: 10px 10px 0;
    padding: 12px;

    overflow: hidden;
    border: 1px solid rgba(18, 52, 29, .07);
    border-radius: 13px;
    background: #fff;
}
/* عرض الصورة كاملة داخل الغلاف */
.catalog-page .product-card-image img {
    display: block;

    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;

    padding: 0;
    margin: auto;

    object-fit: contain;
    object-position: center;

    transform: none !important;
    transition: none;
}
/* .catalog-product-card:hover .product-card-image img { transform: scale(1.07); } */
/* منع تكبير الصورة عند التحويم */
.catalog-page .catalog-product-card:hover .product-card-image img {
    transform: none !important;
}

.product-card-image::after { content: ""; position: absolute; inset: auto 0 0; height: 32px; background: linear-gradient(0deg, rgba(255,255,255,.15), transparent); pointer-events: none; }
.product-category-tag { position: absolute; z-index: 2; top: 10px; inset-inline-start: 10px; padding: 4px 8px; border-radius: 7px; background: rgba(231,245,232,.96); color: #246d3b; font-size: 9px; font-weight: 900; backdrop-filter: blur(5px); }
.product-video-indicator { position: absolute; z-index: 2; top: 9px; inset-inline-end: 9px; display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid rgba(36,118,66,.1); border-radius: 50%; background: rgba(255,255,255,.93); color: var(--catalog-green); }
.product-video-indicator svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.card-quick-view { position: absolute; z-index: 4; bottom: 9px; left: 50%; transform: translate(-50%, 9px); display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid rgba(255,255,255,.65); border-radius: 50px; background: rgba(20,74,39,.90); color: #fff; opacity: 0; text-decoration: none; white-space: nowrap; font-size: 9px; font-weight: 900; transition: opacity .25s ease, transform .3s ease; }
.catalog-product-card:hover .card-quick-view,
.catalog-product-card:focus-within .card-quick-view { opacity: 1; transform: translate(-50%, 0); }
.card-quick-view svg { width: 13px; height: 13px; }
.product-card-content { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 15px 15px 14px; }
.product-card-agency { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; color: var(--catalog-muted); font-size: 9px; font-weight: 800; }
.product-card-agency svg { width: 13px; height: 13px; color: var(--catalog-green); }
.product-card-title { margin: 0 0 8px; font-size: 15px; line-height: 1.5; font-weight: 900; }
.product-card-title a { display: -webkit-box; overflow: hidden; color: var(--catalog-text); text-decoration: none; -webkit-box-orient: vertical; -webkit-line-clamp: 1; transition: color .25s ease; }
.catalog-product-card:hover .product-card-title a { color: var(--catalog-green); }
.product-card-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.product-mini-tag { padding: 3px 7px; border-radius: 6px; color: var(--catalog-green); background: var(--catalog-green-soft); font-size: 9px; font-weight: 900; }
.product-mini-tag.type-tag { color: #92641b; background: #fff4dc; }
.dark .product-mini-tag.type-tag { color: #f6c66f; background: rgba(244,169,31,.13); }
.product-active-line { display: flex; align-items: flex-start; gap: 6px; min-width: 0; margin-bottom: 9px; color: var(--catalog-text); font-size: 10px; font-weight: 800; line-height: 1.7; }
.product-active-line svg { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 3px; color: var(--catalog-green); }
.product-active-line span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.product-card-description { display: -webkit-box; overflow: hidden; margin: 0 0 15px; color: var(--catalog-muted); font-size: 10px; line-height: 1.85; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--catalog-border); }
.product-card-footer small { display: inline-flex; align-items: center; gap: 5px; color: var(--catalog-muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.product-card-footer small svg { width: 13px; height: 13px; color: var(--catalog-green); }
.product-more-link { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 0; color: var(--catalog-green); font-size: 10px; font-weight: 900; text-decoration: none; white-space: nowrap; transition: gap .25s ease, color .25s ease; }
.product-more-link svg { width: 14px; height: 14px; }
.product-more-link:hover { gap: 10px; color: var(--catalog-gold); }

/* ---------- Empty results and pagination ---------- */
.catalog-empty { padding: 55px 25px; margin-top: 8px; border: 1px dashed var(--catalog-border); border-radius: 20px; background: var(--catalog-surface); text-align: center; }
.catalog-empty > span { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; color: var(--catalog-green); background: var(--catalog-green-soft); }
.catalog-empty > span svg { width: 29px; height: 29px; }
.catalog-empty h3 { margin: 16px 0 5px; font-size: 19px; }
.catalog-empty p { margin: 0 0 18px; color: var(--catalog-muted); font-size: 12px; }
.catalog-empty button { padding: 10px 18px; border: 0; border-radius: 10px; background: var(--catalog-green); color: #fff; font-weight: 900; font-size: 11px; cursor: pointer; }
.catalog-pagination { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 30px 0 10px; }
.pagination-page, .pagination-arrow { display: grid; place-items: center; min-width: 39px; height: 39px; padding: 0 9px; border: 1px solid var(--catalog-border); border-radius: 11px; background: var(--catalog-surface); color: var(--catalog-text); font-size: 11px; font-weight: 900; text-decoration: none; cursor: pointer; transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease; }
.pagination-page:hover, .pagination-arrow:hover { transform: translateY(-2px); border-color: var(--catalog-green); color: var(--catalog-green); }
.pagination-page.active { color: #fff; background: var(--catalog-green); border-color: var(--catalog-green); box-shadow: 0 7px 15px rgba(36,118,66,.20); }
.pagination-arrow svg { width: 15px; height: 15px; }
.pagination-arrow:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.pagination-meta { margin-inline-start: 8px; color: var(--catalog-muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.catalog-demo-note { margin: 19px 0 0; color: var(--catalog-muted); font-size: 10px; text-align: center; }

/* ---------- Dark mode / language direction / motion ---------- */
.dark .catalog-hero { filter: saturate(.91); }
.dark .catalog-product-card,
.dark .catalog-sidebar,
.dark .catalog-toolbar,
.dark .catalog-search,
.dark .search-suggestions,
.dark .catalog-empty { box-shadow: 0 12px 30px rgba(0,0,0,.18); }
/* .dark .product-card-image { background: #f8faf8; }
.dark .suggestion-thumb { background: #f8faf8; } */
/* ============================================================
   DARK MODE — خلفيات الصور في متجر المنتجات
   ============================================================ */

.dark .product-card-image,
.dark .suggestion-thumb {
    background: #0e2a18;
    border-color: rgba(255, 255, 255, .10);
}
html[dir="ltr"] .catalog-section-heading,
html[dir="ltr"] .catalog-toolbar,
html[dir="ltr"] .product-card-footer { direction: ltr; }
html[dir="ltr"] .catalog-sidebar { text-align: left; }

@media (max-width: 1250px) {
    .catalog-layout { grid-template-columns: minmax(220px, 255px) minmax(0,1fr); gap: 20px; }
    .catalog-controls { grid-template-columns: minmax(190px,1.4fr) minmax(120px,.8fr) minmax(120px,.8fr); }
    .sort-control { grid-column: 3; }
    .products-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .product-card-image { height: 190px; }
}
@media (max-width: 960px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar { position: static; display: none; }
    .catalog-sidebar.is-open { display: block; animation: sidebar-down .3s ease both; }
    @keyframes sidebar-down { from { opacity:0; transform:translateY(-7px); } to { opacity:1; transform:translateY(0); } }
    .mobile-filter-toggle { display: inline-flex; }
    .catalog-toolbar { flex-wrap: wrap; }
    .toolbar-count { margin-inline-start: auto; }
    .products-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .catalog-section { width: min(100% - 36px, 1440px); padding-block: 56px 70px; }
    .hero-floating-note { bottom: 57px; }
}
@media (max-width: 720px) {
    .catalog-hero { height: auto; min-height: 390px; padding: 39px 24px 76px; background-position: 58% center; }
    .catalog-hero::before { background: linear-gradient(100deg, rgba(8,37,21,.91) 0%, rgba(14,57,31,.82) 66%, rgba(15,64,33,.45) 100%); }
    .catalog-hero-content { width: 100%; }
    .catalog-hero h1 { font-size: clamp(37px, 9vw, 49px); }
    .hero-description { max-width: 470px; font-size: 12px; }
    .hero-proof-row { gap: 12px; font-size: 9px; }
    .hero-floating-note { display: none; }
    .hero-bottom-line { right: 24px; left: 24px; bottom: 23px; }
    html[dir="ltr"] .hero-bottom-line { right: 24px; left: 24px; }
    .catalog-section { width: calc(100% - 28px); padding: 43px 0 55px; }
    .catalog-section-heading { margin-bottom: 24px; }
    .catalog-section-heading h2 { font-size: 27px; }
    .catalog-heading-mark { width: 60px; height: 60px; border-radius: 19px; }
    .catalog-heading-mark svg { width: 42px; height: 42px; }
    .catalog-section-heading p { font-size: 11px; }
    .catalog-toolbar { gap: 10px; padding: 11px; }
    .toolbar-title-icon { width: 36px; height: 36px; }
    .toolbar-title strong { font-size: 12px; }
    .toolbar-title small { font-size: 9px; }
    .toolbar-count { width: 100%; padding-inline-start: 46px; margin-top: -7px; font-size: 9px; }
    .mobile-filter-toggle { min-height: 36px; padding-inline: 10px; font-size: 10px; }
    .catalog-controls { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
    .catalog-search { grid-column: 1 / -1; height: 49px; }
    .control-select .select-wrap select { height: 41px; font-size: 10px; }
    .sort-control { grid-column: auto; }
    /* عمود واحد على الهواتف مع مساحة صورة أكبر */
    .products-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .catalog-product-card {
        width: 100%;
        min-width: 0;
        border-radius: 16px;
    }
    .product-card-image {
        width: calc(100% - 16px);
        height: clamp(220px, 58vw, 320px);
        margin: 8px 8px 0;
        border-radius: 12px;
    }
    .product-card-image img {
        width: 100%;
        height: 100%;
        padding: 8px;
        object-fit: contain;
    }
    .product-card-content { padding: 15px 14px 14px; }
    .product-card-title { font-size: 15px; line-height: 1.7; }
    .product-card-agency { font-size: 9px; }
    .product-card-description { font-size: 11px; line-height: 1.9; }
    .product-card-footer { flex-wrap: wrap; align-items: center; }
    .product-card-footer small { font-size: 8px; }
    .product-more-link { font-size: 9px; }
    .product-category-tag { top: 7px; inset-inline-start: 7px; font-size: 8px; padding: 3px 6px; }
    .product-video-indicator { top: 6px; inset-inline-end: 6px; width: 25px; height: 25px; }
    .card-quick-view { display: none; }
    .catalog-pagination { gap: 5px; flex-wrap: wrap; }
    .pagination-page, .pagination-arrow { min-width: 34px; height: 35px; border-radius: 9px; }
    .pagination-meta { width: 100%; margin: 7px 0 0; text-align: center; }
}
@media (max-width: 420px) {
    .catalog-hero { min-height: 378px; padding-inline: 19px; }
    .hero-proof-row { gap: 9px; }
    .catalog-section-heading { align-items: flex-start; }
    .catalog-heading-mark { display: none; }
    .catalog-section { width: calc(100% - 22px); }
    .products-grid { gap: 12px; }
    /* لا تصغّر الصورة على الهواتف الصغيرة */
    .product-card-image { height: clamp(200px, 62vw, 260px); }
    .product-card-content { padding: 13px 12px; }
    .product-card-title { font-size: 14px; }
    .product-card-tags { gap: 4px; }
    .product-mini-tag { font-size: 8px; padding: 3px 5px; }
    .product-active-line { font-size: 9px; }
    .product-card-footer { display: grid; grid-template-columns: 1fr; gap: 5px; }
    .product-card-footer > * { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* تركيب المنتج — سطران بحد أقصى */

.catalog-product-card .product-active-line {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.catalog-product-card .product-active-line > svg {
    flex: 0 0 15px;
}

.catalog-product-card .product-active-line > span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    overflow: hidden;
    min-width: 0;
    max-width: 100%;

    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;

    white-space: normal;
    overflow-wrap: anywhere;

    line-height: 1.8;
    word-spacing: normal;
    letter-spacing: normal;
}

/* Selected Agricultural Problem Symptoms */

.catalog-problem-symptoms {
    margin: 16px 0;
    padding: 18px;
    border: 1px solid var(--border-color, currentColor);
    border-radius: 14px;
    background: var(--card-bg, transparent);
    color: inherit;
}

.catalog-problem-symptoms[hidden] {
    display: none !important;
}

.catalog-problem-symptoms-title,
.catalog-problem-symptoms > strong {
    display: block;
    margin-bottom: 12px;
    color: inherit;
    font-size: 15px;
    font-weight: 700;
}

.catalog-problem-symptoms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.catalog-problem-symptoms-list > span {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--border-color, currentColor);
    border-radius: 999px;
    background: var(--card-bg, transparent);
    color: inherit;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .catalog-problem-symptoms {
        padding: 14px;
    }

    .catalog-problem-symptoms-list > span {
        font-size: 12px;
    }
}
