/* ==========================================================================
   KnowTech — polish layer
   --------------------------------------------------------------------------
   Loaded after kt-design-system.css and kt-design-system-v2.css. Every rule
   here fixes a defect that was visible in full-page screenshots of the live
   site (desktop 1440 and mobile 390), not a matter of taste. Each block names
   what was broken so a later pass can tell whether the rule is still needed.
   ========================================================================== */

/* --- 1. Screen-reader text was printed on the page -------------------------
   WooCommerce writes the price range twice: once for sighted users and once
   inside .screen-reader-text for assistive tech. No stylesheet on the site
   hid that class, so every product card showed «۳۰/۰۰۰/۰۰۰ – ۵۵۰/۰۰۰/۰۰۰»
   followed by «محدوده قیمت: ۳۰/۰۰۰/۰۰۰ تا ۵۵۰/۰۰۰/۰۰۰». */
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* An absolutely-positioned element is placed against its nearest positioned
   ancestor. Inside the phone carousels no ancestor was positioned, so the
   hidden price text was laid out against the page itself — at its natural
   spot far to the left of the swiped-away cards — and stretched the whole
   page to 718px wide. Anchor it to its own price block. */
.kt-product-price,
.kt-product-card,
.kt-product-tile {
  position: relative;
}

.screen-reader-text:focus {
  width: auto !important;
  height: auto !important;
  clip: auto !important;
  clip-path: none !important;
}

/* --- 2. Home hero slid under the header ------------------------------------
   The hero was pulled up by the header's height back when the header was
   transparent over a dark hero. The header is now opaque and sticky, so the
   pull-up just hid the top 76px of the hero: the finder card's edge touched
   the header and the eyebrow sat under it. */
body.home .kt-hero {
  margin-top: 0 !important;
}

/* --- 3. Final call-to-action heading was invisible -------------------------
   Dark ink (#213447) on the dark navy card. */
.kt-final-card h2,
.kt-final-card .kt-section-heading h2 {
  color: #f4f8fc !important;
}

/* --- 4. FAQ -------------------------------------------------------------------
   The plus/minus was two absolutely-positioned bars with no centring, so they
   landed off-axis and read as a slanted «=». The rows also had no inner
   padding: question text ran into the list's edge. */
.kt-faq-list details {
  padding: 0 22px !important;
  margin-bottom: 10px;
  border: 1px solid #e7e3de !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.kt-faq-list details:last-child {
  margin-bottom: 0;
}

.kt-faq-list summary {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 0 !important;
  cursor: pointer;
}

.kt-faq-list summary span {
  position: relative !important;
  display: block !important;
  flex: 0 0 28px;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  border: 1px solid #dccfc8 !important;
  border-radius: 50% !important;
  background: #fff !important;
  transform: none !important;
}

.kt-faq-list summary span::before,
.kt-faq-list summary span::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  margin: auto !important;
  border-radius: 2px;
  background: #9a5b45 !important;
  transition: transform .22s ease, opacity .22s ease;
}

.kt-faq-list summary span::before {
  width: 11px !important;
  height: 2px !important;
}

.kt-faq-list summary span::after {
  width: 2px !important;
  height: 11px !important;
  opacity: 1;
  transform: none !important;
}

.kt-faq-list details[open] summary span {
  border-color: #b87965 !important;
  background: #fbf3ef !important;
}

.kt-faq-list details[open] summary span::after {
  opacity: 0 !important;
  transform: rotate(90deg) !important;
}

.kt-faq-list details > p,
.kt-faq-list details > div {
  margin: 0 !important;
  padding: 0 0 18px !important;
}

/* --- 5. Floating buttons covered headings ----------------------------------
   On desktop the support bubble and the back-to-top button both sat in the
   bottom-right corner — on top of each other, and on top of every right-
   aligned (RTL) section title that scrolled past. Headings start on the right
   in Persian, so the empty corner is the left one. */
@media (min-width: 861px) {
  .kt-support-widget {
    inset: auto auto 22px 22px !important;
  }

  .kt-return-top {
    right: auto !important;
    left: 29px !important;
    bottom: 92px !important;
  }
}

/* --- 6. Footer ---------------------------------------------------------------- */

/* A 300px outlined circle drawn behind the brand block read as a stray border. */
.kt-site-footer::before {
  display: none !important;
}

/* The real logo, white on the dark footer (footer.php now uses it). */
.kt-footer-brand {
  display: inline-flex !important;
  align-items: center;
}

.kt-footer-logo {
  display: block;
  width: auto !important;
  height: 40px !important;
  filter: brightness(0) invert(1);
  opacity: .96;
}

/* Phone and email rows were left-aligned (their links were dir="ltr") while
   the address row under them was right-aligned. Only the value is LTR now. */
.kt-footer-contact li,
.kt-footer-contact li > a {
  text-align: start !important;
  justify-items: start;
  align-items: flex-start;
}

.kt-footer-contact b[dir="ltr"] {
  unicode-bidi: isolate;
}

/* --- 7. Product cards (home, shop, related, search) ------------------------ */

/* Grids were four fixed columns; with three products the fourth column sat
   empty on the home page, and the related-products row had a gap too. */
