/* BEK Site Shell v0.3 — brand-safe, RTL-first, mobile-first. */
:root {
  --bek-navy: #0D1B3A;
  --bek-cyan: #24B1D8;
  --bek-cyan-a11y: #007C99;
  --bek-soft: #F6F8FC;
  --bek-muted: #5D687A;
  --bek-border: #E7ECF3;
  --bek-white: #FFFFFF;
  --bek-radius: 14px;
  --bek-shadow: 0 14px 40px rgba(13, 27, 58, .08);
}

html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
body { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--bek-cyan-a11y); outline-offset: 3px; }
a { text-underline-offset: .18em; }
a:hover { text-decoration: underline; }
[dir="ltr"], .ltr, code, .sku { direction: ltr; unicode-bidi: isolate; }
.wp-block-post-title, .bek-product-subtitle, .bek-guide-card h3 { unicode-bidi: plaintext; }

.bek-site-header {
  position: relative;
  z-index: 50;
  background: rgba(255,255,255,.98);
}
.bek-header-row { min-height: 76px; gap: 1.25rem; }
.bek-brand-logo { display: inline-flex; flex: 0 0 auto; line-height: 0; }
.bek-brand-logo img { display: block; width: auto; max-width: 100%; height: auto; object-fit: contain; }
.bek-brand-logo--primary img { max-height: 52px; }
.bek-brand-logo--reverse img { max-height: 64px; }
.bek-primary-nav { margin-inline: auto; }
.bek-primary-nav a { font-weight: 650; color: var(--bek-navy); }
.bek-header-search { flex: 0 1 260px; }
.bek-header-search .wp-block-search__inside-wrapper { border: 1px solid var(--bek-border); border-radius: 10px; overflow: hidden; }
.bek-header-search .wp-block-search__input { min-width: 0; border: 0; }
.bek-header-search .wp-block-search__button { margin: 0; border-radius: 0; background: var(--bek-navy); }

