/* Binaar product page. Scoped to pd-*; uses the project's local Bootstrap RTL + IRANSansX. */
.pd-page{padding-block:20px 10px;color:#1b2d24}
.pd-breadcrumb{display:flex;align-items:center;gap:9px;white-space:nowrap;overflow:hidden;min-width:0;color:#849188;font-size:11.5px;margin:4px 0 27px}
.pd-breadcrumb a{flex-shrink:0;color:#617568}.pd-breadcrumb a:hover{color:var(--accent)}.pd-breadcrumb .bi{font-size:9px;flex-shrink:0}.pd-breadcrumb [aria-current]{overflow:hidden;text-overflow:ellipsis}
.pd-hero{display:grid;direction:rtl;grid-template-columns:minmax(0,1.13fr) minmax(0,.91fr) minmax(275px,.78fr);grid-template-areas:'gallery intro buy';gap:26px;align-items:start;min-width:0}
.pd-gallery{grid-area:gallery;min-width:0}.pd-visual{min-height:500px;aspect-ratio: 1 / 1.095;position:relative;border:1px solid #e7eee7;border-radius:24px;overflow:hidden;background:radial-gradient(ellipse at 48% 42%,#fff 4%,#f4f8f3 67%,#eaf1eb 100%);display:flex;align-items:center;justify-content:center}
.pd-visual:after{content:'';position:absolute;bottom:20px;left:21%;right:21%;height:14px;background:rgba(22,47,31,.07);filter:blur(13px);border-radius:50%;pointer-events:none}
.pd-zoom-trigger{border:0;outline:0;background:transparent;width:100%;height:100%;padding:38px 32px 47px;display:grid;place-items:center;cursor:zoom-in;position:relative;z-index:1}
.pd-zoom-trigger img{object-fit:contain;object-position:center;max-height:420px;height:auto;max-width:100%;width:auto;filter:drop-shadow(-9px 19px 14px rgba(30,55,36,.17));transition:transform .3s ease;display:block}
@media(hover:hover){.pd-zoom-trigger:hover img{transform:scale(1.028)}.pd-zoom-trigger:hover .pd-zoom-hint{opacity:1;transform:translateY(0)}}
.pd-zoom-trigger:focus-visible{outline:3px solid #438d67;outline-offset:-5px;border-radius:22px}
.pd-zoom-hint{position:absolute;bottom:13px;left:15px;z-index:2;display:inline-flex;gap:7px;align-items:center;background:#fff;border:1px solid #e2eae2;border-radius:10px;padding:7px 10px;font-size:10.5px;color:#52695c;box-shadow:0 6px 19px rgba(0,0,0,.04);opacity:.85;transition:opacity .2s,transform .2s;transform:translateY(2px)}
.pd-cover-label{position:absolute;top:18px;right:18px;z-index:2;background:#f1e5ce;color:#80613d;border-radius:8px;padding:6px 11px;font-size:11px}
.pd-no-image{width:min(64%,245px);aspect-ratio: .7;border-radius:4px 12px 12px 4px;background:linear-gradient(145deg,#336a53,#194c38);box-shadow:11px 18px 24px rgba(38,65,46,.15);color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;font-size:24px}
.pd-no-image .bi{font-size:75px}
.pd-thumbs{display:flex;justify-content:flex-start;gap:11px;overflow-x:auto;padding:13px 1px 5px;scrollbar-width:thin}.pd-thumb{flex:0 0 76px;width:76px;height:88px;border:1.5px solid #e1e9e2;border-radius:12px;background:#f9fbf9;display:grid;place-items:center;padding:8px;transition:border-color .16s,background .16s}.pd-thumb img{max-height:70px;max-width:100%;object-fit:contain}.pd-thumb.is-active,.pd-thumb[aria-pressed=true]{border-color:#237b5b;background:#eef7f0}.pd-thumb:hover{border-color:#7fb39a}
.pd-intro{grid-area:intro;padding:17px 0 0;min-width:0}.pd-intro-labels{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:15px}.pd-eyebrow{color:#317c5d;font-size:11.5px;font-weight:500;display:inline-flex;gap:6px;align-items:center}.pd-state{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:7px;font-size:10.5px}.pd-state-presale{color:#92683b;background:#f9f0df}.pd-state-unavailable{color:#9e554c;background:#fff0ef}
.pd-intro h1{font-size:clamp(22px,2vw,31px);line-height:1.75;font-weight:700;letter-spacing:-.45px;margin:0 0 9px;color:#1e3327}.pd-subtitle{margin:0;color:#7e897e;font-size:13px;line-height:2}

.pd-more-link{display:inline-flex;gap:7px;align-items:center;color:#267354;font-size:11.5px;font-weight:500;margin-top:25px}.pd-more-link:hover{color:#124632}
.pd-buycard{grid-area:buy;position:sticky;top:96px;overflow:hidden;border:1px solid #e1e9e0;border-radius:19px;background:#fff;box-shadow:0 18px 36px rgba(29,66,45,.055)}.pd-buy-head{display:flex;justify-content:space-between;align-items:center;gap:7px;padding:15px 17px;border-bottom:1px solid #eff1ed;background:#fafbf9;font-size:11.5px;font-weight:500;color:#3d5a46}.pd-buy-head .bi{font-size:16px;margin-left:5px;color:#4c936b}.pd-stock{font-size:10.5px;color:#20794f}.pd-stock.is-off{color:#a65048}.pd-buy-main{padding:23px 21px 20px}.pd-price-caption{color:#819087;font-size:11.5px}.pd-compare-price{margin-top:9px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pd-compare-price del{font-size:12px;color:#9aa69e;text-decoration-thickness:1px}.pd-sale-pill{background:#fdefec;color:#ac5345;font-size:10.5px;border-radius:6px;padding:2px 8px}.pd-final-price{display:flex;gap:6px;align-items:baseline;color:#1a6148;white-space:nowrap;margin:4px 0 20px}.pd-final-price strong{font-weight:700;font-size:29px;letter-spacing:-.65px}.pd-final-price span{font-size:11px}
.pd-purchase-form{display:block}.pd-quantity-label{font-size:11.5px;color:#52675a;margin-bottom:9px}.pd-quantity{border:1px solid #e0e8df;border-radius:11px;display:grid;grid-template-columns:44px minmax(32px,1fr) 44px;align-items:center;height:46px;background:#fff;overflow:hidden;width:100%}.pd-quantity button{height:100%;display:grid;place-items:center;border:0;background:#f6f9f5;color:#246e4e;font-size:17px;transition:background .15s}.pd-quantity button:hover:not(:disabled){background:#e5f1e8}.pd-quantity button:disabled{opacity:.35;cursor:not-allowed}.pd-quantity button:focus-visible{outline:2px solid #237b5b;outline-offset:-3px}.pd-quantity input{width:100%;border:0;background:transparent;outline:none;text-align:center;color:#2c4a39;font-size:15px;font-weight:700;appearance:textfield;-moz-appearance:textfield;pointer-events:none}.pd-quantity input::-webkit-inner-spin-button,.pd-quantity input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.pd-cta{width:100%;min-height:49px;display:flex;align-items:center;justify-content:center;gap:10px;margin-top:14px;border:1px solid #1a654b;border-radius:11px;background:#1c674e;color:#fff;font-size:12.5px;font-weight:700;transition:background .16s,transform .16s;line-height:1.7;cursor:pointer}.pd-cta .bi{font-size:19px}.pd-cta:hover:not(:disabled){background:#124b37;color:#fff}.pd-cta:active:not(:disabled){transform:translateY(1px)}.pd-cta:disabled{background:#e8ece8;border-color:#e8ece8;color:#778579;cursor:not-allowed}.pd-buy-note{display:flex;gap:9px;align-items:flex-start;padding:16px 18px;background:#f8faf7;border-top:1px solid #eff2ec;font-size:10.5px;color:#657d6b}.pd-buy-note i{font-size:17px;color:#538768;line-height:1.2}
.pd-content-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.42fr);gap:40px;align-items:start;margin-top:62px;padding-top:37px;border-top:1px solid #e9eee8}.pd-content-primary{min-width:0}.pd-content-section{padding:0 0 32px;margin:0 0 32px;border-bottom:1px solid #edf0eb}.pd-content-section:last-child{border-bottom:0}.pd-section-label{display:flex;align-items:center;gap:12px;margin-bottom:19px}.pd-section-label>span{width:38px;height:38px;display:grid;place-items:center;flex-shrink:0;background:#edf5ef;border-radius:11px;color:#397e5f;font-weight:700;font-size:13px}.pd-section-label h2{font-size:19px;margin:0;line-height:1.7}.pd-richtext{color:#566559;font-size:13.2px;line-height:2.4;overflow-wrap:anywhere}.pd-richtext p:last-child{margin-bottom:0}
.pd-spec-card{border:1px solid #e4ebe3;border-radius:17px;padding:22px 21px;background:#fafcf9;position:sticky;top:100px}.pd-spec-title{display:flex;align-items:center;gap:10px;margin-bottom:15px}.pd-spec-title i{font-size:20px;color:#3d8565}.pd-spec-title h2{font-size:17px;margin:0}.pd-spec-list{margin:0}.pd-spec-list>div{display:flex;gap:12px;align-items:baseline;justify-content:space-between;padding:11px 0;border-bottom:1px solid #e9eee7}.pd-spec-list>div:last-child{border-bottom:0}.pd-spec-list dt{font-size:11.5px;white-space:nowrap;font-weight:400;color:#819085}.pd-spec-list dd{font-size:11.5px;text-align:left;margin:0;max-width:65%;overflow-wrap:anywhere;font-weight:500;color:#3f5346}
.pd-chapter-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:10px}.pd-chapter-list li{padding:12px 14px;display:flex;align-items:center;gap:13px;border:1px solid #e8ede7;background:#fff;border-radius:11px;font-size:12px;color:#506353}.pd-chapter-num{display:inline-flex;align-items:center;justify-content:center;background:#f0f5f0;color:#508366;width:30px;height:30px;flex:0 0 30px;border-radius:8px;font-size:11px;direction:ltr}.pd-topic-list,.pd-audience-list{display:flex;gap:9px;flex-wrap:wrap;padding:0;margin:0;list-style:none}.pd-topic-list li,.pd-audience-list li{padding:9px 13px;border:1px solid #e4ebe4;border-radius:9px;background:#f9fbf9;color:#54685a;font-size:12px}.pd-topic-list li .bi{color:#389667;margin-left:7px}
.pd-reviews{margin-top:39px;padding:44px 0 0;border-top:1px solid #e9eee8;scroll-margin-top:100px}.pd-reviews-heading{display:flex;align-items:end;justify-content:space-between;gap:10px;margin-bottom:23px}.pd-reviews-heading h2{font-size:24px;margin:4px 0}.pd-reviews-heading p{font-size:12px;color:#86958a;margin:0}.pd-reviews-count{font-size:11px;color:#76877a;background:#f4f7f3;padding:7px 12px;border-radius:8px;white-space:nowrap}.pd-review-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,.65fr);gap:23px;align-items:start}.pd-review-list{min-width:0}.pd-review{border:1px solid #e8eee7;border-radius:13px;padding:20px;margin-bottom:12px}.pd-review-person{display:flex;align-items:center;gap:10px}.pd-review-avatar{width:39px;height:39px;border-radius:50%;background:#edf5ef;color:#4f9370;display:grid;place-items:center}.pd-review-person h3{font-size:12.5px;margin:0}.pd-review-person time{font-size:10px;color:#90a094}.pd-review p{margin:13px 0 0;font-size:12.5px;color:#5e7062;line-height:2.3;overflow-wrap:anywhere}.pd-review-empty{padding:50px 16px;border:1px dashed #dce6db;background:#fafcf9;border-radius:14px;color:#778c7a;text-align:center}.pd-review-empty .bi{font-size:31px;display:block;margin-bottom:9px}.pd-review-empty p{font-size:12px;margin:0}.pd-review-form{border-radius:17px;background:#f5f8f4;border:1px solid #edf1eb;padding:23px}.pd-review-form h3{font-size:16px;margin-bottom:5px}.pd-review-form p{color:#839085;font-size:11.5px;margin-bottom:20px}.pd-review-form .form-label{font-size:11.5px}.pd-review-form .form-control{background:#fff;border-radius:10px;border-color:#e0e7df;font-size:12px;padding:10px 12px}.pd-review-form .form-control:focus{border-color:#72b795;box-shadow:0 0 0 .2rem rgba(53,120,80,.12)}.pd-review-form .btn{width:100%}
.pd-related{padding:55px 0 20px}.pd-related-heading{display:flex;justify-content:space-between;align-items:end;gap:15px;margin-bottom:23px}.pd-related-heading h2{font-size:23px;margin:4px 0 0}.pd-related-heading>a{font-size:12px;color:#267757;display:flex;gap:6px;align-items:center}
.pd-mobile-bar{display:none}.pd-notify{position:fixed;z-index:1200;bottom:20px;left:50%;transform:translateX(-50%);max-width:min(440px,calc(100vw - 24px));width:max-content;padding:12px 20px;border-radius:12px;background:#1c654b;color:white;font-size:12px;box-shadow:0 13px 42px #1b312c38;line-height:1.9;text-align:center}.pd-notify.is-error{background:#9e4136}.pd-notify[hidden]{display:none}
.pd-lightbox{max-width:min(92vw,850px);max-height:92dvh;padding:30px;border:0;border-radius:18px;box-shadow:0 20px 80px rgba(0,0,0,.2);background:#f8faf7;overflow:auto}.pd-lightbox::backdrop{background:rgba(19,35,27,.84)}.pd-lightbox img{max-height:calc(92dvh - 70px);width:auto;height:auto;object-fit:contain;display:block;margin:auto}.pd-lightbox-close{position:absolute;top:12px;left:12px;background:#fff;border:1px solid #e1e7df;border-radius:9px;width:38px;height:38px;display:grid;place-items:center;color:#3a5946}
@media(max-width:1160px){.pd-hero{gap:17px;grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr) minmax(240px,.83fr)}.pd-visual{min-height:440px}.pd-zoom-trigger img{max-height:370px}.pd-buy-main{padding:19px 15px}.pd-final-price strong{font-size:25px}}
@media(min-width:768px) and (max-width:990px){.pd-hero{grid-template-columns:minmax(0,1fr) minmax(0,.86fr);grid-template-areas:'gallery intro' 'gallery buy';gap:16px 24px}.pd-gallery{grid-row:span 2}.pd-visual{min-height:460px}.pd-buycard{position:static}.pd-intro{padding-top:6px}.pd-intro h1{font-size:25px}.pd-more-link{margin-top:12px}.pd-content-grid{gap:22px;grid-template-columns:minmax(0,1fr) minmax(240px,.48fr)}}
@media(max-width:767.98px){
 .pd-page{padding:8px 0 12px}.pd-breadcrumb{margin-bottom:15px;font-size:10.5px;gap:7px}
 .pd-hero{grid-template-columns:minmax(0,1fr);grid-template-areas:'intro' 'gallery';gap:17px}
 .pd-intro{padding:0}.pd-intro-labels{margin-bottom:7px}.pd-intro h1{font-size:21px;line-height:1.7;letter-spacing:0;margin-bottom:2px}.pd-subtitle{font-size:11.5px}
 .pd-more-link{display:none}
 .pd-gallery{width:100%;max-width:530px;margin:auto}.pd-visual{min-height:0;aspect-ratio:1.16 / 1;border-radius:17px}.pd-zoom-trigger{padding:16px 20px 22px}.pd-zoom-trigger img{max-height:310px;max-width:90%}.pd-zoom-hint{padding:6px 8px;bottom:8px;left:8px}.pd-zoom-hint span{display:none}.pd-thumb{width:63px;height:74px;flex-basis:63px}.pd-thumb img{max-height:57px}.pd-thumbs{padding-top:9px}
 .pd-buycard{display:none !important}.pd-content-grid{display:flex;flex-direction:column;gap:15px;margin-top:22px;padding-top:22px}.pd-content-primary,.pd-spec-card{width:100%}.pd-content-section{padding-bottom:22px;margin-bottom:20px}.pd-section-label{gap:9px;margin-bottom:12px}.pd-section-label>span{width:33px;height:33px;border-radius:9px}.pd-section-label h2{font-size:16px}.pd-richtext{font-size:12.5px}.pd-chapter-list{grid-template-columns:1fr}.pd-chapter-list li{padding:10px 12px}.pd-spec-card{position:static;padding:18px}.pd-spec-title h2{font-size:16px}.pd-spec-list>div{padding:9px 0}
 .pd-reviews{margin-top:12px;padding-top:24px}.pd-reviews-heading{align-items:center;margin-bottom:15px}.pd-reviews-heading h2{font-size:18px}.pd-reviews-count{font-size:10px}.pd-review-grid{grid-template-columns:1fr;gap:16px}.pd-review-form{padding:19px}.pd-review{padding:15px}.pd-related{padding-top:38px}.pd-related-heading h2{font-size:18px}
 .site-footer{margin-top:18px;padding-bottom:calc(140px + env(safe-area-inset-bottom,0px))}
 .pd-mobile-bar{display:block;position:fixed;bottom:0;right:0;left:0;z-index:1030;background:rgba(255,255,255,.98);border-top:1px solid #dee9df;box-shadow:0 -11px 32px rgba(24,52,34,.09);padding:11px 14px calc(12px + env(safe-area-inset-bottom,0px));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
 .pd-mobile-bar-inner{max-width:570px;margin:0 auto}.pd-mobile-buy-top{display:flex;gap:12px;align-items:center;justify-content:space-between;min-height:43px;margin-bottom:8px}.pd-mobile-price{display:flex;flex-direction:column;gap:0;min-width:0;line-height:1.5}.pd-mobile-price-caption{color:#849186;font-size:9.5px}.pd-mobile-price del{color:#a4aaa2;font-size:10px}.pd-mobile-price-value{color:#17634a;font-size:10.5px;white-space:nowrap}.pd-mobile-price-value strong{font-size:21px;letter-spacing:-.45px}.pd-mobile-form{width:128px;flex:0 0 128px}.pd-mobile-form .pd-quantity{height:41px;grid-template-columns:39px minmax(25px,1fr) 39px}.pd-mobile-form .pd-quantity button{font-size:15px}.pd-mobile-form .pd-quantity input{font-size:14px}
 .pd-mobile-cta{margin:0;min-height:43px;border-radius:11px;font-size:12px}.pd-mobile-cta .bi{font-size:17px}
 .pd-notify{bottom:calc(142px + env(safe-area-inset-bottom,0px));font-size:11px}
 .pd-lightbox{padding:32px 12px 20px;max-width:96vw}.pd-lightbox img{max-width:100%}
}
@media(max-width:360px){.pd-mobile-price-value strong{font-size:18px}.pd-mobile-form{width:115px;flex-basis:115px}.pd-mobile-form .pd-quantity{grid-template-columns:35px minmax(20px,1fr) 35px}.pd-intro h1{font-size:19px}}
@media(prefers-reduced-motion:reduce){.pd-zoom-trigger img,.pd-cta,.pd-thumb{transition:none}}

/* Stage 14 — a single, readable author line under the book title. */
.pd-author-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 7px;margin:12px 0 0;font-size:12.5px;line-height:1.95;color:#526458}
.pd-author-line>.bi{font-size:15px;align-self:center;color:#688a75}
.pd-author-label{color:#7d8b81;white-space:nowrap}
.pd-author-name{font-weight:500;color:#314b3b;overflow-wrap:anywhere}
@media(max-width:767.98px){.pd-author-line{font-size:11.5px;margin-top:7px;gap:3px 6px}}


/* Stage 19 — desktop book page: reading column on the RIGHT, sticky buying column on the LEFT.
   All original mobile buying controls and API hooks are deliberately preserved. */
@media (min-width: 768px) {
  .pd-page {padding-block:16px 28px;}
  .pd-breadcrumb {margin-bottom:22px;}
  .pd-layout {
    display:grid;
    direction:rtl;
    grid-template-columns:minmax(0,1fr) clamp(305px,32%,385px);
    grid-template-rows:auto auto auto auto;
    column-gap:clamp(24px,3.4vw,54px);
    row-gap:0;
    align-items:start;
    min-width:0;
  }
  .pd-intro {grid-column:1;grid-row:1;padding:4px 0 25px;min-width:0;border-bottom:1px solid #e7eee7;}
  .pd-intro h1 {font-size:clamp(25px,2.5vw,34px);line-height:1.72;margin:0 0 8px;}
  .pd-author-line {font-size:13px;margin:15px 0 0;}
  .pd-sticky-column {grid-column:2;grid-row:1 / span 4;align-self:start;position:sticky;top:92px;z-index:2;min-width:0;}
  .pd-sidebar-inner {display:flex;flex-direction:column;gap:12px;}
  .pd-gallery {width:100%;min-width:0;}
  .pd-visual {min-height:0;aspect-ratio:1.25 / 1;max-height:355px;border-radius:15px;background:#f8faf7;}
  .pd-zoom-trigger {padding:19px 25px 27px;}
  .pd-zoom-trigger img {max-height:min(303px,38vh);max-width:90%;filter:drop-shadow(-6px 12px 9px rgba(30,55,36,.12));}
  .pd-zoom-hint {opacity:0;bottom:9px;left:10px;}
  .pd-thumbs {justify-content:center;gap:8px;padding:9px 0 0;}
  .pd-thumb {height:66px;width:56px;flex-basis:56px;padding:5px;border-radius:9px;}
  .pd-thumb img {max-height:54px;}
  .pd-buycard {position:static;overflow:visible;border-radius:15px;box-shadow:0 6px 20px rgba(25,56,37,.035);}
  .pd-buy-main {padding:19px 20px 20px;}
  .pd-compare-price {margin-top:0;gap:9px;}
  .pd-compare-price del {font-size:12px;}
  .pd-final-price {margin:7px 0 18px;color:#1e614b;}
  .pd-final-price strong {font-size:27px;}
  .pd-purchase-form {display:grid;grid-template-columns:102px minmax(0,1fr);align-items:center;gap:10px;}
  .pd-quantity-label {display:none;}
  .pd-purchase-form .pd-quantity {width:102px;height:46px;grid-template-columns:33px minmax(25px,1fr) 33px;}
  .pd-purchase-form .pd-quantity button {font-size:13px;}
  .pd-purchase-form .pd-quantity input {font-size:13px;}
  .pd-purchase-form .pd-cta {margin:0;min-height:46px;font-size:11.5px;gap:7px;white-space:normal;padding:5px 8px;}
  .pd-purchase-form .pd-cta .bi {font-size:16px;flex-shrink:0;}
  .pd-buycard>.pd-cta {margin-top:0;}
  .pd-content-grid {grid-column:1;grid-row:2;display:flex;flex-direction:column;gap:0;margin:0;padding:30px 0 0;border:0;min-width:0;}
  .pd-content-primary {min-width:0;width:100%;}
  .pd-content-section {padding-bottom:25px;margin-bottom:26px;}
  .pd-section-label {margin-bottom:14px;}
  .pd-section-label>span {width:32px;height:32px;border-radius:8px;font-size:12px;}
  .pd-section-label h2 {font-size:18px;}
  .pd-richtext {font-size:13.5px;line-height:2.35;}
  .pd-spec-card {position:static;background:#fff;border:0;border-radius:0;border-top:1px solid #e7eee7;padding:25px 0 0;margin-top:4px;box-shadow:none;}
  .pd-spec-title {margin-bottom:14px;}
  .pd-spec-title h2 {font-size:18px;}
  .pd-spec-list {display:grid;grid-template-columns:1fr 1fr;column-gap:24px;}
  .pd-spec-list>div {padding:11px 0;gap:10px;min-width:0;}
  .pd-spec-list dd {max-width:70%;font-size:11.5px;}
  .pd-reviews {grid-column:1;grid-row:3;padding-top:28px;margin-top:30px;min-width:0;}
  .pd-reviews-heading h2 {font-size:21px;}
  .pd-review-grid {grid-template-columns:1fr;gap:14px;}
  .pd-review-form {max-width:100%;}
  .pd-related {grid-column:1;grid-row:4;min-width:0;}
}
@media (min-width:768px) and (max-width:1023.98px) {
  .pd-layout {grid-template-columns:minmax(0,1fr) minmax(265px,36%);column-gap:21px;}
  .pd-sticky-column {top:77px;}
  .pd-visual {aspect-ratio:1.11 / 1;}
  .pd-zoom-trigger {padding:16px;}
  .pd-zoom-trigger img {max-height:min(280px,35vh);}
  .pd-buy-main {padding:16px 13px;}
  .pd-purchase-form {grid-template-columns:1fr;gap:8px;}
  .pd-purchase-form .pd-quantity {width:100%;}
  .pd-spec-list {grid-template-columns:1fr;}
  .pd-chapter-list {grid-template-columns:1fr;}
}
@media (min-width:768px) and (max-height:710px) {
  .pd-sticky-column {top:68px;}
  .pd-visual {max-height:230px;}
  .pd-zoom-trigger img {max-height:198px;}
  .pd-buy-main {padding-block:12px;}
  .pd-final-price {margin-bottom:9px;}
}
@media (max-width:767.98px) {
  .pd-layout {display:flex;flex-direction:column;gap:0;min-width:0;}
  .pd-intro {order:0;}
  .pd-sticky-column {order:1;position:static;width:100%;max-width:530px;margin:0 auto;}
  .pd-sidebar-inner {display:block;}
  .pd-content-grid {order:2;}
  .pd-reviews {order:3;}
  .pd-related {order:4;}
}

/* Stage 20: on product pages the mobile purchase bar always stays visible.
   Reserved space is AFTER the footer, so the entire footer scrolls above it. */
.pd-footer-spacer { display: none; }
@media (max-width: 767.98px) {
  .pd-footer-spacer {
    display: block;
    height: calc(120px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    pointer-events: none;
  }
  /* Override any stale footer-visibility class from cached older scripts. */
  .pd-mobile-bar.pd-bar-hidden-by-footer {
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
  }
}


/* Stage 21 — two-column desktop, sticky introduction above cover and buying controls. */
@media (min-width: 768px) {
  .pd-layout {
    grid-template-rows: auto auto auto;
  }
  .pd-sticky-column {
    grid-column: 2;
    grid-row: 1 / 4;
  }
  .pd-content-grid {
    grid-column: 1;
    grid-row: 1;
    padding-top: 0;
    margin-top: 0;
  }
  .pd-reviews {grid-column: 1; grid-row: 2;}
  .pd-related {grid-column: 1; grid-row: 3;}

  .pd-sidebar-inner {gap: 10px;}
  .pd-sidebar-inner .pd-intro {
    grid-column: auto;
    grid-row: auto;
    padding: 0 2px 10px;
    margin: 0;
    border-bottom: 0;
  }
  .pd-sidebar-inner .pd-intro h1 {
    font-size: clamp(19px, 1.8vw, 25px);
    line-height: 1.65;
    letter-spacing: -.15px;
    margin-bottom: 5px;
  }
  .pd-sidebar-inner .pd-subtitle {
    font-size: 12px;
    line-height: 1.9;
    color: #6e8174;
  }
  .pd-sidebar-inner .pd-author-line {
    font-size: 12px;
    line-height: 1.9;
    margin: 8px 0 0;
  }
  .pd-sidebar-inner .pd-intro-labels {margin-bottom: 8px;}
  .pd-sidebar-inner .pd-gallery {margin-top: 2px;}

  /* Book specifications: one polished, accessible full-width row per field. */
  .pd-spec-card {
    width: 100%;
    min-width: 0;
    align-self: stretch;
    position: static;
    border: none;
    border-top: 1px solid #e7eee7;
    border-radius: 0;
    padding: 26px 0 0;
    margin-top: 5px;
    background: transparent;
    box-shadow: none;
  }
  .pd-spec-title {margin-bottom: 16px;}
  .pd-spec-title h2 {font-size: 18px;}
  .pd-spec-list {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
    margin: 0;
  }
  .pd-spec-list > div,
  .pd-spec-list > div:last-child {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    min-width: 0;
    min-height: 48px;
    padding: 10px 16px;
    border: 1px solid #e6ede6;
    border-radius: 12px;
    background: #f9fbf9;
    box-shadow: 0 2px 7px rgba(20, 52, 33, .018);
  }
  .pd-spec-list dt {
    flex: 0 0 auto;
    min-width: 105px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.8;
    color: #748679;
  }
  .pd-spec-list dd {
    max-width: none;
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    text-align: left;
    overflow-wrap: anywhere;
    font-size: 12.5px;
    line-height: 1.8;
    font-weight: 600;
    color: #294935;
  }
  .pd-spec-list dd[dir="ltr"] {unicode-bidi: isolate;}
}
/* Mobile: existing title → image → details flow and fixed buy bar are kept. */
@media (max-width: 767.98px) {
  .pd-sidebar-inner .pd-intro {margin-bottom: 16px;}
}
/* Short desktop viewports: keep the title, cover and buy controls usable. */
@media (min-width: 768px) and (max-height: 750px) {
  .pd-sticky-column {top: 72px;}
  .pd-sidebar-inner {gap: 7px;}
  .pd-sidebar-inner .pd-intro h1 {font-size: clamp(18px,1.7vw,22px);line-height: 1.5;}
  .pd-sidebar-inner .pd-subtitle, .pd-sidebar-inner .pd-author-line {line-height: 1.6;}
  .pd-visual {max-height: 210px;}
  .pd-zoom-trigger img {max-height: 180px;}
  .pd-buy-main {padding: 12px 16px;}
  .pd-final-price {margin-bottom: 10px;}
}


/* Stage 22 — cover holder only: clean background, natural ratio, no cropping.
   The original image file is not altered. Keep the zoom button and gallery hooks. */
.pd-page .pd-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.pd-page .pd-visual::after { content: none; display: none; }
.pd-page .pd-zoom-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  margin: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.pd-page .pd-zoom-trigger img {
  display: block;
  flex: 0 1 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 3px;
  filter: drop-shadow(0 7px 9px rgba(15, 35, 25, .09));
}
.pd-page .pd-zoom-hint { bottom: 8px; left: 7px; }
@media (min-width: 768px) {
  .pd-page .pd-gallery { padding: 3px 0; }
  .pd-page .pd-zoom-trigger img { max-height: min(375px, 43vh); }
}
@media (min-width: 768px) and (max-height: 750px) {
  .pd-page .pd-zoom-trigger img { max-height: min(265px, 35vh); }
}
@media (min-width: 768px) and (max-height: 600px) {
  .pd-page .pd-zoom-trigger img { max-height: min(200px, 29vh); }
}
@media (max-width: 767.98px) {
  .pd-page .pd-gallery { padding: 0; }
  .pd-page .pd-zoom-trigger img {
    max-width: 100%;
    max-height: min(420px, 53svh);
    filter: drop-shadow(0 6px 9px rgba(15, 35, 25, .08));
  }
}


/* Stage 24: compact desktop sticky panel and short description in reading column. */
.pd-short-description {
  color:#53695a; font-size:13px; line-height:2.15; margin:0 0 20px;
  padding:13px 17px; border-right:3px solid #4c9271;
  background:#f7faf7; border-radius:10px; overflow-wrap:anywhere;
}
@media (min-width:768px) {
  .pd-sidebar-inner { gap:7px; }
  .pd-sidebar-inner .pd-intro { padding:0 2px 5px; }
  .pd-sidebar-inner .pd-intro h1 {font-size:clamp(18px,1.5vw,22px);line-height:1.55;margin:0 0 3px;}
  .pd-sidebar-inner .pd-author-line {font-size:11px;line-height:1.55;margin:4px 0 0;}
  .pd-sidebar-inner .pd-intro-labels {margin-bottom:5px;}
  .pd-sidebar-inner .pd-gallery {margin-top:0;padding-top:0;padding-bottom:0;}
  .pd-thumbs {gap:6px;padding-top:6px;}
  .pd-buy-main {padding:12px 15px 13px;}
  .pd-final-price {margin:3px 0 10px;}
  .pd-final-price strong {font-size:24px;}
  .pd-purchase-form {gap:7px;}
  .pd-purchase-form .pd-quantity {height:40px;}
  .pd-purchase-form .pd-cta {min-height:40px;font-size:11px;padding:4px 7px;}
  .pd-short-description {font-size:13px;margin-bottom:24px;}
}
@media (max-width:767.98px) {
  .pd-short-description {font-size:12px;padding:11px 13px;margin-bottom:20px;}
}

/* Stage 24: secondary gallery photos use the MAIN image's aspect ratio.
   No image files are edited. Main cover remains uncropped; secondary photos
   are centered/cropped only inside the consistent display frame. */
.pd-page .pd-visual {
  --pd-frame-limit:min(290px, 35vh);
  display:flex; align-items:center; justify-content:center;
  overflow:visible;
}
.pd-page .pd-zoom-trigger {
  --pd-primary-ratio:.742857;
  width:min(100%, calc(var(--pd-frame-limit) * var(--pd-primary-ratio)));
  max-width:100%;
  height:auto;
  aspect-ratio:var(--pd-primary-ratio);
  min-height:0; max-height:none;
  overflow:hidden;
  border-radius:3px;
  flex:0 1 auto;
}
.pd-page .pd-zoom-trigger img {
  width:100%; height:100%; max-width:100%; max-height:none;
  aspect-ratio:inherit; object-fit:contain; object-position:center;
  filter:drop-shadow(0 5px 8px rgba(15,35,25,.09));
}
.pd-page .pd-zoom-trigger.is-secondary-image img {
  object-fit:cover; object-position:center; filter:none;
}
.pd-page .pd-zoom-trigger .pd-zoom-hint {z-index:2;}
.pd-page .pd-thumbs {--pd-primary-ratio:.742857;}
.pd-page .pd-thumb {height:auto;aspect-ratio:var(--pd-primary-ratio);overflow:hidden;}
.pd-page .pd-thumb img {
  display:block; width:100%; height:100%;max-width:100%;max-height:none;
  object-fit:cover;object-position:center;
}
.pd-page .pd-thumb.is-primary-thumb img {object-fit:contain;}
@media (min-width:768px) and (max-height:750px) {
  .pd-page .pd-visual {--pd-frame-limit:min(220px,32vh);}
}
@media (min-width:768px) and (max-height:600px) {
  .pd-page .pd-visual {--pd-frame-limit:min(175px,28vh);}
}
@media (max-width:767.98px) {
  .pd-page .pd-visual {--pd-frame-limit:min(340px,48svh);}
  .pd-page .pd-zoom-trigger {max-width:100%;}
  .pd-page .pd-zoom-trigger img {max-height:none;}
}


/* Stage 37 — One-line desktop price group: final, compare-at, discount. */
@media (min-width: 768px) {
  .pd-page .pd-buy-main .pd-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(5px, .75vw, 11px);
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
    margin: 0 0 13px;
    direction: rtl;
  }
  .pd-page .pd-buy-main .pd-price-row .pd-final-price {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    color: #176448;
    white-space: nowrap;
  }
  .pd-page .pd-buy-main .pd-price-row .pd-final-price strong {
    font-size: clamp(16px, 1.65vw, 24px);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: -0.45px;
    font-variant-numeric: tabular-nums;
  }
  .pd-page .pd-buy-main .pd-price-row .pd-final-price span {
    font-size: 10px;
    color: #5a7865;
    flex-shrink: 0;
  }
  .pd-page .pd-buy-main .pd-price-original {
    color: #9aa69e;
    font-size: clamp(10px, .8vw, 12px);
    white-space: nowrap;
    text-decoration-thickness: 1px;
    font-variant-numeric: tabular-nums;
    flex: 0 1 auto;
  }
  .pd-page .pd-buy-main .pd-price-row .pd-sale-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 7px;
    padding: 3px 6px;
    background: #fcefeb;
    color: #af4b3f;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .pd-page .pd-buy-main .pd-price-row { gap: 5px; margin-bottom: 11px; }
  .pd-page .pd-buy-main .pd-price-row .pd-final-price strong { font-size: 17px; }
  .pd-page .pd-buy-main .pd-price-original { font-size: 10px; }
  .pd-page .pd-buy-main .pd-price-row .pd-sale-pill { font-size: 9px; padding: 2px 4px; }
}


/* Stage 39 — mobile sticky buy bar: final price and strikethrough price side-by-side.
   No price caption and no extra discount description. */
@media (max-width: 767.98px) {
  .pd-mobile-buy-top { gap: 8px; }
  .pd-mobile-price {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    direction: rtl;
    white-space: nowrap;
  }
  .pd-mobile-price-value {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .pd-mobile-price-value strong {font-size: clamp(17px, 4.5vw, 21px);}
  .pd-mobile-price-value > span {font-size: 10px;}
  .pd-mobile-price-original {
    flex: 0 1 auto;
    color: #a4aaa2;
    font-size: 10px;
    text-decoration-thickness: 1px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
}
@media (max-width: 375px) {
  .pd-mobile-price {gap: 4px;}
  .pd-mobile-price-value {gap: 2px;}
  .pd-mobile-price-value strong {font-size: 16px;}
  .pd-mobile-price-value > span {font-size: 9px;}
  .pd-mobile-price-original {font-size: 9px;}
}