@media (min-width: 861px) {
  .kt-product-grid,
  .kt-products-grid {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)) !important;
  }

  .kt-related-products .kt-products-grid {
    grid-template-columns: repeat(auto-fit, minmax(290px, 420px)) !important;
    justify-content: start;
  }
}

/* The decorative ring behind the card footer looked like a smudge under the
   «مشاهده و انتخاب» link. */
.kt-product-tile::after,
.kt-product-card::after {
  display: none !important;
}

/* Price and action were squeezed into one row: the price wrapped over three
   lines and the link was a 48px-wide column of two words. Price on top, one
   clear full-width action underneath. */
.kt-product-footer,
.kt-product-tile-foot {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
}

.kt-product-price {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  color: #213447 !important;
  font-weight: 700;
  line-height: 1.6 !important;
}

.kt-product-price .woocommerce-Price-amount {
  white-space: nowrap;
}

.kt-product-footer > a,
.kt-product-footer .kt-product-go,
.kt-product-tile-foot > a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100% !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 11px 16px !important;
  border: 1px solid #36536d !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #36536d !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: background-color .2s ease, color .2s ease;
}

.kt-product-footer > a:hover,
.kt-product-footer .kt-product-go:hover,
.kt-product-tile-foot > a:hover {
  background: #36536d !important;
  color: #fff !important;
}

.kt-product-footer > a span,
.kt-product-footer > a:hover span,
.kt-product-tile-foot > a span {
  color: inherit !important;
}

/* Home cards on a phone were laid out sideways — a 120px image strip next to
   a 160px text column — so titles broke after every word and the price ran
   down the card one number per line. Stack them like the shop cards. */
@media (max-width: 860px) {
  .kt-product-card {
    display: flex !important;
    flex-direction: column !important;
  }

  .kt-product-card > .kt-product-media {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10;
  }

  .kt-product-card > .kt-product-media .kt-brand-cover,
  .kt-product-card > .kt-product-media img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .kt-product-card > .kt-product-body {
    width: 100% !important;
  }
}

/* --- 8. Single product: purchase card ---------------------------------------- */

/* Both ends of the price range were forced onto one line and ran past their
   box; the second number was cut off at the card edge. */
.kt-purchase-card .kt-price-range {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-start !important;
  gap: 10px 18px !important;
  min-width: 0;
}

.kt-purchase-card .kt-price-bound {
  min-width: 0;
  white-space: normal !important;
}

.kt-purchase-card .kt-price-bound .woocommerce-Price-amount {
  white-space: nowrap;
}

/* The three assurance chips under the button were ~113px of text each with
   nowrap, so «ثبت سفارش در پنل نوتک» spilled out of its chip. */
.kt-purchase-benefits strong,
.kt-purchase-benefits small,
.kt-purchase-card [class*="assur"] strong,
.kt-purchase-card [class*="assur"] small,
.kt-purchase-card [class*="trust"] strong,
.kt-purchase-card [class*="trust"] small {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

/* The second plan selector sat 12px lower than the first. */
.kt-purchase-card .variation-item {
  align-self: end;
}

/* --- 9. Content written into the product description ------------------------
   The description has its own inline three-column grids. On a phone each
   column was ~95px wide and every heading broke after each word. */
@media (max-width: 640px) {
  .kt-product-description [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .kt-product-description [style*="display: flex"][style*="wrap"] > [style*="flex: 1"] {
    flex-basis: 100% !important;
    min-width: 0 !important;
  }
}

/* --- 10. «روش کار نوتک» steps on a phone -------------------------------------
   The four steps scroll sideways, but with no card surface the second step
   simply looked cut off. Give each step a card so the row reads as swipeable. */
@media (max-width: 860px) {
  .kt-journey-list {
    gap: 12px !important;
    padding: 2px 2px 14px !important;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
  }

  .kt-journey-item {
    padding: 18px !important;
    border: 1px solid #e7e3de !important;
    border-radius: 18px !important;
    background: #fff !important;
    scroll-snap-align: start;
  }
}

/* --- 11. Cart: an off-brand bright blue button ------------------------------- */
.woocommerce-cart .btn.btn-primary,
.kt-cart-empty .btn.btn-primary,
a.btn.btn-primary[href*="my-account"] {
  border: 1px solid #36536d !important;
  background: #fff !important;
  color: #36536d !important;
}

.woocommerce-cart .btn.btn-primary:hover {
  background: #f2f6f8 !important;
}

/* --- 12. Article hero image sat against the right edge of its panel ------ */
.kt-article-hero figure {
  margin-inline: auto !important;
}

/* --- 13. Guide page ------------------------------------------------------------ */

/* All four «مراحل دریافت اکانت» steps showed the same placeholder icon (the
   one uploaded to every ACF row). A step number says more than a copy of the
   same picture. */
.kt-guide-page .values-list {
  counter-reset: kt-guide-step;
}

.kt-guide-page .values-list > li {
  counter-increment: kt-guide-step;
}

.kt-guide-page .values-list > li > img {
  display: none !important;
}

.kt-guide-page .values-list > li::before {
  content: counter(kt-guide-step, persian);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: #fbf3ef;
  color: #9a5b45;
  font-size: 18px;
  font-weight: 800;
}

.kt-guide-page .values-section h2 {
  color: #213447 !important;
}

.kt-guide-page #shape_001 {
  display: none;
}

.kt-guide-page .Page-template-custom .container {
  max-width: none;
  padding-inline: 0;
}

/* Generic page headings had no rule for their lead paragraph. */
.kt-page-heading p {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--kt-field-ink-soft, rgba(228, 238, 249, .88)) !important;
  line-height: 2;
}