.bek-site-footer a { color: #fff; }
.bek-footer-positioning { max-width: 42ch; color: rgba(255,255,255,.78); }
.bek-footer-links { list-style: none; padding: 0; margin: .75rem 0 0; }
.bek-footer-links li + li { margin-top: .5rem; }
.bek-footer-legal { color: rgba(255,255,255,.62); }

/* Product-page primitives retained from v0.2.x. */
.bek-product-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.bek-badge { display: inline-flex; align-items: center; min-height: 30px; padding: .25rem .65rem; border: 1px solid rgba(0,124,153,.24); border-radius: 999px; background: rgba(36,177,216,.09); color: var(--bek-navy); font-size: .875rem; font-weight: 650; }
.bek-product-subtitle { color: var(--bek-muted); font-size: 1.125rem; margin-top: -.25rem; }
.bek-usd-reference { color: var(--bek-muted); font-size: .92rem; }
.bek-usd-reference strong { color: var(--bek-navy); }
.bek-verification-note { padding: .7rem .85rem; border-inline-start: 3px solid var(--bek-cyan-a11y); background: var(--bek-soft); color: var(--bek-muted); font-size: .9rem; }
.bek-product-section { margin-block: 1.5rem; padding: 1.25rem; border: 1px solid var(--bek-border); border-radius: var(--bek-radius); background: var(--bek-white); }
.bek-product-section h2 { margin-top: 0; font-size: 1.2rem; }
.bek-metadata dl { margin: 0; }
.bek-metadata dl > div { display: grid; grid-template-columns: minmax(8rem, .38fr) 1fr; gap: 1rem; padding-block: .65rem; border-bottom: 1px solid var(--bek-border); }
.bek-metadata dl > div:last-child { border-bottom: 0; }
.bek-metadata dt { color: var(--bek-muted); }
.bek-metadata dd { margin: 0; font-weight: 600; }
.bek-editorial-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.bek-topic-list { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }
.bek-topic-list li { padding: .35rem .65rem; border-radius: 999px; background: var(--bek-soft); }

@media (max-width: 900px) {
  .bek-header-row { min-height: 68px; flex-wrap: wrap !important; padding-block: .65rem; }
  .bek-primary-nav { margin-inline-start: auto; margin-inline-end: 0; order: 2; }
  .bek-header-search { order: 3; flex-basis: 100%; max-width: none; }
  .bek-brand-logo--primary img { max-height: 46px; }
  .bek-editorial-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .bek-header-row { gap: .75rem; }
  .bek-header-search { width: 100%; }
  .bek-footer-grid { gap: 2rem; }
  .bek-metadata dl > div { grid-template-columns: 1fr; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Homepage discovery v0.4 */
.bek-home-hero { position: relative; overflow: hidden; }
.bek-home-hero::after { content: ""; position: absolute; inline-size: 190px; block-size: 190px; inset-inline-end: -72px; inset-block-start: -72px; border-radius: 36px; background: linear-gradient(135deg, rgba(36,177,216,.18), rgba(36,177,216,0)); transform: rotate(12deg); pointer-events: none; }
.bek-eyebrow { margin-bottom: .6rem; color: var(--bek-cyan-a11y); font-weight: 750; letter-spacing: .01em; }
.bek-home-title { max-width: 16ch; margin-top: 0; letter-spacing: -.025em; }
.bek-home-lead { max-width: 50ch; }
.bek-home-search { max-width: 760px; margin-top: 1.5rem; }
.bek-home-search .wp-block-search__inside-wrapper { padding: .35rem; border: 1px solid var(--bek-border); border-radius: 12px; background: var(--bek-white); box-shadow: 0 8px 24px rgba(13,27,58,.06); }
.bek-home-search .wp-block-search__input { border: 0; min-height: 48px; }
.bek-home-search .wp-block-search__button { margin: 0; min-width: 96px; border-radius: 9px; }
.bek-trust-inline { margin-top: 1rem; gap: .55rem 1.2rem; color: var(--bek-muted); font-size: .9rem; }
.bek-trust-inline p { margin: 0; }
.bek-trust-inline p::before { content: "✓"; display: inline-block; margin-inline-end: .35rem; color: var(--bek-cyan-a11y); font-weight: 800; }
.bek-home-section { margin-top: clamp(3rem, 7vw, 5.5rem); }
.bek-section-head { align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
.bek-section-head h2, .bek-section-head p { margin: 0; }
.bek-topic-grid { gap: 1rem; margin-block: 1rem; }
.bek-topic-card { min-height: 185px; padding: 1.35rem; border: 1px solid var(--bek-border); border-radius: var(--bek-radius); background: var(--bek-white); box-shadow: 0 8px 28px rgba(13,27,58,.045); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.bek-topic-card:hover { transform: translateY(-2px); border-color: rgba(0,124,153,.3); box-shadow: var(--bek-shadow); }
.bek-topic-card h3 { margin-top: 0; font-size: 1.08rem; }
.bek-topic-card h3 a { color: var(--bek-navy); }
.bek-topic-card p { margin-bottom: 0; color: var(--bek-muted); font-size: .94rem; }
.bek-book-query .wp-block-post-template { gap: 1rem; }
.bek-book-card { height: 100%; padding: .85rem; border: 1px solid var(--bek-border); border-radius: var(--bek-radius); background: var(--bek-white); }
.bek-book-cover img { border-radius: 8px; box-shadow: 0 8px 22px rgba(13,27,58,.10); }
.bek-book-card h3 { margin-block: .85rem .3rem; line-height: 1.45; }
.bek-book-card h3 a { color: var(--bek-navy); }
.bek-book-excerpt { color: var(--bek-muted); font-size: .9rem; }
.bek-value-band { box-shadow: 0 18px 50px rgba(13,27,58,.16); }
.bek-value-band > h2 { max-width: 22ch; margin-top: 0; }
.bek-value-grid { margin-top: 1.5rem; }
.bek-value-grid p { color: rgba(255,255,255,.76); }
.bek-guide-cta { gap: 1.5rem; }
.bek-guide-cta h2 { margin-top: 0; }
.bek-guide-cta p { margin-bottom: 0; }

@media (max-width: 781px) {
  .bek-topic-grid { flex-wrap: wrap !important; }
  .bek-topic-card { flex-basis: calc(50% - .5rem) !important; }
  .bek-book-query .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
  .bek-home-hero { padding-inline: 1.15rem !important; }
  .bek-home-title { max-width: none; }
  .bek-topic-card { flex-basis: 100% !important; min-height: 0; }
  .bek-book-query .wp-block-post-template { grid-template-columns: 1fr !important; }
  .bek-home-search .wp-block-search__button { min-width: auto; }
}

/* AI Hub + Topic Hub v0.5 */
.bek-hub-hero > *, .bek-topic-hero > * { max-width: 780px; }
.bek-hub-guide { gap: 1.5rem; }
.bek-hub-guide p { max-width: 55ch; color: rgba(255,255,255,.76); }
.bek-topic-hero .wp-block-query-title { margin-top: .2rem; margin-bottom: .75rem; }
.bek-topic-hero .wp-block-term-description p { max-width: 70ch; }
.bek-topic-search { width: min(100%, 360px); }
.bek-topic-search .wp-block-search__inside-wrapper { border: 1px solid var(--bek-border); border-radius: 10px; overflow: hidden; }
.bek-topic-search .wp-block-search__input { border: 0; min-width: 0; }
.bek-topic-search .wp-block-search__button { margin: 0; border-radius: 0; }
.bek-topic-products .wp-block-post-template { gap: 1rem; }
.bek-empty-state { padding: 1.5rem; border: 1px dashed #C9D4E5; border-radius: var(--bek-radius); background: var(--bek-soft); text-align: center; }
.bek-empty-state h3 { margin-top: 0; }
@media (max-width: 781px) {
  .bek-topic-products .wp-block-post-template { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width: 520px) {
  .bek-topic-products .wp-block-post-template { grid-template-columns: 1fr !important; }
  .bek-topic-search { width: 100%; }
}

/* Search + controlled filters v0.6 */
.bek-search-page { min-height: 60vh; }
.bek-search-head .wp-block-query-title { margin-top: .2rem; }
.bek-search-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)); gap: .85rem; align-items: end; margin-bottom: 1.5rem; padding: 1rem; border: 1px solid var(--bek-border); border-radius: var(--bek-radius); background: var(--bek-soft); }
.bek-search-filters label { display: grid; gap: .35rem; color: var(--bek-muted); font-size: .82rem; font-weight: 650; }
.bek-search-filters input, .bek-search-filters select { width: 100%; min-height: 44px; padding: .55rem .7rem; border: 1px solid #C9D4E5; border-radius: 8px; background: #fff; color: var(--bek-navy); font: inherit; }
.bek-search-filters input:focus-visible, .bek-search-filters select:focus-visible { border-color: var(--bek-cyan-a11y); box-shadow: 0 0 0 2px rgba(0,124,153,.12); outline: 3px solid var(--bek-cyan-a11y); outline-offset: 2px; }
.bek-filter-actions { display: flex; gap: .75rem; align-items: center; }
.bek-filter-actions button { min-height: 44px; padding: .55rem 1rem; border: 0; border-radius: 8px; background: var(--bek-navy); color: #fff; font-weight: 700; cursor: pointer; }
.bek-filter-actions a { color: var(--bek-cyan-a11y); font-size: .9rem; }
.bek-search-results .wp-block-post-template { gap: 1rem; }
@media (max-width: 1000px) { .bek-search-filters { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .bek-search-filters { grid-template-columns: 1fr; } .bek-search-results .wp-block-post-template { grid-template-columns: repeat(2,minmax(0,1fr)) !important; } }
@media (max-width: 420px) { .bek-search-results .wp-block-post-template { grid-template-columns: 1fr !important; } }

/* v0.7 catalog / author archive */
.bek-catalog-hero,.bek-author-hero{overflow:hidden}
.bek-catalog-search{max-width:46rem;margin-top:1.25rem}
.bek-catalog-toolbar{margin-block:1.25rem 1.75rem;gap:1rem;padding-bottom:1rem;border-bottom:1px solid rgba(13,27,58,.10)}
.bek-catalog-links{font-size:.92rem}
.bek-catalog-results,.bek-author-products{margin-block:1.5rem 3rem}
.bek-author-page .bek-home-section{margin-top:2rem}
@media (max-width:781px){.bek-catalog-toolbar{align-items:flex-start!important}.bek-catalog-results,.bek-author-products{--wp--style--block-gap:1rem}}

/* v0.8 guides */
.bek-guides-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.25rem;margin-top:1.25rem}
.bek-guide-card{border:1px solid rgba(13,27,58,.10);border-radius:16px;padding:1.25rem;background:#fff;box-shadow:0 8px 28px rgba(13,27,58,.04)}
.bek-guide-card h3{margin:.35rem 0 .75rem;line-height:1.55}.bek-guide-card p{color:var(--wp--preset--color--secondary-text)}
.bek-guide-card__label{font-size:.78rem;font-weight:700;color:var(--wp--preset--color--accessible-cyan)!important;margin:0}
.bek-text-link{font-weight:700;text-decoration-thickness:.08em;text-underline-offset:.18em}
.bek-guide-article__body{font-size:1.05rem;line-height:2}.bek-guide-article__body h2,.bek-guide-article__body h3{scroll-margin-top:7rem}
@media (max-width:900px){.bek-guides-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.bek-guides-grid{grid-template-columns:1fr}}


/* v0.9 accessibility / reflow / static performance hardening */
img, svg, video, canvas { max-inline-size: 100%; block-size: auto; }
.wp-block-table { max-inline-size: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
pre { max-inline-size: 100%; overflow-x: auto; white-space: pre; }
.bek-primary-nav .wp-block-navigation-item__content,
.bek-header-search .wp-block-search__button,
.bek-home-search .wp-block-search__button,
.bek-topic-search .wp-block-search__button,
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
  min-inline-size: 44px;
  min-block-size: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bek-primary-nav .wp-block-navigation-item__content { padding-inline: .55rem; }
.bek-header-search .wp-block-search__input,
.bek-topic-search .wp-block-search__input,
.bek-catalog-search .wp-block-search__input { min-block-size: 44px; }
.wp-block-query-pagination { gap: .45rem; }
.bek-brand-logo img { aspect-ratio: auto; }
@media (max-width: 360px) {
  .bek-header-row { padding-inline: .25rem; }
  .bek-brand-logo--primary img { max-height: 42px; }
  .bek-search-filters { padding: .75rem; }
  .bek-product-section { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bek-topic-card:hover { transform: none; }
}

/* =========================================================
   BEK Golden Product Renderer v1.0
   Approved visual baseline: aligned two-column hero +
   square gallery viewport + decision-intelligence color cards.
   ========================================================= */
.single-product .woocommerce-breadcrumb,
.single-product .woocommerce-notices-wrapper,
.single-product .product > .summary,
.single-product .product > .woocommerce-product-gallery { display: none !important; }
.single-product main { overflow: clip; }
.single-product div.product { max-width: none; margin: 0; }

.bek-product-shell,
.bek-product-body {
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
}
.bek-product-shell { padding-block: 22px 18px; }
.bek-product-breadcrumb { min-height: 24px; margin-bottom: 20px; color: #718096; font-size: .82rem; }
.bek-product-breadcrumb a { color: #607086; text-decoration: none; }
.bek-product-breadcrumb span { margin-inline: .45rem; color: #A9B4C3; }

.bek-product-intro {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  grid-template-areas: "gallery content";
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
  direction: rtl;
}
.bek-product-intro__gallery { grid-area: gallery; min-width: 0; }
.bek-product-intro__content { grid-area: content; min-width: 0; direction: rtl; padding-top: 0; }

/* Square UI is canonical even while portrait cover asset remains untouched. */
.bek-golden-gallery { width: 100%; }
.bek-gallery-viewer {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: clamp(18px, 3.2vw, 38px);
  border: 1px solid var(--bek-border);
  border-radius: 22px;
  background: #F6F8FC;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 12px 38px rgba(13,27,58,.055);
}
.bek-gallery-viewer:hover { text-decoration: none; }
.bek-gallery-viewer img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bek-gallery-zoom {
  position: absolute; inset-block-start: 14px; inset-inline-end: 14px;
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--bek-border); border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--bek-navy); font-size: 1.1rem;
  box-shadow: 0 8px 22px rgba(13,27,58,.08);
}
.bek-gallery-thumbs {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px;
  margin-top: 12px; direction: ltr;
}
.bek-gallery-thumb {
  aspect-ratio: 1 / 1; padding: 5px; border: 1px solid var(--bek-border); border-radius: 13px;
  background: #fff; cursor: pointer; overflow: hidden; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.bek-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }
.bek-gallery-thumb:hover { transform: translateY(-1px); }
.bek-gallery-thumb.is-active { border-color: var(--bek-cyan); box-shadow: 0 0 0 2px rgba(36,177,216,.14); }

.bek-product-heading { text-align: left; unicode-bidi: isolate; }
.bek-product-heading h1 { margin: 0; color: var(--bek-navy); font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.05; letter-spacing: -.035em; }
.bek-product-heading .bek-product-subtitle { margin: .75rem 0 0; color: var(--bek-muted); font-size: clamp(1rem, 1.55vw, 1.25rem); line-height: 1.6; }
.bek-hero-meta {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin-top: 22px; direction: ltr;
}
.bek-hero-meta > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bek-icon { display: inline-flex; flex: 0 0 auto; color: #3C73C7; }
.bek-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bek-hero-meta .bek-icon { color: #7286A1; }
.bek-hero-meta span:not(.bek-icon) { min-width: 0; display: grid; gap: 2px; }
.bek-hero-meta small { color: #8894A5; font-size: .68rem; direction: rtl; text-align: left; }
.bek-hero-meta strong { color: #263852; font-size: .86rem; white-space: normal; overflow-wrap: anywhere; }
.bek-semantic-badges { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.bek-semantic-badges span { display: inline-flex; align-items: center; min-height: 35px; padding: .34rem .78rem; border: 1px solid #DCE6F2; border-radius: 999px; background: #F8FAFD; color: #31435E; font-size: .82rem; font-weight: 700; }
.bek-hero-summary { margin: 20px 0 0; color: #3E4B5E; line-height: 2; font-size: .94rem; }

.bek-purchase-card {
  margin-top: 20px; padding: 18px 18px 16px; border: 1px solid #DDE5EF; border-radius: 16px; background: #fff;
  box-shadow: 0 10px 30px rgba(13,27,58,.05);
}
.bek-purchase-card h2,
.bek-edition-package h2,
.bek-info-card h2,
.bek-decision-card h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--bek-navy); font-size: 1rem; }
.bek-purchase-facts { margin: 12px 0 0; }
.bek-purchase-facts > div { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; min-height: 43px; border-top: 1px solid #EDF1F6; }
.bek-purchase-facts > div:first-child { border-top: 0; }
.bek-purchase-facts dt { color: #718096; font-size: .82rem; }
.bek-purchase-facts dd { margin: 0; color: #1E314C; font-weight: 750; }
.bek-purchase-facts .bek-price-primary { color: #E57B2F; }
.bek-purchase-disabled { width: 100%; min-height: 46px; margin-top: 10px; border: 0; border-radius: 9px; background: #D9DEE7; color: #fff; font: inherit; font-weight: 750; }
.bek-purchase-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; color: #78879A; font-size: .76rem; }
.bek-purchase-note .bek-icon svg { width: 15px; height: 15px; }

.bek-edition-package { margin-top: 12px; padding: 16px 18px; border: 1px solid #E2E8F1; border-radius: 15px; background: #FBFCFE; }
.bek-edition-package__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.bek-edition-primary, .bek-edition-bonus { min-width: 0; padding: 13px; border: 1px solid #E8EDF4; border-radius: 12px; background: #fff; }
.bek-edition-primary { display: grid; gap: 6px; }
.bek-kicker { color: #6E7D90; font-size: .74rem; font-weight: 750; }
.bek-muted { color: #7B8797; font-size: .8rem; }
.bek-edition-bonus ul { list-style: none; margin: 8px 0 0; padding: 0; }
.bek-edition-bonus li { display: flex; gap: 7px; margin-top: 5px; color: #31435E; font-size: .82rem; }
.bek-edition-bonus li .bek-icon { color: #179456; }
.bek-edition-bonus p { margin: 8px 0 0; color: #7B8797; font-size: .75rem; line-height: 1.7; }

.bek-product-body { padding-block: 8px 56px; }
.bek-trust-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.bek-trust-item { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid #E3E9F1; border-radius: 14px; background: #fff; }
.bek-trust-item .bek-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #EFF8FB; color: var(--bek-cyan-a11y); }
.bek-trust-item span:not(.bek-icon) { display: grid; gap: 4px; }
.bek-trust-item strong { color: #223650; font-size: .85rem; }
.bek-trust-item small { color: #7B8797; line-height: 1.65; font-size: .72rem; }

.bek-body-grid { display: grid; gap: 14px; margin-top: 14px; }
.bek-body-grid--about { grid-template-columns: 1.15fr .85fr; }
.bek-body-grid--decisions { grid-template-columns: repeat(2, minmax(0,1fr)); }
.bek-body-grid--toc { grid-template-columns: .9fr 1.1fr; }
.bek-body-grid--specs { grid-template-columns: repeat(2, minmax(0,1fr)); }
.bek-info-card, .bek-decision-card, .bek-author-card { min-width: 0; padding: 20px; border: 1px solid #E2E8F0; border-radius: 16px; background: #fff; }
.bek-info-card p { margin: 14px 0 0; color: #46566A; line-height: 2; font-size: .9rem; }
.bek-decision-card ul { list-style: none; margin: 14px 0 0; padding: 0; }
.bek-decision-card li { display: flex; align-items: flex-start; gap: 8px; margin-top: 9px; color: #415168; line-height: 1.8; font-size: .86rem; }
.bek-decision-card li .bek-icon { margin-top: 4px; }
.bek-decision-card--blue { background: linear-gradient(135deg,#F9FCFF,#F2F8FF); border-color: #D9E8FB; }
.bek-decision-card--blue h2, .bek-decision-card--blue li .bek-icon { color: #216BCC; }
.bek-decision-card--green { background: linear-gradient(135deg,#F9FFFB,#F0FAF4); border-color: #D9EEDF; }
.bek-decision-card--green h2, .bek-decision-card--green li .bek-icon { color: #16834F; }
.bek-decision-card--red { background: linear-gradient(135deg,#FFF9F9,#FFF1F1); border-color: #F2D9D9; }
.bek-decision-card--red h2, .bek-decision-card--red li .bek-icon { color: #D94747; }

.bek-toc-card ol { margin: 14px 0 0; padding-left: 1.5rem; color: #46566A; }
.bek-toc-card li { margin-top: 8px; line-height: 1.55; font-size: .82rem; }
.bek-topic-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.bek-topic-chips span { padding: .35rem .62rem; border-radius: 999px; background: #F3F6FA; color: #43536A; font-size: .75rem; }
.bek-spec-card dl { margin: 14px 0 0; }
.bek-spec-card dl > div { display: grid; grid-template-columns: minmax(120px,.45fr) 1fr; gap: 12px; padding-block: 8px; border-top: 1px solid #EDF1F5; }
.bek-spec-card dl > div:first-child { border-top: 0; }
.bek-spec-card dt { color: #7A8797; font-size: .76rem; }
.bek-spec-card dd { margin: 0; color: #2C3E58; font-size: .8rem; font-weight: 650; overflow-wrap: anywhere; }

.bek-author-card { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: center; margin-top: 14px; }
.bek-author-avatar { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(145deg,#EEF5FF,#E6F7FB); color: #245A9E; font-size: 1.4rem; font-weight: 800; }
.bek-author-card h2 { margin: 3px 0 0; color: var(--bek-navy); font-size: 1.05rem; }
.bek-author-card p { margin: 8px 0 0; color: #6B798C; font-size: .78rem; line-height: 1.7; }

@media (max-width: 1020px) {
  .bek-product-intro { grid-template-columns: minmax(0, 48%) minmax(0, 52%); gap: 28px; }
  .bek-hero-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bek-edition-package__grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .bek-product-shell, .bek-product-body { width: min(100% - 28px, 720px); }
  .bek-product-intro { grid-template-columns: 1fr; grid-template-areas: "gallery" "content"; gap: 24px; }
  .bek-product-intro__content { padding-top: 0; }
  .bek-product-heading { text-align: left; }
  .bek-gallery-viewer { max-width: 620px; margin-inline: auto; }
  .bek-gallery-thumbs { max-width: 620px; margin-inline: auto; }
  .bek-body-grid--about, .bek-body-grid--toc, .bek-body-grid--specs { grid-template-columns: 1fr; }
  .bek-trust-strip { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .bek-product-shell, .bek-product-body { width: min(100% - 20px, 540px); }
  .bek-product-shell { padding-top: 12px; }
  .bek-product-breadcrumb { margin-bottom: 12px; font-size: .72rem; }
  .bek-gallery-viewer { padding: 16px; border-radius: 16px; }
  .bek-gallery-thumbs { display: flex; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .bek-gallery-thumb { flex: 0 0 72px; width: 72px; }
  .bek-product-heading h1 { font-size: clamp(1.9rem, 11vw, 2.6rem); }
  .bek-product-heading .bek-product-subtitle { font-size: 1rem; }
  .bek-hero-meta { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 8px; }
  .bek-semantic-badges { gap: 6px; }
  .bek-semantic-badges span { min-height: 32px; padding-inline: .65rem; font-size: .75rem; }
  .bek-hero-summary { font-size: .88rem; }
  .bek-purchase-card, .bek-edition-package, .bek-info-card, .bek-decision-card, .bek-author-card { padding: 15px; border-radius: 14px; }
  .bek-body-grid--decisions { grid-template-columns: 1fr; }
  .bek-product-body { padding-bottom: 34px; }
  .bek-spec-card dl > div { grid-template-columns: 1fr; gap: 3px; }
}

/* Golden Product Renderer v1.1 — typography, smart pricing and profile content. */
body { font-family: IRANYekanX, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
.bek-single-product-template { margin: 0; }
.bek-single-product-template > .wp-block-shortcode { margin: 0; }
.bek-single-product-template .woocommerce-notices-wrapper { width: min(1240px, calc(100% - 40px)); margin: 16px auto 0; }

.bek-product-intro { align-items: start; }
.bek-product-intro__content { padding-top: 0; }
.bek-product-heading h1 { font-weight: 800; }
.bek-product-heading .bek-product-subtitle { font-weight: 400; }
.bek-hero-summary { max-width: 66ch; }

.bek-purchase-card { padding: 20px; border-radius: 18px; box-shadow: 0 14px 38px rgba(13,27,58,.065); }
.bek-purchase-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bek-discount-badge { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 30px; padding: .25rem .65rem; border-radius: 999px; background: #EAF8EF; color: #137A47; font-size: .76rem; font-weight: 800; }
.bek-discount-badge--special { background: #FFF4E9; color: #B45D14; }
.bek-smart-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin: 16px 0 8px; padding: 15px 16px; border: 1px solid #DDE8F2; border-radius: 14px; background: linear-gradient(135deg,#F8FCFF,#F6F9FD); }
.bek-smart-price__regular { color: #8591A2; font-size: .86rem; }
.bek-smart-price__current { color: var(--bek-navy); font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.2; font-weight: 850; }
.bek-smart-price__label { flex-basis: 100%; color: #68778B; font-size: .74rem; }
.bek-price-updated { margin: 9px 0 0; color: #8A96A6; font-size: .7rem; text-align: center; }

.bek-people-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin-top: 14px; }
.bek-profile-section { min-width: 0; padding: 20px; border: 1px solid #E2E8F0; border-radius: 16px; background: #fff; }
.bek-profile-section__head { display: grid; gap: 3px; margin-bottom: 12px; }
.bek-profile-section__head h2 { margin: 0; color: var(--bek-navy); font-size: 1.05rem; }
.bek-author-list { display: grid; gap: 12px; }
.bek-author-card { margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid #EDF1F5; border-radius: 0; }
.bek-author-card:first-child { padding-top: 0; border-top: 0; }
.bek-author-card h3 { margin: 0; color: var(--bek-navy); font-size: 1rem; }
.bek-profile-role { display: inline-block; margin-top: 3px; color: #7A8797; font-size: .72rem; }
.bek-author-card p, .bek-publisher-card p { margin: 8px 0 0; color: #5E6C7E; font-size: .82rem; line-height: 1.95; }
.bek-publisher-card { background: linear-gradient(135deg,#FCFDFF,#F7FAFD); }
.bek-review-data-gap { margin-top: 14px; padding: 10px 12px; border: 1px dashed #D6A32C; border-radius: 10px; background: #FFF9E9; color: #795A08; font-size: .76rem; line-height: 1.8; }

@media (max-width: 820px) {
  .bek-people-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .bek-purchase-head { align-items: flex-start; }
  .bek-smart-price__current { font-size: 1.55rem; }
}

/* =========================================================
   Golden Product Renderer v1.1.1 — readability, Persian UI,
   progressive disclosure and enrichment-ready modules.
   ========================================================= */
body { font-family: var(--bek-ui-font, IRANYekanX, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif); }
.bek-product-shell,
.bek-product-body { width: min(1320px, calc(100% - 48px)); }
.bek-product-body { font-size: 1rem; }
.bek-hero-summary { font-size: 1rem; line-height: 2.05; }
.bek-info-card p { font-size: .96rem; }
.bek-decision-card li { font-size: .92rem; }
.bek-spec-card dt { font-size: .8rem; }
.bek-spec-card dd { font-size: .86rem; }

.bek-decision-card--amber { background: linear-gradient(135deg,#FFFDF7,#FFF7E8); border-color: #F0E0B9; }
.bek-decision-card--amber h2,
.bek-decision-card--amber li .bek-icon { color: #A76A13; }

.bek-toc-more { margin-top: 14px; border-top: 1px solid #EDF1F5; padding-top: 12px; }
.bek-toc-more summary { cursor: pointer; color: #1769B0; font-weight: 750; font-size: .84rem; }
.bek-toc-more[open] summary { margin-bottom: 10px; }
.bek-toc-card li { font-size: .88rem; line-height: 1.7; }

.bek-preview-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.bek-inline-action { display: inline-flex; align-items: center; min-height: 40px; padding: .48rem .9rem; border-radius: 9px; background: var(--bek-navy); color: #fff !important; font-weight: 750; text-decoration: none !important; }
.bek-inline-action:hover { opacity: .93; }

.bek-body-grid--resources { grid-template-columns: 1fr; }
.bek-resource-list { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.bek-resource-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 12px; border: 1px solid #EDF1F5; border-radius: 10px; background: #FBFCFE; }
.bek-resource-list li > span { display: grid; gap: 2px; }
.bek-resource-list small { color: #7A8797; }

.bek-people-grid > :only-child { grid-column: 1 / -1; }
.bek-profile-section { padding: 22px; }
.bek-author-card p, .bek-publisher-card p { font-size: .9rem; line-height: 2; }

.bek-trust-detail { margin-top: 14px; }
.bek-trust-detail dl { margin: 14px 0 0; }
.bek-trust-detail dl > div { display: grid; grid-template-columns: minmax(130px,.28fr) 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid #EDF1F5; }
.bek-trust-detail dl > div:first-child { border-top: 0; }
.bek-trust-detail dt { color: #6F7E91; font-size: .8rem; }
.bek-trust-detail dd { margin: 0; color: #33465F; font-size: .88rem; line-height: 1.9; }

.bek-review-data-gap { font-size: .8rem; }

@media (max-width: 820px) {
  .bek-product-shell, .bek-product-body { width: min(100% - 28px, 760px); }
  .bek-trust-detail dl > div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 600px) {
  .bek-product-shell, .bek-product-body { width: min(100% - 20px, 560px); }
  .bek-resource-list li { align-items: flex-start; flex-direction: column; }
}


/* =========================================================
   Golden Product Renderer v1.1.2 — containment + public UX.
   Fixes gallery overflow caused by content-box sizing and keeps
   editorial/debug data out of the customer-facing page.
   ========================================================= */
.bek-product-intro { isolation: isolate; }
.bek-product-intro > * { min-width: 0; max-width: 100%; }
.bek-product-intro__gallery,
.bek-product-intro__content { position: relative; max-width: 100%; }
.bek-product-intro__gallery { z-index: 1; }
.bek-product-intro__content { z-index: 2; }
.bek-golden-gallery,
.bek-gallery-viewer,
.bek-gallery-thumbs { max-width: 100%; box-sizing: border-box; }
.bek-gallery-viewer { width: 100%; }
.bek-gallery-viewer img { max-width: 100%; max-height: 100%; }
.bek-product-heading,
.bek-hero-meta,
.bek-semantic-badges,
.bek-hero-summary,
.bek-purchase-card,
.bek-edition-package { max-width: 100%; }
.bek-hero-summary,
.bek-info-card p,
.bek-decision-card li,
.bek-author-card p,
.bek-publisher-card p { overflow-wrap: anywhere; word-break: normal; }
.bek-hero-summary { direction: rtl; unicode-bidi: plaintext; }
.bek-edition-package__grid:has(.bek-edition-primary:only-child) { grid-template-columns: 1fr; }
.bek-author-avatar--image,
.bek-publisher-logo { overflow: hidden; background: #fff; border: 1px solid #E7ECF3; }
.bek-author-avatar--image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bek-publisher-profile-layout { display: grid; grid-template-columns: 82px 1fr; gap: 16px; align-items: start; }
.bek-publisher-logo { display: grid; place-items: center; width: 82px; height: 82px; padding: 10px; border-radius: 14px; }
.bek-publisher-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Two columns only while each side has enough usable width. */
@media (max-width: 1120px) {
  .bek-product-shell, .bek-product-body { width: min(100% - 32px, 900px); }
  .bek-product-intro { grid-template-columns: 1fr; grid-template-areas: "gallery" "content"; gap: 26px; }
  .bek-product-intro__gallery { width: min(100%, 680px); margin-inline: auto; }
  .bek-gallery-viewer, .bek-gallery-thumbs { width: 100%; margin-inline: auto; }
  .bek-product-intro__content { width: 100%; }
}
@media (max-width: 600px) {
  .bek-publisher-profile-layout { grid-template-columns: 64px 1fr; gap: 12px; }
  .bek-publisher-logo { width: 64px; height: 64px; padding: 8px; }
}

/* =========================================================
   Golden Product Renderer v1.2.0 — RTL hierarchy + bilingual
   editorial content. Desktop: content right, gallery left.
   Mobile: identity first, then gallery, then commerce.
   ========================================================= */
.bek-product-intro {
  direction: ltr;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  grid-template-areas:
    "gallery head"
    "gallery commerce";
  column-gap: clamp(32px, 4vw, 56px);
  row-gap: 18px;
  align-items: start;
}
.bek-product-intro__head { grid-area: head; min-width: 0; max-width: 100%; direction: rtl; text-align: right; }
.bek-product-intro__gallery { grid-area: gallery; min-width: 0; max-width: 100%; align-self: start; }
.bek-product-intro__commerce { grid-area: commerce; min-width: 0; max-width: 100%; direction: rtl; }
.bek-product-intro__commerce .bek-purchase-card { margin-top: 0; }

/* English bibliographic identity is visually LTR, Persian editorial copy is always RTL. */
.bek-product-heading { text-align: left; }
.bek-hero-summary,
.bek-info-card--about > p,
.bek-decision-card li > span,
.bek-trust-item small,
.bek-edition-package p {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: plaintext;
}
.bek-hero-summary { margin-inline: 0; max-width: 100%; }

/* Bilingual description: Persian remains primary; original English is secondary and collapsible. */
.bek-original-description {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #E9EEF5;
}
.bek-original-description summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: #245A9E;
  font-size: .86rem;
  font-weight: 800;
  list-style: none;
}
.bek-original-description summary::-webkit-details-marker { display: none; }
.bek-original-description summary::after { content: "＋"; flex: 0 0 auto; font-size: 1rem; color: #6F7E91; }
.bek-original-description[open] summary::after { content: "−"; }
.bek-original-description summary span { color: #8A96A6; font-size: .72rem; font-weight: 500; }
.bek-original-description__body { margin-top: 12px; padding: 14px 16px; border-radius: 12px; background: #F8FAFD; }
.bek-original-description__body p {
  margin: 0 !important;
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
  color: #46566A;
  font-size: .91rem;
  line-height: 1.85;
}

/* Public trust is compact and only contains meaningful verified claims. */
.bek-trust-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }

/* Profile copy is Persian/right-aligned; canonical English names stay LTR. */
.bek-author-card p,
.bek-publisher-card p { direction: rtl; text-align: right; unicode-bidi: plaintext; }

/* Prevent dashboard-like repetition: edition bundle is rendered only when bonus editions exist. */
.bek-edition-package { margin-top: 0; }

/* Break to one column before either side becomes cramped. */
@media (max-width: 1120px) {
  .bek-product-intro {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "gallery"
      "commerce";
    gap: 22px;
    direction: rtl;
  }
  .bek-product-intro__head,
  .bek-product-intro__commerce { width: min(100%, 760px); margin-inline: auto; }
  .bek-product-intro__gallery { width: min(100%, 680px); margin-inline: auto; }
  .bek-gallery-viewer, .bek-gallery-thumbs { width: 100%; margin-inline: auto; }
}
@media (max-width: 600px) {
  .bek-product-intro { gap: 18px; }
  .bek-product-intro__head,
  .bek-product-intro__commerce,
  .bek-product-intro__gallery { width: 100%; }
  .bek-original-description summary { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* RTL metadata flow inside the right content column. */
.bek-hero-meta { direction: rtl; }
.bek-hero-meta small { text-align: right; }
.bek-hero-meta strong { text-align: right; unicode-bidi: isolate; }
.bek-semantic-badges { direction: rtl; justify-content: flex-start; }


/* v1.2.1 asset-delivery safety: SVG icons have explicit intrinsic dimensions too. */
.bek-icon > svg { inline-size: 19px !important; block-size: 19px !important; max-inline-size: 19px !important; max-block-size: 19px !important; flex: 0 0 19px; fill: none !important; stroke: currentColor !important; }
.bek-purchase-note .bek-icon > svg { inline-size: 15px !important; block-size: 15px !important; max-inline-size: 15px !important; max-block-size: 15px !important; }

/* v1.2.2 — Canonical product shell integrity */
body.bek-product-shell .bek-site-header,
body.bek-product-shell .bek-site-footer {
    display: block;
}
body.bek-product-shell .bek-single-product-template {
    min-width: 0;
    width: 100%;
}

/* =========================================================
   BEK Global Design System v1.3.0 — unified shell + commerce.
   Research-informed: prominent search, restrained navigation,
   semantic footer groups, WCAG-aware brand palette.
   ========================================================= */
:root {
  --bek-navy: #0D1B3A;
  --bek-navy-2: #132B56;
  --bek-cyan: #24B1D8;
  --bek-cyan-a11y: #007C99;
  --bek-cyan-soft: #EDF8FB;
  --bek-soft: #F7F9FC;
  --bek-surface: #FFFFFF;
  --bek-text: #13213A;
  --bek-muted: #667085;
  --bek-border: #E3E8EF;
  --bek-border-strong: #D3DCE7;
  --bek-success: #16834F;
  --bek-success-soft: #F1F9F5;
  --bek-danger: #B5474F;
  --bek-danger-soft: #FFF5F5;
  --bek-warning: #9A6400;
  --bek-warning-soft: #FFF9EB;
  --bek-radius-sm: 10px;
  --bek-radius: 16px;
  --bek-radius-lg: 22px;
  --bek-shadow-sm: 0 8px 24px rgba(13,27,58,.055);
  --bek-shadow: 0 16px 44px rgba(13,27,58,.075);
}

body {
  background: var(--bek-soft);
  color: var(--bek-text);
}
main { background: transparent; }

/* ---------- Header ---------- */
.bek-site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--bek-border);
  box-shadow: 0 8px 28px rgba(13,27,58,.045);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.admin-bar .bek-site-header { top: 32px; }
.bek-header-main {
  min-height: 78px;
  padding-block: 12px;
  gap: clamp(18px, 3vw, 34px);
  direction: rtl;
}
.bek-brand-logo--wordmark {
  width: 142px;
  max-width: 142px;
}
.bek-brand-logo--wordmark img {
  width: 142px;
  max-height: 48px;
  object-fit: contain;
}
.bek-header-search {
  flex: 1 1 520px;
  max-width: 650px;
  min-width: 260px;
  margin-inline: auto;
}
.bek-header-search .wp-block-search__inside-wrapper {
  min-height: 48px;
  padding: 4px 5px 4px 4px;
  border: 1px solid var(--bek-border-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(13,27,58,.015);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.bek-header-search .wp-block-search__inside-wrapper:focus-within {
  border-color: var(--bek-cyan-a11y);
  box-shadow: 0 0 0 3px rgba(0,124,153,.11);
}
.bek-header-search .wp-block-search__input {
  min-height: 38px;
  padding-inline: 12px;
  border: 0;
  background: transparent;
  color: var(--bek-text);
  font-size: .92rem;
}
.bek-header-search .wp-block-search__input::placeholder { color: #8A94A5; }
.bek-header-search .wp-block-search__button {
  display: grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  background: var(--bek-navy);
  color: #fff;
}
.bek-header-search .wp-block-search__button:hover { background: var(--bek-navy-2); }
.bek-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  direction: rtl;
  flex: 0 0 auto;
}
.bek-header-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--bek-navy);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.bek-header-action:hover {
  background: var(--bek-cyan-soft);
  border-color: rgba(0,124,153,.16);
  color: var(--bek-cyan-a11y);
}
.bek-header-action svg { display: block; }
.bek-header-cart-count {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding-inline: 4px;
  border-radius: 99px;
  background: var(--bek-cyan-a11y);
  color: #fff;
  font-size: .68rem;
  line-height: 1;
}
.bek-header-nav-shell {
  border-top: 1px solid #F0F3F7;
  background: #FBFCFE;
}
.bek-header-nav-row {
  min-height: 46px;
  gap: 20px;
  direction: rtl;
}
.bek-primary-nav { margin: 0; }
.bek-primary-nav .wp-block-navigation__container { gap: 4px 22px; }
.bek-primary-nav .wp-block-navigation-item__content {
  position: relative;
  padding-block: 12px;
  color: #33435B;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}
.bek-primary-nav .wp-block-navigation-item__content:hover,
.bek-primary-nav .current-menu-item > .wp-block-navigation-item__content,
.bek-primary-nav [aria-current="page"] {
  color: var(--bek-cyan-a11y);
  text-decoration: none;
}
.bek-primary-nav .current-menu-item > .wp-block-navigation-item__content::after,
.bek-primary-nav [aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 5px;
  height: 2px;
  border-radius: 99px;
  background: var(--bek-cyan-a11y);
}
.bek-header-promise {
  margin: 0;
  color: #758195;
  font-size: .72rem;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.bek-site-footer { margin-top: clamp(56px, 7vw, 96px); }
.bek-prefooter {
  background: linear-gradient(135deg, #EEF8FB 0%, #F7FAFC 58%, #F3F7FB 100%);
  border-top: 1px solid var(--bek-border);
}
.bek-prefooter-inner {
  min-height: 150px;
  padding-block: 30px;
  gap: 28px;
  direction: rtl;
}
.bek-prefooter-copy { margin: 0 !important; }
.bek-prefooter-copy h2 {
  margin: 0;
  color: var(--bek-navy);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.5;
}
.bek-prefooter-copy p { margin: 7px 0 0; color: var(--bek-muted); font-size: .9rem; }
.bek-footer-search { width: min(100%, 430px); }
.bek-footer-search .wp-block-search__inside-wrapper {
  min-height: 50px;
  padding: 4px;
  border: 1px solid var(--bek-border-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--bek-shadow-sm);
}
.bek-footer-search .wp-block-search__input { border: 0; min-width: 0; padding-inline: 12px; }
.bek-footer-search .wp-block-search__button {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  background: var(--bek-navy);
  color: #fff;
}
.bek-footer-main {
  position: relative;
  overflow: hidden;
  padding-block: 50px 22px;
  background: #09172F;
  color: #fff;
}
.bek-footer-main::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  inset-inline-start: -170px;
  inset-block-start: -250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(36,177,216,.16), rgba(36,177,216,0) 70%);
  pointer-events: none;
}
.bek-footer-grid {
  position: relative;
  z-index: 1;
  gap: clamp(28px, 5vw, 72px);
  margin-bottom: 38px;
  direction: rtl;
}
.bek-footer-brand .bek-brand-logo--reverse img { max-height: 74px; }
.bek-footer-positioning {
  max-width: 42ch;
  margin: 18px 0 0;
  color: rgba(255,255,255,.74);
  font-size: .88rem;
  line-height: 2;
}
.bek-footer-trust { gap: 7px; margin-top: 18px; }
.bek-footer-trust p {
  margin: 0;
  padding: .28rem .58rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.78);
  font-size: .7rem;
}
.bek-footer-grid h3 {
  margin: 4px 0 0;
  color: #fff;
  font-size: .92rem;
  font-weight: 800;
}
.bek-footer-links { margin-top: 14px; }
.bek-footer-links li + li { margin-top: 8px; }
.bek-footer-links a {
  color: rgba(255,255,255,.72);
  font-size: .82rem;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
}
.bek-footer-links a:hover { color: #fff; text-decoration: none; }
.bek-footer-bottom {
  position: relative;
  z-index: 1;
  min-height: 56px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.56);
  font-size: .72rem;
  direction: rtl;
}
.bek-footer-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.bek-footer-note { margin: 0; color: rgba(255,255,255,.56); }

/* ---------- Brand coherence across product UI ---------- */
.bek-single-product-template { background: var(--bek-soft); }
.bek-product-shell { padding-top: 28px; }
.bek-product-breadcrumb,
.bek-product-breadcrumb a { color: var(--bek-muted); }
.bek-gallery-viewer {
  background: #F1F5F9;
  border-color: var(--bek-border);
  box-shadow: var(--bek-shadow-sm);
}
.bek-gallery-thumb {
  border-color: var(--bek-border);
  border-radius: 12px;
}
.bek-gallery-thumb.is-active {
  border-color: var(--bek-cyan-a11y);
  box-shadow: 0 0 0 2px rgba(0,124,153,.12);
}
.bek-gallery-zoom { color: var(--bek-cyan-a11y); }
.bek-icon { color: var(--bek-cyan-a11y); }
.bek-hero-meta .bek-icon { color: #60748C; }
.bek-hero-meta small,
.bek-purchase-facts dt,
.bek-spec-card dt { color: var(--bek-muted); }
.bek-hero-meta strong,
.bek-purchase-facts dd,
.bek-spec-card dd { color: var(--bek-text); }
.bek-semantic-badges span {
  border-color: #D9E5EC;
  background: #F5F9FB;
  color: #334A5F;
}
.bek-hero-summary { color: #3C4B60; }
.bek-purchase-card,
.bek-edition-package,
.bek-info-card,
.bek-decision-card,
.bek-profile-section,
.bek-author-card,
.bek-trust-item {
  border-color: var(--bek-border);
  background: var(--bek-surface);
}
.bek-purchase-card {
  border-top: 3px solid var(--bek-cyan-a11y);
  box-shadow: var(--bek-shadow-sm);
}
.bek-purchase-facts .bek-price-primary { color: var(--bek-navy); }
.bek-smart-price {
  border-color: #D7E8ED;
  background: linear-gradient(135deg,#F4FAFC,#F8FBFD);
}
.bek-smart-price__current { color: var(--bek-navy); }
.bek-discount-badge { background: var(--bek-success-soft); color: var(--bek-success); }
.bek-discount-badge--special { background: var(--bek-warning-soft); color: var(--bek-warning); }
.bek-purchase-disabled { background: #D8DFE8; color: #fff; }
.bek-trust-item .bek-icon { background: var(--bek-cyan-soft); color: var(--bek-cyan-a11y); }
.bek-decision-card--blue {
  background: linear-gradient(135deg,#F8FCFD,#F0F8FA);
  border-color: #D8EAEE;
}
.bek-decision-card--blue h2,
.bek-decision-card--blue li .bek-icon { color: var(--bek-cyan-a11y); }
.bek-decision-card--green {
  background: linear-gradient(135deg,#FAFDFB,#F1F9F5);
  border-color: #D9ECE1;
}
.bek-decision-card--green h2,
.bek-decision-card--green li .bek-icon { color: var(--bek-success); }
.bek-decision-card--red {
  background: linear-gradient(135deg,#FFFBFB,#FFF5F5);
  border-color: #F0DADB;
}
.bek-decision-card--red h2,
.bek-decision-card--red li .bek-icon { color: var(--bek-danger); }
.bek-decision-card--amber {
  background: linear-gradient(135deg,#FFFDF8,#FFF9EB);
  border-color: #EEE2C7;
}
.bek-decision-card--amber h2,
.bek-decision-card--amber li .bek-icon { color: var(--bek-warning); }
.bek-topic-chips span { background: #F0F5F8; color: #40566C; }
.bek-original-description { border-top-color: var(--bek-border); }
.bek-original-description summary { color: var(--bek-cyan-a11y); }
.bek-original-description__body { background: #F5F8FB; }
.bek-inline-action { background: var(--bek-navy); }
.bek-inline-action:hover { background: var(--bek-navy-2); opacity: 1; }
.bek-author-avatar { background: var(--bek-cyan-soft); color: var(--bek-cyan-a11y); }
.bek-publisher-card { background: #FBFCFD; }

/* ---------- Responsive shell ---------- */
@media (max-width: 980px) {
  .bek-header-main { flex-wrap: wrap !important; gap: 10px 16px; }
  .bek-brand-logo--wordmark { order: 1; }
  .bek-header-actions { order: 2; margin-inline-start: auto; }
  .bek-header-search { order: 3; flex-basis: 100%; max-width: none; width: 100%; }
  .bek-header-main { padding-block: 9px 11px; }
  .bek-header-nav-row { min-height: 44px; }
  .bek-header-promise { display: none; }
  .bek-primary-nav { width: 100%; }
}
@media (max-width: 782px) {
  .admin-bar .bek-site-header { top: 46px; }
  .bek-footer-grid { flex-wrap: wrap !important; }
  .bek-footer-brand { flex-basis: 100% !important; }
  .bek-footer-grid > .wp-block-column:not(.bek-footer-brand) { flex-basis: calc(33.333% - 20px) !important; }
}
@media (max-width: 620px) {
  .bek-site-header { position: relative; top: auto !important; }
  .bek-header-main { min-height: auto; padding-inline: 14px; }
  .bek-brand-logo--wordmark,
  .bek-brand-logo--wordmark img { width: 118px; }
  .bek-header-action { width: 40px; min-width: 40px; height: 40px; padding: 0; justify-content: center; }
  .bek-header-action > span:not(.bek-header-cart-count) { display: none; }
  .bek-header-nav-shell { background: #fff; }
  .bek-header-nav-row { padding-inline: 14px; }
  .bek-primary-nav .wp-block-navigation__responsive-container-open { color: var(--bek-navy); }
  .bek-primary-nav .wp-block-navigation__responsive-container.is-menu-open {
    padding: 24px;
    background: #fff;
    color: var(--bek-navy);
  }
  .bek-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 6px; }
  .bek-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    width: 100%; padding: 10px 0; font-size: 1rem;
  }
  .bek-prefooter-inner { padding: 26px 18px; align-items: stretch !important; }
  .bek-footer-search { width: 100%; }
  .bek-footer-main { padding: 40px 18px 20px; }
  .bek-footer-grid { gap: 28px 12px; }
  .bek-footer-grid > .wp-block-column:not(.bek-footer-brand) { flex-basis: calc(50% - 8px) !important; }
  .bek-footer-bottom { align-items: flex-start !important; gap: 8px; }
}
@media (max-width: 420px) {
  .bek-footer-grid > .wp-block-column:not(.bek-footer-brand) { flex-basis: 100% !important; }
}

/* v1.3.0 contrast hardening for small customer-facing copy. */
.bek-header-promise,
.bek-header-search .wp-block-search__input::placeholder,
.bek-footer-search .wp-block-search__input::placeholder,
.bek-kicker,
.bek-muted,
.bek-purchase-note,
.bek-smart-price__label,
.bek-original-description summary span,
.bek-author-card p,
.bek-publisher-card p { color: var(--bek-muted); }
.bek-product-shell,
.bek-product-body { width: min(1280px, calc(100% - 48px)); }
.bek-footer-brand .bek-brand-logo--reverse img { width: 88px; max-height: none; }


/* =========================================================
   BEK Product Commerce & RTL Polish v1.3.1
   - normal customer-facing pricing language
   - robust Persian/Latin bidi handling
   - real add-to-cart CTA styling
   - no fake author-avatar placeholder
   - collapse conditional whitespace
   ========================================================= */
.bek-hero-summary,
.bek-info-card p,
.bek-info-card--about > p,
.bek-decision-card,
.bek-decision-card li,
.bek-decision-card li > span,
.bek-trust-item small,
.bek-edition-package p,
.bek-author-card p,
.bek-publisher-card p {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Canonical bibliographic names remain LTR without flipping surrounding Persian UI. */
.bek-product-heading,
.bek-author-card h3[dir="ltr"],
.bek-publisher-card h2[dir="ltr"],
.bek-purchase-facts dd[dir="ltr"],
.bek-spec-card dd[dir="ltr"] {
  unicode-bidi: isolate;
}

/* Price is presented as the store price; pricing-engine mechanics stay internal. */
.bek-smart-price__label {
  color: var(--bek-muted);
  font-weight: 650;
}

/* Real WooCommerce purchase control when commerce is unlocked. */
.bek-purchase-card form.cart {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 16px 0 0 !important;
  direction: rtl;
}
.bek-purchase-card form.cart .quantity {
  flex: 0 0 92px;
  margin: 0 !important;
}
.bek-purchase-card form.cart .qty {
  width: 100%;
  min-height: 48px;
  padding: 0 10px;
  border: 1px solid var(--bek-border-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--bek-text);
  text-align: center;
  font: inherit;
}
.bek-purchase-card form.cart .single_add_to_cart_button,
.bek-purchase-card .single_add_to_cart_button {
  flex: 1 1 auto;
  min-height: 48px;
  margin: 0 !important;
  padding: 0 22px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--bek-navy) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-weight: 800 !important;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(13,27,58,.14);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.bek-purchase-card form.cart .single_add_to_cart_button:hover,
.bek-purchase-card .single_add_to_cart_button:hover {
  background: var(--bek-navy-2) !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(13,27,58,.18);
}

/* Do not simulate a portrait with an initial. */
.bek-author-card--no-media {
  grid-template-columns: 1fr !important;
}
.bek-author-card--no-media > div {
  min-width: 0;
}

/* Conditional modules must never reserve large blank areas. */
.bek-product-body,
.bek-people-grid,
.bek-profile-section,
.bek-author-list,
.bek-author-card,
.bek-publisher-card {
  min-height: 0 !important;
}
.bek-people-grid {
  align-items: start;
  margin-bottom: 0;
}
.bek-product-body {
  padding-bottom: clamp(24px, 4vw, 48px);
}
.bek-single-product-template + .bek-site-footer,
.bek-product-body + .bek-site-footer {
  margin-top: 0;
}
body.single-product .bek-site-footer {
  margin-top: clamp(28px, 4vw, 56px);
}

@media (max-width: 620px) {
  .bek-purchase-card form.cart {
    flex-direction: column;
  }
  .bek-purchase-card form.cart .quantity {
    flex-basis: auto;
  }
}
.bek-ltr-fragment {
  display: inline;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: normal;
}
body.single-product .bek-site-footer { margin-top: 24px; }

/* =========================================================
   BEK Final UX / Performance Polish v1.4.0
   - refined depth and hierarchy without changing content contracts
   - touch/focus ergonomics
   - stable media layout and responsive commerce surfaces
   ========================================================= */
body {
  background:
    radial-gradient(circle at 90% -10%, rgba(36,177,216,.07), transparent 28rem),
    #F7F9FC;
}
.bek-site-header {
  border-bottom: 1px solid rgba(13,27,58,.07);
  box-shadow: 0 8px 26px rgba(13,27,58,.045);
}
@supports (backdrop-filter: blur(10px)) {
  .bek-site-header { background: rgba(255,255,255,.94); backdrop-filter: blur(14px) saturate(135%); }
}
.bek-home-hero {
  border: 1px solid rgba(13,27,58,.065);
  border-radius: clamp(18px, 2.5vw, 28px);
  box-shadow: 0 24px 70px rgba(13,27,58,.07);
}
.bek-topic-card,
.bek-book-card,
.bek-product-section,
.bek-info-card,
.bek-purchase-card,
.bek-edition-package,
.bek-author-card,
.bek-publisher-card {
  box-shadow: 0 10px 32px rgba(13,27,58,.055);
}
.bek-book-cover img,
.bek-gallery-main img,
.woocommerce-product-gallery img {
  background: #fff;
}
.bek-book-cover img { aspect-ratio: 3 / 4; object-fit: cover; }
.bek-header-search .wp-block-search__input,
.bek-footer-search .wp-block-search__input,
.bek-search-filters input,
.bek-search-filters select,
button,
.wp-element-button,
.wp-block-button__link {
  min-height: 44px;
}
.wp-element-button,
.wp-block-button__link,
.bek-inline-action,
.bek-header-action {
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}
@media (hover:hover) and (pointer:fine) {
  .wp-element-button:hover,
  .wp-block-button__link:hover,
  .bek-inline-action:hover { transform: translateY(-1px); }
  .bek-book-card:hover { border-color: rgba(0,124,153,.26); box-shadow: 0 18px 48px rgba(13,27,58,.09); }
}
.bek-product-heading { text-wrap: balance; }
.bek-home-title,
.bek-section-head h2,
.bek-product-body h2 { text-wrap: balance; }
.bek-product-body p,
.bek-home-lead,
.bek-book-excerpt { text-wrap: pretty; }
@media (max-width: 620px) {
  .bek-home-hero { border-radius: 18px; }
  .bek-product-shell,
  .bek-product-body { width: min(100% - 24px, 1280px); }
  .bek-purchase-card { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .wp-element-button,
  .wp-block-button__link,
  .bek-inline-action,
  .bek-header-action,
  .bek-book-card { transform: none !important; }
}
