/* RTL helpers */
:root{ --wcpt-start:left; --wcpt-end:right; }
[dir="rtl"] :root{ --wcpt-start:right; --wcpt-end:left; }

/* Base header visuals */
.headers--underline .product .product_title{position:relative;padding-bottom:8px}
.headers--underline .product .product_title:after{content:"";position:absolute;inset-inline-start:0;bottom:0;width:96px;height:6px;background:linear-gradient(90deg,var(--primary),transparent);border-radius:4px}
.headers--pill .product .summary h2,
.headers--pill .woocommerce-Tabs-panel h2{display:inline-block;padding:.35em .6em;border-radius:999px;background:rgba(0,0,0,.05)}
.headers--ribbon .product .summary h2{position:relative;padding-inline-start:14px}
.headers--ribbon .product .summary h2:before{content:"";position:absolute;inset-inline-start:0;top:6px;bottom:6px;width:6px;background:var(--primary);border-radius:3px}
.headers--badge .product .summary h2{display:flex;align-items:center;gap:10px}
.headers--badge .product .summary h2:before{content:"★";font-size:18px;color:var(--accent)}

@media (max-width:540px){
  .headers--pill .product .summary h2{padding:4px 10px}
  .headers--underline .product .product_title:after{height:4px;width:72px}
}

/* Article headings */
.wcpt-headers-on .entry-content h2,
.wcpt-headers-on .entry-content h3{line-height:1.3;margin:16px 0 10px}
.headers--underline .entry-content h2{position:relative;padding-bottom:8px;border-bottom:2px solid rgba(0,0,0,.06)}
.headers--underline .entry-content h3{position:relative;padding-bottom:6px;border-bottom:2px solid rgba(0,0,0,.05)}
.headers--pill .entry-content h2,
.headers--pill .entry-content h3{display:inline-block;padding:.35em .6em;border-radius:999px;background:rgba(0,0,0,.05)}
.headers--ribbon .entry-content h2{position:relative;padding-inline-start:14px}
.headers--ribbon .entry-content h2:before{content:"";position:absolute;inset-inline-start:0;top:6px;bottom:6px;width:6px;background:var(--primary);border-radius:3px}
.headers--badge .entry-content h2{display:flex;align-items:center;gap:10px}
.headers--badge .entry-content h2:before{content:"★";font-size:18px;color:var(--accent)}

/* v4.6.2 — keep header presets clean (no backgrounds/lines) */
html body[class*="wcpt--"] .headers--underline .product .product_title:after,
html body[class*="wcpt--"] .headers--underline .entry-content h2:after,
html body[class*="wcpt--"] .headers--underline .entry-content h3:after{display:none !important;content:none !important;}

html body[class*="wcpt--"] .headers--pill .product .summary h2,
html body[class*="wcpt--"] .headers--pill .woocommerce-Tabs-panel h2,
html body[class*="wcpt--"] .headers--pill .entry-content h2,
html body[class*="wcpt--"] .headers--pill .entry-content h3{background:transparent !important;padding:0 !important;border-radius:0 !important;}

html body[class*="wcpt--"] .headers--ribbon .product .summary h2:before,
html body[class*="wcpt--"] .headers--ribbon .entry-content h2:before{display:none !important;content:none !important;}

/* v4.6.4-scoped-dark: scoped WooCommerce product summary dark-mode fix */
/* 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;
}