/* --- 14. Shop: empty pagination left a 200px gap under the grid ------------- */
.kt-pagination:not(:has(a, .page-numbers)) {
  display: none !important;
}

/* --- 15. Shop: 172px of nothing between the catalogue and the next block ----
   The catalogue's own bottom padding plus the next section's top margin. */
.kt-shop-page .kt-shop-choice {
  margin-top: 28px !important;
}

@media (prefers-reduced-motion: reduce) {
  .kt-faq-list summary span::before,
  .kt-faq-list summary span::after,
  .kt-product-footer > a,
  .kt-product-tile-foot > a {
    transition: none;
  }
}

/* --- 16. Search results: the phone product row bled 6px past the screen ----
   Product rows bleed slightly to the edges so the swipe feels continuous; the
   other templates clip that at <main>, the search template did not. */
.kt-search-page {
  overflow-x: clip;
}

/* --- 17. Phone back-to-top button sat on the right, over card corners and
   the start of right-aligned headings. The left edge is where Persian lines
   end, so it covers the least there. */
@media (max-width: 860px) {
  .kt-return-top {
    right: auto !important;
    left: 14px !important;
  }
}

/* ==========================================================================
   18. Desktop hero owns the first screen
   --------------------------------------------------------------------------
   The hero was a fixed 588px band. On a 1920×1080 monitor the next section's
   heading was already on screen at load, so nothing said "this is the
   opening". Now hero + tool strip exactly fill the viewport under the header,
   the content is centred in that space, and the type scales with the screen.
   Capped so a very tall monitor does not get a sea of empty space.
   ========================================================================== */
