/* ── Product detail page ── */

.pd-page {
  padding: 32px 0 72px;
  background: var(--color-bg, #f5f4f0);
}

/* Back button */
.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted, #8a8784);
  text-decoration: none;
  margin-bottom: 20px;
  padding: 6px 14px 6px 10px;
  background: #fff;
  border: 1px solid var(--color-border, #e4e2db);
  border-radius: 99px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  width: fit-content;
}
.pd-back:hover {
  color: var(--color-primary, #1e3a5f);
  border-color: var(--color-primary, #1e3a5f);
  background: #eef2f7;
  text-decoration: none;
}
.pd-back svg { width: 14px; height: 14px; flex-shrink: 0; }
html[dir="rtl"] .pd-back { padding: 6px 10px 6px 14px; }
html[dir="rtl"] .pd-back svg { transform: scaleX(-1); }

/* Article card */
.pd-card {
  background: #fff;
  border: 1px solid var(--color-border, #e4e2db);
  border-radius: 16px;
  padding: 40px 44px 48px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
@media (max-width: 768px) {
  .pd-card { padding: 24px 20px 32px; border-radius: 12px; }
}

/* ── Article typography ── */
.blog-description {
  font-size: 16.5px;
  line-height: 1.82;
  color: #374151;
}
.blog-description h1 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-text, #2c2c2c);
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-border, #e4e2db);
}
.blog-description h2 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 700;
  color: var(--color-text, #2c2c2c);
  margin-top: 36px;
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 3px solid var(--color-accent, #3d7a6e);
  clear: both;
}
html[dir="rtl"] .blog-description h2 {
  padding-left: 0;
  padding-right: 12px;
  border-left: none;
  border-right: 3px solid var(--color-accent, #3d7a6e);
}
.blog-description h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text, #2c2c2c);
  margin-top: 24px;
  margin-bottom: 6px;
}
.blog-description p { margin-bottom: 14px; }
.blog-description ul,
.blog-description ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
html[dir="rtl"] .blog-description ul,
html[dir="rtl"] .blog-description ol {
  padding-left: 0;
  padding-right: 22px;
}
.blog-description li { margin-bottom: 5px; }
.blog-description hr {
  border: none;
  border-top: 1px solid var(--color-border, #e4e2db);
  margin: 28px 0;
}
.blog-description strong { color: var(--color-text, #2c2c2c); }

/* Main product image */
.blog-description .main-product-image {
  text-align: center;
  margin: 0 0 24px;
}
.blog-description .main-product-image img {
  max-width: 100%;
  border-radius: 10px;
}

/* Section body images — float right, text wraps left */
.blog-description img.product-body-image {
  float: right;
  clear: right;
  max-width: 240px;
  width: 38%;
  margin: 4px 0 16px 24px;
  border-radius: 8px;
  cursor: zoom-in;
}
html[dir="rtl"] .blog-description img.product-body-image {
  float: left;
  margin: 4px 24px 16px 0;
}
@media (max-width: 576px) {
  .blog-description img.product-body-image {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 14px;
  }
}

/* Amazon CTA inside content */
.blog-description a[href*="amazon."] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent, #3d7a6e);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none !important;
  margin: 6px 2px;
  border: none;
  transition: background 0.15s, transform 0.12s;
}
.blog-description a[href*="amazon."]:hover {
  background: var(--color-accent-dark, #2d6559);
  transform: translateY(-1px);
}

/* Sidebar wrapper */
.pd-sidebar-wrap {
  position: sticky;
  top: 24px;
}
@media (max-width: 991px) {
  .pd-sidebar-wrap { position: static; margin-top: 8px; }
}

/* ── Image lightbox ── */
#pd-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#pd-lightbox.open {
  display: flex;
}
#pd-lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  object-fit: contain;
  animation: lbFadeIn 0.18s ease;
}
@keyframes lbFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
#pd-lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#pd-lightbox-close:hover { background: rgba(255,255,255,0.28); }

body.lightbox-open .pd-card,
body.lightbox-open .pd-sidebar-wrap {
  filter: blur(3px);
  transition: filter 0.2s;
}

/* ── Sidebar ads ── */
.ads-sidebar {
  position: sticky;
  top: 24px;
}
.ads-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border, #e4e2db);
}
.ads-sidebar-header span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted, #8a8784);
  font-weight: 500;
}
.ads-sidebar-header::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--color-accent, #3d7a6e);
  border-radius: 2px;
  flex-shrink: 0;
}
.ad-card {
  background: var(--color-card, #ffffff);
  border: 1px solid var(--color-border, #e4e2db);
  border-radius: var(--radius, 12px);
  border-top: 2px solid var(--color-accent, #3d7a6e);
  padding: 16px;
  margin-bottom: 14px;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
  overflow: hidden;
}
.ad-card:hover {
  box-shadow: var(--shadow-lg, 0 10px 28px rgba(0,0,0,0.10));
  transform: translateY(-3px);
}
.ad-card > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none !important;
  color: var(--color-text, #2c2c2c);
  gap: 10px;
}
.ad-card > a img:first-child {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 6px;
  background: #f9fafb;
  padding: 4px;
  border: none !important;
  flex-shrink: 0;
}
.ad-card .ad-title-text {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--color-text, #2c2c2c);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-card > img[width="1"] {
  display: block;
  width: 1px;
  height: 1px;
  position: absolute;
  pointer-events: none;
}
.ad-disclosure {
  font-size: 9.5px;
  color: var(--color-muted, #8a8784);
  text-align: center;
  margin-top: 4px;
}
