/* Isolated styles for the Asanik product results page */
.as-search{max-width:1320px;margin:24px auto 60px;padding:0 18px;color:#17233d;font-family:inherit}.as-search *{box-sizing:border-box}
.as-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:12px 0 26px}.as-heading h1{font-size:clamp(22px,2.5vw,32px);margin:8px 0}.as-heading p{color:#64748b;margin:0}.as-eyebrow{color:#0891b2;font-weight:700;font-size:13px}.as-result-count{background:#e0f2fe;color:#075985;padding:10px 14px;border-radius:14px;font-size:13px}
.as-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:22px;align-items:start}.as-sidebar{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:20px;box-shadow:0 8px 28px #0f172a0b;display:grid;gap:16px}.as-filter-title{display:flex;justify-content:space-between;align-items:center;font-size:17px}.as-sidebar label{display:grid;gap:8px;font-size:13px;font-weight:600}.as-sidebar input,.as-sidebar select,.as-toolbar select{width:100%;min-width:0;border:1px solid #dbe3ed;border-radius:10px;padding:11px;background:#fff;color:#1e293b;font:inherit}.as-primary{background:linear-gradient(110deg,#2255c7,#079d9b);color:#fff;border:0;border-radius:11px;padding:12px;font:inherit;cursor:pointer}.as-reset{text-align:center;text-decoration:none;color:#64748b;font-size:13px}.as-results{min-width:0}.as-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;background:#fff;border:1px solid #e2e8f0;padding:13px 16px;border-radius:15px;margin-bottom:18px;font-size:13px}.as-toolbar label{display:flex;align-items:center;gap:10px}.as-toolbar select{width:auto}.as-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.as-grid>*{min-width:0}.as-pages{display:flex;flex-wrap:wrap;gap:7px;justify-content:center;margin:26px 0}.as-pages a{padding:8px 13px;border:1px solid #dbe3ed;border-radius:9px;text-decoration:none;color:#334155}.as-pages a.active{background:#2255c7;color:#fff}.as-empty{padding:40px 16px;text-align:center;background:#f8fafc;border-radius:14px}.as-filter-toggle,.as-close{display:none}.as-overlay[hidden]{display:none!important}
@media(max-width:1050px){.as-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.as-layout{display:block}.as-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.as-heading{align-items:flex-start}.as-result-count{font-size:11px}.as-filter-toggle,.as-close{display:inline-flex;align-items:center;border:0;border-radius:8px;padding:8px 12px;background:#e0f2fe;color:#075985;cursor:pointer}.as-sidebar{position:fixed;top:0;right:0;bottom:0;z-index:10002;width:min(330px,90vw);overflow-y:auto;border-radius:0;transform:translateX(110%);transition:transform .22s ease}.as-sidebar.is-open{transform:translateX(0)}.as-overlay:not([hidden]){position:fixed;inset:0;background:#0f172a80;z-index:10001}.as-filter-open{overflow:hidden}}@media(max-width:410px){.as-search{padding:0 10px}.as-grid{gap:8px}.as-toolbar{padding:10px}.as-toolbar label{width:100%;justify-content:space-between}}

/* Product card isolation: works with the existing _ProductCardZamani partial */
.as-search .as-grid { align-items:stretch; }
.as-search .as-product-card {
  min-width:0; width:100%; overflow:hidden; position:relative;
  background:#fff; border:1px solid #e3eaf2; border-radius:16px;
  box-shadow:0 4px 18px rgba(18,40,74,.06);
  padding:12px; display:flex; flex-direction:column;
  transition:box-shadow .2s ease,transform .2s ease;
}
.as-search .as-product-card:hover {box-shadow:0 12px 26px rgba(18,40,74,.12);transform:translateY(-2px)}
.as-search .as-product-card > * {max-width:100%;min-width:0}
.as-search .as-product-card :is(h2,h3,h4,p) {overflow-wrap:anywhere}
.as-search .as-product-card :is(h2,h3,h4) {font-size:14px;line-height:1.75;margin:8px 0;font-weight:650}
.as-search .as-product-card a {max-width:100%}
@media(max-width:760px){
 .as-search .as-product-card {padding:9px;border-radius:12px}
 .as-search .as-product-card :is(h2,h3,h4){font-size:12px}
}
@media(max-width:390px){.as-search .as-grid{grid-template-columns:minmax(0,1fr)}}

/* Card layout: preserve existing partial markup and force safe image dimensions */
.as-search .as-product-card { min-height:340px; isolation:isolate; }
.as-search .as-product-card :is(.product-card,.featured-product,.featured-item,.card,.product-item) {width:100%;max-width:100%;min-width:0;display:flex;flex-direction:column;flex:1 1 auto;overflow:hidden;}
.as-search .as-product-card :is(.product-image,.product-img,.image-box,.img-box,.card-image,.featured-image,.product-thumb) {width:100%;height:195px;max-height:195px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fff;}
.as-search .as-product-card :is(.product-image,.product-img,.image-box,.img-box,.card-image,.featured-image,.product-thumb) img {width:100%!important;height:100%!important;max-height:100%!important;object-fit:contain!important;}
.as-search .as-product-card img:not(.icon):not(.svg-icon) {display:block;max-width:100%!important;object-fit:contain!important;}
.as-search .as-product-card > a:has(> img),.as-search .as-product-card :is(.product-card,.featured-product,.featured-item,.card,.product-item) > a:has(> img) {display:flex;align-items:center;justify-content:center;height:195px;max-height:195px;overflow:hidden;}
.as-search .as-product-card > a > img,.as-search .as-product-card :is(.product-card,.featured-product,.featured-item,.card,.product-item) > a > img {max-height:195px!important;height:100%!important;object-fit:contain!important;}
.as-search .as-product-card :is(.product-title,.product-name,.card-title) {font-size:14px;line-height:1.8;min-height:48px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;}
.as-search .as-product-card :is(.price,.product-price,.card-price) {margin-top:auto;font-weight:700;}
@media(max-width:760px){.as-search .as-product-card{min-height:290px}.as-search .as-product-card :is(.product-image,.product-img,.image-box,.img-box,.card-image,.featured-image,.product-thumb),.as-search .as-product-card > a:has(> img),.as-search .as-product-card :is(.product-card,.featured-product,.featured-item,.card,.product-item) > a:has(> img){height:145px;max-height:145px}.as-search .as-product-card > a > img,.as-search .as-product-card :is(.product-card,.featured-product,.featured-item,.card,.product-item) > a > img{max-height:145px!important}}


/* Language and theme: scoped to product results only. */
.as-search[data-as-lang="en"] { direction:ltr; text-align:left; }
.as-search[data-as-lang="fa"], .as-search[data-as-lang="ar"] { direction:rtl; text-align:right; }
.as-search[data-as-lang="en"] .as-sidebar { left:0;right:auto; }
@media(max-width:760px){
 .as-search[data-as-lang="en"] .as-sidebar { transform:translateX(-110%); }
 .as-search[data-as-lang="en"] .as-sidebar.is-open { transform:translateX(0); }
}

:is(html,body)[data-theme="dark"] .as-search, :is(html,body).dark .as-search, :is(html,body).dark-mode .as-search, :is(html,body)[data-bs-theme="dark"] .as-search { color:#eef2f9; }
:is(html,body)[data-theme="dark"] .as-search :is(.as-sidebar,.as-toolbar,.as-empty,.as-product-card), :is(html,body).dark .as-search :is(.as-sidebar,.as-toolbar,.as-empty,.as-product-card), :is(html,body).dark-mode .as-search :is(.as-sidebar,.as-toolbar,.as-empty,.as-product-card), :is(html,body)[data-bs-theme="dark"] .as-search :is(.as-sidebar,.as-toolbar,.as-empty,.as-product-card) {background:#202734;color:#f3f5fa;border-color:#485365;}
:is(html,body)[data-theme="dark"] .as-search :is(input,select), :is(html,body).dark .as-search :is(input,select), :is(html,body).dark-mode .as-search :is(input,select), :is(html,body)[data-bs-theme="dark"] .as-search :is(input,select) {background:#303d51;color:#fff;border-color:#65718a;}

/* Scoped to the Zamani product search page. Does not modify site-wide layout. */
:is([data-asanik-products],.as-search)[data-as-lang="en"] { direction:ltr; text-align:left; }
:is([data-asanik-products],.as-search)[data-as-lang="fa"], :is([data-asanik-products],.as-search)[data-as-lang="ar"] { direction:rtl; text-align:right; }
:is([data-asanik-products],.as-search) .azp-card-v2 { color:var(--az-text, inherit); }
:is([data-asanik-products],.as-search) .azp-card-v2 .azp-specs b { unicode-bidi:plaintext; }
/* Theme detection covers the common theme switches in the existing site. */
:is(html,body)[data-theme="dark"] :is([data-asanik-products],.as-search) .azp-card-v2,
:is(html,body).dark :is([data-asanik-products],.as-search) .azp-card-v2,
:is(html,body).dark-mode :is([data-asanik-products],.as-search) .azp-card-v2,
:is(html,body)[data-bs-theme="dark"] :is([data-asanik-products],.as-search) .azp-card-v2 {
  background:#202734 !important; color:#f3f5fa !important; border-color:#485365 !important;
}
:is(html,body)[data-theme="dark"] :is([data-asanik-products],.as-search) .azp-card-v2 :is(.azp-content,.azp-title,.azp-title a,.azp-specs,.azp-specs span,.azp-price,.azp-price strong),
:is(html,body).dark :is([data-asanik-products],.as-search) .azp-card-v2 :is(.azp-content,.azp-title,.azp-title a,.azp-specs,.azp-specs span,.azp-price,.azp-price strong),
:is(html,body).dark-mode :is([data-asanik-products],.as-search) .azp-card-v2 :is(.azp-content,.azp-title,.azp-title a,.azp-specs,.azp-specs span,.azp-price,.azp-price strong),
:is(html,body)[data-bs-theme="dark"] :is([data-asanik-products],.as-search) .azp-card-v2 :is(.azp-content,.azp-title,.azp-title a,.azp-specs,.azp-specs span,.azp-price,.azp-price strong) {color:#f3f5fa !important;}
:is(html,body)[data-theme="dark"] :is([data-asanik-products],.as-search) .azp-card-v2 :is(.azp-tool-v2,.azp-qty-v2 input,.azp-view),
:is(html,body).dark :is([data-asanik-products],.as-search) .azp-card-v2 :is(.azp-tool-v2,.azp-qty-v2 input,.azp-view),
:is(html,body).dark-mode :is([data-asanik-products],.as-search) .azp-card-v2 :is(.azp-tool-v2,.azp-qty-v2 input,.azp-view),
:is(html,body)[data-bs-theme="dark"] :is([data-asanik-products],.as-search) .azp-card-v2 :is(.azp-tool-v2,.azp-qty-v2 input,.azp-view) {color:#fff !important; background:#303d51; border-color:#65718a;}


/* 2026-11-06: Explicit contrast for the actual product cards and filter panel.
   Scoped to product results; never change the site's global theme. */
:is(.as-search,[data-asanik-products]) :is(.as-sidebar,.as-toolbar,.as-empty) {
  background-color:#ffffff !important;
  color:#17233d !important;
  border-color:#dbe3ed !important;
}
:is(.as-search,[data-asanik-products]) :is(.as-sidebar,.as-toolbar,.as-empty) :is(h1,h2,h3,h4,label,span,p,strong,b,small) {
  color:#17233d !important;
}
:is(.as-search,[data-asanik-products]) :is(.as-sidebar,.as-toolbar) :is(input,select,textarea) {
  background-color:#ffffff !important;
  color:#17233d !important;
  border-color:#cbd5e1 !important;
}
:is(.as-search,[data-asanik-products]) :is(.as-sidebar,.as-toolbar) :is(input,textarea)::placeholder {color:#64748b !important;opacity:1}
:is(.as-search,[data-asanik-products]) .azp-card-v2 {
  background-color:#ffffff !important;
  color:#17233d !important;
  border-color:#e3eaf2 !important;
}
:is(.as-search,[data-asanik-products]) .azp-card-v2 :is(.azp-content,.azp-title,.azp-title a,.azp-specs,.azp-specs span,.azp-specs b,.azp-price,.azp-price strong,.azp-price small) {
  color:#17233d !important;
}
:is(.as-search,[data-asanik-products]) .azp-card-v2 :is(.azp-tool-v2,.azp-qty-v2,.azp-qty-v2 input,.azp-view) {
  color:#17233d !important;
}
:is(.as-search,[data-asanik-products]) .azp-card-v2 .azp-image {background:#fff !important}

/* Match the existing theme switches on html OR body. */
:is(html[data-theme="dark"],body[data-theme="dark"],html[data-bs-theme="dark"],body[data-bs-theme="dark"],html.dark,body.dark,html.dark-mode,body.dark-mode,html.theme-dark,body.theme-dark) :is(.as-search,[data-asanik-products]) :is(.as-sidebar,.as-toolbar,.as-empty) {
  background-color:#202734 !important;
  color:#f3f5fa !important;
  border-color:#485365 !important;
}
:is(html[data-theme="dark"],body[data-theme="dark"],html[data-bs-theme="dark"],body[data-bs-theme="dark"],html.dark,body.dark,html.dark-mode,body.dark-mode,html.theme-dark,body.theme-dark) :is(.as-search,[data-asanik-products]) :is(.as-sidebar,.as-toolbar,.as-empty) :is(h1,h2,h3,h4,label,span,p,strong,b,small) {color:#f3f5fa !important}
:is(html[data-theme="dark"],body[data-theme="dark"],html[data-bs-theme="dark"],body[data-bs-theme="dark"],html.dark,body.dark,html.dark-mode,body.dark-mode,html.theme-dark,body.theme-dark) :is(.as-search,[data-asanik-products]) :is(.as-sidebar,.as-toolbar) :is(input,select,textarea) {
  background-color:#303d51 !important;
  color:#fff !important;
  border-color:#65718a !important;
}
:is(html[data-theme="dark"],body[data-theme="dark"],html[data-bs-theme="dark"],body[data-bs-theme="dark"],html.dark,body.dark,html.dark-mode,body.dark-mode,html.theme-dark,body.theme-dark) :is(.as-search,[data-asanik-products]) :is(.as-sidebar,.as-toolbar) :is(input,textarea)::placeholder {color:#c4ccdb !important}
:is(html[data-theme="dark"],body[data-theme="dark"],html[data-bs-theme="dark"],body[data-bs-theme="dark"],html.dark,body.dark,html.dark-mode,body.dark-mode,html.theme-dark,body.theme-dark) :is(.as-search,[data-asanik-products]) .azp-card-v2 {
  background-color:#202734 !important;
  color:#f3f5fa !important;
  border-color:#485365 !important;
}
:is(html[data-theme="dark"],body[data-theme="dark"],html[data-bs-theme="dark"],body[data-bs-theme="dark"],html.dark,body.dark,html.dark-mode,body.dark-mode,html.theme-dark,body.theme-dark) :is(.as-search,[data-asanik-products]) .azp-card-v2 :is(.azp-content,.azp-title,.azp-title a,.azp-specs,.azp-specs span,.azp-specs b,.azp-price,.azp-price strong,.azp-price small) {color:#f3f5fa !important}
:is(html[data-theme="dark"],body[data-theme="dark"],html[data-bs-theme="dark"],body[data-bs-theme="dark"],html.dark,body.dark,html.dark-mode,body.dark-mode,html.theme-dark,body.theme-dark) :is(.as-search,[data-asanik-products]) .azp-card-v2 :is(.azp-tool-v2,.azp-qty-v2,.azp-qty-v2 input,.azp-view) {color:#f3f5fa !important;background-color:#303d51 !important;border-color:#65718a !important}
/* Preserve white product-image backgrounds in both themes. */

/* Asanik actual theme switch: html[data-asanik-theme="dark"].
   This rule must follow the base product stylesheet. */
html[data-asanik-theme="dark"] .as-search :is(.as-heading,.as-heading h1,.as-heading p,.as-eyebrow,.as-result-count,.as-filter-title,.as-filter-title strong,.as-sidebar label,.as-toolbar label,.as-toolbar span,.as-reset) {
  color:#f3f6ff !important;
  -webkit-text-fill-color:#f3f6ff !important;
}
html[data-asanik-theme="dark"] .as-search :is(.as-sidebar,.as-toolbar,.as-empty) {
  background:#182436 !important;
  color:#f3f6ff !important;
  border-color:#4a6078 !important;
}
html[data-asanik-theme="dark"] .as-search :is(.as-sidebar,.as-toolbar,.as-empty) :is(h1,h2,h3,h4,p,span,label,strong,b,small) {
  color:#f3f6ff !important;
  -webkit-text-fill-color:#f3f6ff !important;
}
html[data-asanik-theme="dark"] .as-search :is(.as-sidebar,.as-toolbar) :is(input,select,textarea) {
  background:#26364b !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#71849f !important;
}
html[data-asanik-theme="dark"] .as-search .as-primary,
html[data-asanik-theme="dark"] .as-search .as-primary :is(span,strong,b) {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}
html[data-asanik-theme="dark"] .as-search .as-reset {color:#dbe6f7 !important;-webkit-text-fill-color:#dbe6f7 !important;}
html[data-asanik-theme="dark"] .as-search .azp-card-v2 :is(.azp-title,.azp-title a,.azp-content,.azp-specs,.azp-specs span,.azp-price,.azp-price strong) {
  color:#17233d !important;
  -webkit-text-fill-color:#17233d !important;
}
/* The product cards remain white in the existing design. */
html[data-asanik-theme="dark"] .as-search .azp-card-v2 {background:#fff !important;color:#17233d !important;}
