/* Someh v10.6 - Scoped WooCommerce product dark mode fix
   فقط داخل summary / entry-summary صفحه محصول اعمال می‌شود.
   به هدر، عنوان سایت، نوار تلفن، منو و سایر بخش‌ها دست نمی‌زند. */

/* text on dark product summary */
html.dark-skin body.single-product div.product .summary :is(.product_title, h1, .entry-title),
body.dark-skin.single-product div.product .summary :is(.product_title, h1, .entry-title),
html[data-theme="dark"] body.single-product div.product .summary :is(.product_title, h1, .entry-title),
body[data-theme="dark"].single-product div.product .summary :is(.product_title, h1, .entry-title),
html[data-skin="dark"] body.single-product div.product .summary :is(.product_title, h1, .entry-title),
body[data-skin="dark"].single-product div.product .summary :is(.product_title, h1, .entry-title),
html.dark-mode body.single-product div.product .summary :is(.product_title, h1, .entry-title),
body.dark-mode.single-product div.product .summary :is(.product_title, h1, .entry-title),
html.night-mode body.single-product div.product .summary :is(.product_title, h1, .entry-title),
body.night-mode.single-product div.product .summary :is(.product_title, h1, .entry-title),
html.someh-dark-mode body.single-product div.product .summary :is(.product_title, h1, .entry-title),
body.someh-dark-mode.single-product div.product .summary :is(.product_title, h1, .entry-title),
html.ahan-darkmode-active body.single-product div.product .summary :is(.product_title, h1, .entry-title),
body.ahan-darkmode-active.single-product div.product .summary :is(.product_title, h1, .entry-title),
html[class*="dark"] body.single-product div.product .summary :is(.product_title, h1, .entry-title),
body[class*="dark"].single-product div.product .summary :is(.product_title, h1, .entry-title),
html.dark-skin body.single-product div.product .entry-summary :is(.product_title, h1, .entry-title),
body.dark-skin.single-product div.product .entry-summary :is(.product_title, h1, .entry-title),
html[class*="dark"] body.single-product div.product .entry-summary :is(.product_title, h1, .entry-title),
body[class*="dark"].single-product div.product .entry-summary :is(.product_title, h1, .entry-title) {
  color:#f8fafc !important;
  -webkit-text-fill-color:#f8fafc !important;
  opacity:1 !important;
  text-shadow:none !important;
}

/* first direct paragraphs in summary on dark background */
html.dark-skin body.single-product div.product .summary > p,
body.dark-skin.single-product div.product .summary > p,
html[data-theme="dark"] body.single-product div.product .summary > p,
body[data-theme="dark"].single-product div.product .summary > p,
html[data-skin="dark"] body.single-product div.product .summary > p,
body[data-skin="dark"].single-product div.product .summary > p,
html.dark-mode body.single-product div.product .summary > p,
body.dark-mode.single-product div.product .summary > p,
html.night-mode body.single-product div.product .summary > p,
body.night-mode.single-product div.product .summary > p,
html.someh-dark-mode body.single-product div.product .summary > p,
body.someh-dark-mode.single-product div.product .summary > p,
html.ahan-darkmode-active body.single-product div.product .summary > p,
body.ahan-darkmode-active.single-product div.product .summary > p,
html[class*="dark"] body.single-product div.product .summary > p,
body[class*="dark"].single-product div.product .summary > p,
html.dark-skin body.single-product div.product .entry-summary > p,
body.dark-skin.single-product div.product .entry-summary > p,
html[class*="dark"] body.single-product div.product .entry-summary > p,
body[class*="dark"].single-product div.product .entry-summary > p {
  color:#f8fafc !important;
  -webkit-text-fill-color:#f8fafc !important;
  opacity:1 !important;
  text-shadow:none !important;
}

/* common WCPT/short description content on dark background */
html.dark-skin body.single-product div.product .summary :is(.woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta),
body.dark-skin.single-product div.product .summary :is(.woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta),
html[class*="dark"] body.single-product div.product .summary :is(.woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta),
body[class*="dark"].single-product div.product .summary :is(.woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta) {
  opacity:1 !important;
}

/* If the element/card itself has a light background, text must be black. */
html.dark-skin body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="background:#fff"],
html.dark-skin body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="background: #fff"],
html.dark-skin body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="background-color:#fff"],
html.dark-skin body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="background-color: #fff"],
html.dark-skin body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="rgb(255, 255, 255)"],
html.dark-skin body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="rgba(255, 255, 255"],
html[class*="dark"] body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="background:#fff"],
html[class*="dark"] body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="background: #fff"],
html[class*="dark"] body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="background-color:#fff"],
html[class*="dark"] body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="background-color: #fff"],
html[class*="dark"] body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="rgb(255, 255, 255)"],
html[class*="dark"] body.single-product div.product .summary :is(.product_title, h1, .entry-title, p, .woocommerce-product-details__short-description, .wcpt-desc-card, .wcpt-eta)[style*="rgba(255, 255, 255"] {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* Known light WCPT cards: keep black text if card remains white/cream. */
html.dark-skin body.single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light),
html.dark-skin body.single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light) *,
body.dark-skin.single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light),
body.dark-skin.single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light) *,
html[class*="dark"] body.single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light),
html[class*="dark"] body.single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light) *,
body[class*="dark"].single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light),
body[class*="dark"].single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light) * {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* links only inside product summary */
html.dark-skin body.single-product div.product .summary a,
body.dark-skin.single-product div.product .summary a,
html[class*="dark"] body.single-product div.product .summary a,
body[class*="dark"].single-product div.product .summary a {
  color:#93c5fd !important;
  -webkit-text-fill-color:#93c5fd !important;
}

/* links inside light card stay readable */
html.dark-skin body.single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light) a,
body.dark-skin.single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light) a,
html[class*="dark"] body.single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light) a,
body[class*="dark"].single-product div.product .summary :is(.wcpt-desc-card, .woocommerce-product-details__short-description.wcpt-light, .wcpt-eta.wcpt-light) a {
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
}