@media (min-width: 1025px) {
  body.home .kt-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid !important;
    align-content: center;
    min-height: clamp(600px, calc(100vh - 75px - 78px), 960px) !important;
    min-height: clamp(600px, calc(100svh - 75px - 78px), 960px) !important;
    padding-block: clamp(40px, 5vh, 72px) !important;
    background:
      radial-gradient(48% 62% at 8% 18%, rgba(184, 121, 101, .13), transparent 70%),
      radial-gradient(42% 56% at 92% 88%, rgba(84, 124, 168, .11), transparent 72%),
      linear-gradient(180deg, #fcfbf9 0%, #f6f2ec 100%) !important;
  }

  /* Faint technical grid, faded toward the edges. */
  body.home .kt-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
      linear-gradient(rgba(54, 83, 109, .055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(54, 83, 109, .055) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(70% 70% at 30% 40%, #000 0%, transparent 75%);
    mask-image: radial-gradient(70% 70% at 30% 40%, #000 0%, transparent 75%);
    pointer-events: none;
  }

  body.home .kt-hero-layout {
    align-items: center !important;
    gap: clamp(40px, 5vw, 96px) !important;
  }

  html body.home .kt-hero .kt-hero-copy {
    max-width: 760px;
  }

  html body.home .kt-hero .kt-hero-copy h1 {
    font-size: clamp(2.9rem, 1.1rem + 2.75vw, 4.25rem) !important;
    line-height: 1.38 !important;
    letter-spacing: -.02em;
  }

  html body.home .kt-hero .kt-hero-lead {
    max-width: 620px;
    font-size: clamp(16px, .55rem + .6vw, 19px) !important;
    line-height: 2 !important;
  }

  body.home .kt-hero-actions {
    margin-top: clamp(26px, 4vh, 40px) !important;
  }

  body.home .kt-hero-actions .kt-button {
    min-height: 56px !important;
    padding-inline: 26px !important;
    font-size: 15px !important;
  }

  /* The finder card is the hero's "device": give it presence. */
  body.home .kt-hero-finder > * {
    box-shadow:
      0 1px 2px rgba(35, 58, 78, .05),
      0 30px 70px -28px rgba(35, 58, 78, .30) !important;
  }

  /* The tool strip is the bottom edge of the opening screen. */
  body.home .kt-toolstrip {
    min-height: 78px;
    display: grid;
    align-content: center;
  }

  :root[data-theme="dark"] body.home .kt-hero {
    background:
      radial-gradient(48% 62% at 8% 18%, rgba(184, 121, 101, .14), transparent 70%),
      radial-gradient(42% 56% at 92% 88%, rgba(84, 124, 168, .14), transparent 72%),
      linear-gradient(180deg, #111a22 0%, #0d151c 100%) !important;
  }

  :root[data-theme="dark"] body.home .kt-hero::before {
    background-image:
      linear-gradient(rgba(200, 220, 240, .05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(200, 220, 240, .05) 1px, transparent 1px);
  }
}

/* ==========================================================================
   19. Support widget
   --------------------------------------------------------------------------
   Block 5 moved the launcher to the left edge on desktop, but the plugin
   anchors its panel with right:0 — so the open panel grew leftwards from the
   launcher and 300 of its 380 pixels were off-screen. On phones the launcher
   was hidden outright, leaving no way to open a ticket.
   ========================================================================== */
@media (min-width: 861px) {
  .kt-support-widget .kt-sw-panel {
    right: auto !important;
    left: 0 !important;
    transform-origin: bottom left !important;
  }
}

@media (max-width: 860px) {
  .kt-support-widget {
    display: block !important;
    inset: auto auto calc(84px + env(safe-area-inset-bottom, 0px)) 12px !important;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 960 !important;
  }

  .kt-support-widget .kt-sw-launcher {
    width: 50px !important;
    height: 50px !important;
  }

  .kt-support-widget .kt-sw-panel {
    right: auto !important;
    left: 0 !important;
    bottom: 60px !important;
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 190px - env(safe-area-inset-bottom, 0px)) !important;
    transform-origin: bottom left !important;
  }

  /* Back-to-top stacks above the support launcher instead of sharing its spot. */
  .kt-return-top {
    left: 15px !important;
    right: auto !important;
    bottom: calc(144px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ==========================================================================
   20. Dark mode is back
   --------------------------------------------------------------------------
   The v2 layer declared `color-scheme: only light` and header.php forced the
   light theme, so the toggle had been removed. The dark rules in every layer
   were still in place; these are the pieces that only exist in this file.
   ========================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
}

/* Desktop toggle: show the icon for the theme you would switch to. */
.kt-theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kt-theme-toggle .kt-theme-icon-sun,
:root[data-theme="dark"] .kt-theme-toggle .kt-theme-icon-moon {
  display: none;
}

:root[data-theme="dark"] .kt-theme-toggle .kt-theme-icon-sun {
  display: block;
}

@media (max-width: 860px) {
  .kt-header-actions > .kt-theme-toggle {
    display: none !important;
  }
}

/* Header in dark (the v2 light header rules are scoped to data-theme=light). */
:root[data-theme="dark"] .kt-site-header {
  border-bottom-color: rgba(198, 213, 225, .1) !important;
  background: rgba(13, 21, 28, .92) !important;
}

:root[data-theme="dark"] .kt-site-header .kt-primary-nav a {
  color: #c9d6e1 !important;
}

:root[data-theme="dark"] .kt-site-header .kt-icon-button,
:root[data-theme="dark"] .kt-site-header .kt-menu-toggle {
  border-color: rgba(198, 213, 225, .16) !important;
  background: rgba(255, 255, 255, .04) !important;
  color: #dbe5ee !important;
}

:root[data-theme="dark"] .kt-site-header .kt-menu-toggle span {
  background: #dbe5ee !important;
}

:root[data-theme="dark"] .kt-brand-logo {
  filter: brightness(0) invert(1);
  opacity: .94;
}

/* Surfaces this file hard-coded to white. */
:root[data-theme="dark"] .kt-faq-list details {
  border-color: rgba(198, 213, 225, .12) !important;
  background: #142230 !important;
}

:root[data-theme="dark"] .kt-faq-list summary span {
  border-color: rgba(224, 161, 134, .4) !important;
  background: transparent !important;
}

:root[data-theme="dark"] .kt-faq-list summary span::before,
:root[data-theme="dark"] .kt-faq-list summary span::after {
  background: #e0a186 !important;
}

:root[data-theme="dark"] .kt-faq-list details[open] summary span {
  background: rgba(224, 161, 134, .12) !important;
}

:root[data-theme="dark"] .kt-product-price {
  color: #e7edf2 !important;
}

:root[data-theme="dark"] .kt-product-footer > a,
:root[data-theme="dark"] .kt-product-footer .kt-product-go,
:root[data-theme="dark"] .kt-product-tile-foot > a {
  border-color: rgba(157, 184, 220, .45) !important;
  background: transparent !important;
  color: #c9dbef !important;
}

:root[data-theme="dark"] .kt-product-footer > a:hover,
:root[data-theme="dark"] .kt-product-tile-foot > a:hover {
  background: #9db8dc !important;
  color: #0f1b25 !important;
}

@media (max-width: 860px) {
  :root[data-theme="dark"] .kt-journey-item {
    border-color: rgba(198, 213, 225, .12) !important;
    background: #142230 !important;
  }
}

:root[data-theme="dark"] .woocommerce-cart .btn.btn-primary,
:root[data-theme="dark"] a.btn.btn-primary[href*="my-account"] {
  border-color: rgba(157, 184, 220, .45) !important;
  background: transparent !important;
  color: #c9dbef !important;
}

:root[data-theme="dark"] .kt-guide-page .values-list > li::before {
  background: rgba(224, 161, 134, .12);
  color: #e0a186;
}

:root[data-theme="dark"] .kt-guide-page .values-section h2 {
  color: #e7edf2 !important;
}

:root[data-theme="dark"] .kt-mobile-theme-btn {
  border-color: rgba(198, 213, 225, .16);
  background: #142230;
  color: #aebdca;
}

:root[data-theme="dark"] .kt-mobile-theme-btn.is-active {
  border-color: #9db8dc;
  color: #e7edf2;
}

/* On laptops the page gutter is only ~24px, so the bottom-left support
   launcher sat on top of the first tool chip in the opening screen. */
@media (min-width: 861px) and (max-width: 1560px) {
  body.home .kt-toolstrip .kt-shell,
  body.home .kt-toolstrip > div {
    padding-left: 76px !important;
  }
}

/* --- 20b. Light surfaces that were left behind in dark mode ---------------- */

/* Home hero primary button: the arrow kept a dark ink from the old dark-hero
   rule and vanished on the navy button. */
:root[data-theme="dark"] .kt-hero .kt-button--primary span {
  color: inherit !important;
}

/* Home portfolio band faded into a pale grey-blue at the bottom. */
:root[data-theme="dark"] .kt-home-portfolio {
  background: #101d29 !important;
}

/* Portfolio: «دیدن داستان پروژه» and the project count were brand navy on
   navy cards (2.01:1). */
:root[data-theme="dark"] .kt-work-more,
:root[data-theme="dark"] .kt-work-more span,
:root[data-theme="dark"] .kt-portfolio-count strong {
  color: #9dc3ee !important;
}

/* Single product: purchase card. */
:root[data-theme="dark"] .kt-purchase-card .hdm-price {
  border-color: rgba(198, 213, 225, .12) !important;
  background: rgba(255, 255, 255, .04) !important;
}

:root[data-theme="dark"] .kt-purchase-card .hdm-price-label,
:root[data-theme="dark"] .kt-purchase-card .kt-purchase-kicker,
:root[data-theme="dark"] .kt-purchase-card .variation-item label {
  color: #aebdca !important;
}

:root[data-theme="dark"] .kt-purchase-card .hdm-price small,
:root[data-theme="dark"] .kt-purchase-card .hdm-price-copy small,
:root[data-theme="dark"] .kt-purchase-card-head + p,
:root[data-theme="dark"] .kt-purchase-card > p {
  color: #9aabb9 !important;
}

:root[data-theme="dark"] .kt-purchase-benefits > li {
  border-color: rgba(198, 213, 225, .12) !important;
  background: rgba(255, 255, 255, .04) !important;
}

:root[data-theme="dark"] .kt-purchase-benefits strong {
  color: #e7edf2 !important;
}

:root[data-theme="dark"] .kt-purchase-benefits small {
  color: #9aabb9 !important;
}

/* Disabled «افزودن به سبد خرید»: dark text on a dark button (1.56:1). */
:root[data-theme="dark"] .single_add_to_cart_button:disabled,
:root[data-theme="dark"] .single_add_to_cart_button.disabled,
:root[data-theme="dark"] .single_add_to_cart_button:disabled span,
:root[data-theme="dark"] .single_add_to_cart_button.disabled span {
  color: #8fa2b3 !important;
}

/* «انتخاب پلن / ثبت سفارش / فعال‌سازی» step cards: a white-to-dark gradient. */
:root[data-theme="dark"] .kt-product-process > div {
  border-color: rgba(198, 213, 225, .12) !important;
  background: #142230 !important;
}

:root[data-theme="dark"] .kt-product-process > div::before,
:root[data-theme="dark"] .kt-product-process > div::after {
  opacity: .25;
}

/* --- 20c. Last contrast gaps (both themes) ---------------------------------- */

/* Home hero primary button: the arrow kept a dark ink from an older rule and
   disappeared on the navy button in light mode too (1.28:1). */
.kt-hero .kt-button--primary span {
  color: inherit !important;
}

/* v2's muted grey (#74818d) sat at 3.6–3.99:1 on its own card colours.
   One step darker clears 4.5 everywhere it is used. */
:root:not([data-theme="dark"]) {
  --kt-v2-muted: #5f6c78;
}

/* Hero eyebrow and «مطالعه مقاله» arrows: light copper on white. */
html:not([data-theme="dark"]) body.home main .kt-hero .kt-kicker {
  color: #9a5b45 !important;
}

:root:not([data-theme="dark"]) .kt-insight-read i,
:root:not([data-theme="dark"]) .kt-article-read-link i {
  color: #9a5b45 !important;
}

/* Dark: product price, and the purchase card's lead line. */
:root[data-theme="dark"] .kt-purchase-card .woocommerce-Price-amount,
:root[data-theme="dark"] .kt-purchase-card .woocommerce-Price-amount bdi,
:root[data-theme="dark"] .kt-purchase-card .woocommerce-Price-currencySymbol {
  color: #e7edf2 !important;
}

:root[data-theme="dark"] .kt-purchase-card-head > p {
  color: #a9b8c5 !important;
}

/* Dark: portfolio case page breadcrumb and story step numbers. */
:root[data-theme="dark"] .kt-work-breadcrumb a {
  color: #9dc3ee !important;
}

:root[data-theme="dark"] .kt-case-story article > span {
  color: #c9dbef !important;
  background: rgba(157, 195, 238, .12) !important;
}

/* --- 21. Phone menu open -------------------------------------------------------
   The menu panel lives inside the header's stacking context, so the tab bar
   and the support/back-to-top buttons (fixed, higher z-index) floated over it
   and covered the new «حالت نمایش» control at the bottom of the menu. */
@media (max-width: 860px) {
  body.kt-menu-open .kt-tabbar,
  body.kt-menu-open .kt-support-widget,
  body.kt-menu-open .kt-return-top {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .kt-mobile-panel {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ==========================================================================
   22. One visual language, two colour modes
   --------------------------------------------------------------------------
   The site had two languages: home, shop and portfolio used v2's calm light
   surfaces, while every other page opened on a dark navy panel — and that
   panel stayed dark in light mode too, so the theme toggle could not change
   it. Thirteen surfaces were dark regardless of the toggle (page heroes on
   services/about/contact/blog/learn/article/product/cart/guide/search/404/
   product category, plus the home final CTA, the portfolio closing band,
   the services audience band and the about story band).

   Now there is one language — v2's light surface with a soft copper/blue
   glow and a faint grid — and one set of tokens that the toggle flips. Every
   colour below is a variable; nothing is fixed to one theme.

   Selector prefix `html[data-theme][dir] body` gives (0,3,3): enough to beat
   the older panel rules, which go up to (0,3,1).
   ========================================================================== */

:root {
  --kt-u-hero-bg:
    radial-gradient(52% 72% at 92% -4%, rgba(184, 121, 101, .13), transparent 70%),
    radial-gradient(46% 64% at 4% 104%, rgba(84, 124, 168, .10), transparent 72%),
    linear-gradient(180deg, #fdfcfa 0%, #f5f1eb 100%);
  --kt-u-band-bg: linear-gradient(125deg, #f7eee9 0%, #f3f7fa 58%, #f7f5f1 100%);
  --kt-u-grid: rgba(54, 83, 109, .05);
  --kt-u-eyebrow: #8a503d;
  --kt-u-primary-bg: #263d52;
  --kt-u-primary-ink: #ffffff;
  --kt-u-secondary-line: rgba(54, 83, 109, .24);
  --kt-u-secondary-ink: #263d52;
  --kt-u-link: #36536d;
  --kt-u-sub-bg: #ffffff;
  --kt-u-sub-inner: #fbfaf8;
  --kt-u-shadow: 0 1px 2px rgba(35, 58, 78, .04), 0 26px 60px -36px rgba(35, 58, 78, .26);
  --kt-u-live: #256a4a;
}

:root[data-theme="dark"] {
  --kt-u-hero-bg:
    radial-gradient(52% 72% at 92% -4%, rgba(184, 121, 101, .15), transparent 70%),
    radial-gradient(46% 64% at 4% 104%, rgba(84, 124, 168, .13), transparent 72%),
    linear-gradient(180deg, #17232d 0%, #111a22 100%);
  --kt-u-band-bg: linear-gradient(125deg, #1f2a33 0%, #17232d 58%, #1a2630 100%);
  --kt-u-grid: rgba(200, 220, 240, .045);
  --kt-u-eyebrow: #e3a88f;
  --kt-u-primary-bg: #9db8dc;
  --kt-u-primary-ink: #0f1b25;
  --kt-u-secondary-line: rgba(198, 213, 225, .26);
  --kt-u-secondary-ink: #e7edf2;
  --kt-u-link: #9dc3ee;
  --kt-u-sub-bg: #17232d;
  --kt-u-sub-inner: #111a22;
  --kt-u-shadow: 0 26px 60px -36px rgba(0, 0, 0, .7);
  --kt-u-live: #9ae0ba;
}

/* --- 22-1. Surfaces ------------------------------------------------------- */
html[data-theme][dir] body :is(
  .kt-shop-hero, .kt-editorial-hero, .kt-about-hero, .kt-services-hero,
  .kt-contact-hero, .kt-learning-heading, .kt-article-hero, .kt-page-heading,
  .kt-archive-heading, .kt-product-hero
) {
  border: 1px solid var(--kt-v2-line) !important;
  background: var(--kt-u-hero-bg) !important;
  color: var(--kt-v2-text) !important;
  box-shadow: var(--kt-u-shadow) !important;
}

html[data-theme][dir] body :is(
  .kt-shop-hero, .kt-editorial-hero, .kt-about-hero, .kt-services-hero,
  .kt-contact-hero, .kt-learning-heading, .kt-article-hero, .kt-page-heading,
  .kt-archive-heading, .kt-product-hero
)::before {
  background-image:
    linear-gradient(var(--kt-u-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--kt-u-grid) 1px, transparent 1px) !important;
}

html[data-theme][dir] body .kt-services-hero::after {
  border-color: var(--kt-u-grid) !important;
}

/* Home hero uses the same field (full-bleed rather than a panel). */
@media (min-width: 1025px) {
  html[data-theme][dir] body.home .kt-hero {
    background: var(--kt-u-hero-bg) !important;
  }

  html[data-theme][dir] body.home .kt-hero::before {
    background-image:
      linear-gradient(var(--kt-u-grid) 1px, transparent 1px),
      linear-gradient(90deg, var(--kt-u-grid) 1px, transparent 1px) !important;
  }
}

html[data-theme][dir] body .kt-hero {
  background: var(--kt-u-hero-bg) !important;
}

/* Closing bands: one light band style instead of three dark ones. */
html[data-theme][dir] body :is(.kt-final-card, .kt-portfolio-final, .kt-services-audience, .kt-about-story) {
  border: 1px solid var(--kt-v2-line) !important;
  background: var(--kt-u-band-bg) !important;
  color: var(--kt-v2-text) !important;
  box-shadow: none !important;
}

html[data-theme][dir] body :is(.kt-final-card, .kt-portfolio-final, .kt-services-audience, .kt-about-story)::before,
html[data-theme][dir] body :is(.kt-final-card, .kt-portfolio-final, .kt-services-audience, .kt-about-story)::after {
  opacity: .35;
}

/* --- 22-2. Type ------------------------------------------------------------- */
html[data-theme][dir] body :is(
  .kt-shop-hero, .kt-editorial-hero, .kt-about-hero, .kt-services-hero,
  .kt-contact-hero, .kt-learning-heading, .kt-article-hero, .kt-page-heading,
  .kt-archive-heading, .kt-product-intro, .kt-final-card, .kt-portfolio-final,
  .kt-services-audience, .kt-about-story
) :is(h1, h2) {
  color: var(--kt-v2-ink) !important;
}

html[data-theme][dir] body :is(
  .kt-shop-hero__copy > p, .kt-editorial-hero > div > p, .kt-about-hero > div > p,
  .kt-services-hero__copy > p, .kt-contact-hero > div:first-child > p,
  .kt-learning-heading > p, .kt-article-hero-copy > p, .kt-page-heading > p,
  .kt-archive-heading p, .kt-product-intro > p, .kt-final-card p,
  .kt-portfolio-final p, .kt-services-audience > div > p, .kt-about-story p,
  .kt-error-head p
) {
  color: var(--kt-v2-text) !important;
}

html[data-theme][dir] body :is(
  .kt-shop-hero__copy > span, .kt-editorial-hero > div > span, .kt-about-hero > div > span,
  .kt-about-hero aside > span, .kt-services-hero__copy > span, .kt-contact-hero > div > span,
  .kt-learning-heading > .kt-overline, .kt-page-heading > span, .kt-archive-heading > span,
  .kt-archive-heading > div > span, .kt-article-kicker > a, .kt-product-intro > span,
  .kt-final-card .kt-overline, .kt-portfolio-final .kt-overline,
  .kt-services-audience > div > span, .kt-about-story > div > span, .kt-hero .kt-kicker,
  .kt-error-code
) {
  color: var(--kt-u-eyebrow) !important;
}

html[data-theme][dir] body :is(.kt-learning-heading > .kt-overline, .kt-final-card .kt-overline, .kt-portfolio-final .kt-overline, .kt-hero .kt-kicker)::after {
  background: linear-gradient(90deg, var(--kt-u-eyebrow) 0%, transparent 100%) !important;
}

html[data-theme][dir] body :is(
  .kt-article-kicker, .kt-article-kicker > span, .kt-article-byline,
  .kt-article-byline span, .kt-article-byline time, .kt-product-intro .kt-rating,
  .kt-final-note
) {
  color: var(--kt-v2-muted) !important;
}

html[data-theme][dir] body .kt-product-intro .kt-rating b {
  color: var(--kt-u-eyebrow) !important;
}

html[data-theme][dir] body .kt-product-intro > span.is-live {
  color: var(--kt-u-live) !important;
}

html[data-theme][dir] body :is(.kt-archive-heading a, .kt-cat-heading a, .kt-article-hero .kt-back-link, .kt-single-product > .kt-back-link) {
  color: var(--kt-u-link) !important;
}

/* --- 22-3. Actions ------------------------------------------------------------ */
html[data-theme][dir] body :is(
  .kt-shop-hero__copy > a, .kt-editorial-hero > a, .kt-about-hero > div > div a:not(.is-secondary),
  .kt-services-actions a:not(.is-secondary), .kt-learning-heading .kt-page-actions .kt-button--primary,
  .kt-search-inline button, .kt-hero .kt-button--primary, .kt-final-card .kt-button,
  .kt-portfolio-final .kt-work-primary
) {
  border: 1px solid transparent !important;
  background: var(--kt-u-primary-bg) !important;
  color: var(--kt-u-primary-ink) !important;
  box-shadow: none !important;
}

html[data-theme][dir] body :is(
  .kt-shop-hero__copy > a, .kt-editorial-hero > a, .kt-about-hero > div > div a,
  .kt-services-actions a, .kt-learning-heading .kt-page-actions .kt-button,
  .kt-hero .kt-button, .kt-final-card .kt-button, .kt-portfolio-final .kt-work-primary
) :is(span, i) {
  color: inherit !important;
}

html[data-theme][dir] body :is(
  .kt-about-hero > div > div a.is-secondary, .kt-services-actions a.is-secondary,
  .kt-learning-heading .kt-page-actions .kt-button--secondary, .kt-hero .kt-button--secondary
) {
  border: 1px solid var(--kt-u-secondary-line) !important;
  background: transparent !important;
  color: var(--kt-u-secondary-ink) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-theme][dir] body .kt-search-inline input {
  border-color: var(--kt-v2-line) !important;
  background: var(--kt-u-sub-bg) !important;
  color: var(--kt-v2-ink) !important;
}

html[data-theme][dir] body .kt-search-inline input::placeholder {
  color: var(--kt-v2-muted) !important;
}

/* --- 22-4. Cards inside heroes and bands ------------------------------------ */
html[data-theme][dir] body :is(.kt-about-hero aside, .kt-contact-direct > *, .kt-services-map, .kt-services-audience nav a) {
  border: 1px solid var(--kt-v2-line) !important;
  background: var(--kt-u-sub-bg) !important;
  color: var(--kt-v2-text) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-theme][dir] body .kt-services-map > div {
  border: 1px solid var(--kt-v2-line) !important;
  background: var(--kt-u-sub-inner) !important;
}

html[data-theme][dir] body :is(.kt-about-hero blockquote, .kt-contact-direct b, .kt-services-map b, .kt-services-audience nav b) {
  color: var(--kt-v2-ink) !important;
}

html[data-theme][dir] body :is(.kt-about-hero aside p, .kt-contact-direct span, .kt-services-map span:not(.kt-services-orbit), .kt-services-audience nav span) {
  color: var(--kt-v2-muted) !important;
}

html[data-theme][dir] body .kt-services-audience nav i {
  color: var(--kt-u-eyebrow) !important;
}

html[data-theme][dir] body .kt-services-map small {
  background: color-mix(in srgb, var(--kt-u-eyebrow) 13%, transparent) !important;
  color: var(--kt-u-eyebrow) !important;
}

html[data-theme][dir] body .kt-services-map > i {
  background: var(--kt-v2-line) !important;
}

html[data-theme][dir] body .kt-services-orbit {
  border-color: color-mix(in srgb, var(--kt-u-eyebrow) 22%, transparent) !important;
}

html[data-theme][dir] body .kt-contact-signal {
  color: var(--kt-v2-ink) !important;
}

html[data-theme][dir] body .kt-contact-signal > i {
  border-color: var(--kt-u-eyebrow) !important;
}

html[data-theme][dir] body .kt-contact-signal > i:nth-child(2) {
  border-color: var(--kt-u-link) !important;
}

html[data-theme][dir] body .kt-contact-signal > i:nth-child(3) {
  border-color: var(--kt-v2-muted) !important;
}

html[data-theme][dir] body .kt-contact-signal b {
  background: var(--kt-v2-line) !important;
}

/* Shop brand stage: navy core in light, light-blue core in dark. */
html[data-theme][dir] body .kt-shop-brand-stage::before,
html[data-theme][dir] body .kt-shop-brand-stage::after {
  border-color: var(--kt-v2-line) !important;
}

html[data-theme][dir] body .kt-shop-brand-core {
  background: var(--kt-u-primary-bg) !important;
  color: var(--kt-u-primary-ink) !important;
  box-shadow: var(--kt-u-shadow) !important;
}

html[data-theme][dir] body :is(.kt-shop-brand-core small, .kt-shop-brand-core b, .kt-shop-brand-core span) {
  color: var(--kt-u-primary-ink) !important;
}

html[data-theme][dir] body :is(.kt-shop-brand-core small, .kt-shop-brand-core span) {
  opacity: .82;
}

html[data-theme][dir] body .kt-shop-brand-node {
  border-color: var(--kt-v2-line) !important;
  background: var(--kt-u-sub-bg) !important;
  box-shadow: var(--kt-u-shadow) !important;
}

/* Product and article media inside their heroes. */
html[data-theme][dir] body :is(.kt-article-hero figure, .kt-product-visual, .kt-cat-art) {
  border: 1px solid var(--kt-v2-line) !important;
  background: var(--kt-v2-soft) !important;
}

html[data-theme][dir] body .kt-purchase-card {
  border: 1px solid var(--kt-v2-line) !important;
  background: var(--kt-v2-card) !important;
  box-shadow: var(--kt-u-shadow) !important;
}

/* Purchase card fine print used fixed light greys (2.9–4.0:1 on its own
   light panels). Tie them to the theme's muted token. */
html[data-theme][dir] body :is(
  .kt-purchase-card-head > p, .kt-purchase-card .hdm-price small,
  .kt-purchase-card .hdm-price-copy small, .kt-purchase-benefits small
) {
  color: var(--kt-v2-muted) !important;
}

/* --- 23. Desktop header after the theme button came back ----------------------
   One more 40px icon pushed «درخواست مشاوره» onto two lines at 1440px. */
@media (min-width: 861px) {
  .kt-header-cta {
    white-space: nowrap !important;
  }
}

@media (min-width: 861px) and (max-width: 1520px) {
  .kt-header-shell {
    gap: 18px !important;
  }

  .kt-primary-nav ul {
    gap: clamp(12px, 1.3vw, 22px) !important;
  }

  .kt-primary-nav a {
    font-size: 13.5px !important;
  }

  .kt-header-actions {
    gap: 6px !important;
  }
}

/* Below ~1320px the header cannot hold brand, eight links, four icons and the
   consultation button; «تماس با ما» is already in the menu, so the button
   goes first rather than the header spilling past the screen edge. */
@media (min-width: 861px) and (max-width: 1320px) {
  .kt-header-actions > .kt-header-cta {
    display: none !important;
  }
}
