/* Product page — Digikala-style layout. Scoped to body.woocommerce single-product pages via .ps-product-page wrapper. */

.ps-product-page { background: #fff; }
.ps-product-page .sectionwrap { max-width: 1200px; margin: 0 auto; padding: 24px 28px 72px; }

/* Breadcrumb strip */
.ps-pd-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: #8a95a1;
  margin-bottom: 18px;
}
.ps-pd-crumbs a { color: #8a95a1; text-decoration: none; }
.ps-pd-crumbs a:hover { color: var(--ps-accent, #437AA8); }
.ps-pd-crumbs .sep { opacity: .6; }
.ps-pd-crumbs .cur { color: var(--ps-ink, #1F2937); font-weight: 600; }

/* Main two-column: gallery | buy box */
.ps-pd-main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 24px; align-items: start; }

/* Gallery: vertical thumbs + stage (Digikala style) */
.ps-pd-gallery-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  position: sticky;
  top: 90px;
}
.ps-pd-thumbs-v {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
}
.ps-pd-thumbs-v button {
  width: 54px;
  height: 54px;
  padding: 3px;
  background: #fff;
  border: 1.5px solid var(--ps-line, #e2e7ec);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .18s ease, opacity .18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ps-accent, #437AA8);
}
.ps-pd-thumbs-v button img { width: 100%; height: 100%; object-fit: contain; border: 0; border-radius: 7px; }
.ps-pd-thumbs-v button:hover, .ps-pd-thumbs-v button.is-active { border-color: var(--ps-accent, #437AA8); }
.ps-pd-thumbs-v button.ps-thumb-video { font-size: 18px; background: var(--ps-surface, #F6F8FA); }

.ps-pd-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ps-line, #eef1f4);
  background: #fff;
}
.ps-pd-stage [hidden] { display: none !important; }
.ps-pd-stage img, .ps-pd-stage video {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  transition: transform .35s ease;
  cursor: zoom-in;
}
.ps-pd-stage img:hover { transform: scale(1.45); }
.ps-pd-zoom-hint {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--ps-line, #e2e7ec);
  color: var(--ps-accent, #437AA8);
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease;
}
.ps-pd-zoom-hint:hover { background: #fff; }

/* Lightbox */
.ps-pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 32, .92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-pd-lightbox[hidden] { display: none; }
.ps-pd-lightbox .ps-lb-img {
  display: block;
  width: auto;
  height: 86vh;
  max-width: 88vw;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.ps-pd-lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  transition: background .18s ease;
}
.ps-pd-lightbox button:hover { background: rgba(255, 255, 255, .25); }
.ps-pd-lightbox .ps-lb-close { top: 18px; right: 18px; }
.ps-pd-lightbox .ps-lb-prev { right: 18px; top: 50%; transform: translateY(-50%); }
.ps-pd-lightbox .ps-lb-next { left: 18px; top: 50%; transform: translateY(-50%); }

/* Buy box (center) */
.ps-pd-buy {
  background: #fff;
  border: 1px solid var(--ps-line, #eef1f4);
  border-radius: 14px;
  padding: 20px;
}
.ps-pd-buy h1.ps-pd-title { font-size: 1.15rem; line-height: 1.6; margin: 0 0 6px; color: var(--ps-ink, #1F2937); }
.ps-pd-buy .ps-pd-sku { font-size: 11.5px; color: #8a95a1; margin: 0 0 14px; }

/* Option pills (replaces selects) */
.ps-pd-opt { margin-bottom: 16px; }
.ps-pd-opt > .ps-pd-opt-label { font-size: 12px; font-weight: 700; color: #7c8794; margin-bottom: 8px; display: block; }
.ps-pd-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-pd-pills label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #4a5560;
  background: var(--ps-surface, #F6F8FA);
  border: 1.5px solid var(--ps-line, #e2e7ec);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.ps-pd-pills label:hover { border-color: var(--ps-accent, #437AA8); }
.ps-pd-pills input { position: absolute; opacity: 0; pointer-events: none; }
.ps-pd-pills input:checked + span,
.ps-pd-pills label.is-checked {
  border-color: var(--ps-accent, #437AA8);
  color: var(--ps-accent, #437AA8);
  background: rgba(67, 122, 168, .07);
}
.ps-pd-pills .ps-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.ps-pd-pills .ps-dot--red { background: #d64541; }
.ps-pd-pills .ps-dot--yellow { background: #f2c13a; }
.ps-pd-pills .ps-dot--blue { background: #3b7dc0; }
.ps-pd-pills .ps-dot--green { background: #3aa860; }

/* Hidden native selects stay in DOM for Woo JS */
.ps-pd-buy .variations { display: none; }
.ps-pd-buy .variations_form.cart { margin: 0; }

/* Price + stock + CTA */
.ps-pd-pricebox {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--ps-line, #eef1f4);
  padding-top: 14px;
  margin-top: 6px;
}
.ps-pd-pricebox .ps-pd-price { font-size: 1.15rem; font-weight: 800; color: var(--ps-ink, #1F2937); }
.ps-pd-pricebox .ps-pd-price .woocommerce-Price-currencySymbol { font-size: .75em; font-weight: 600; color: #7c8794; margin-right: 4px; }
.ps-pd-pricebox .ps-pd-stock { font-size: 11.5px; color: #3aa860; font-weight: 700; }
.ps-pd-pricebox .ps-pd-stock.is-out { color: #c0392b; }
.ps-pd-cta { margin-top: 14px; }
.ps-pd-cta button.button, .ps-pd-cta .single_add_to_cart_button {
  width: 100%;
  background: var(--ps-accent, #437AA8);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 13px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: filter .18s ease, transform .18s ease;
}
.ps-pd-cta button.button:hover { filter: brightness(1.07); transform: translateY(-1px); }
.ps-pd-cta button.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.ps-pd-cta .ps-pd-note { font-size: 11px; color: #8a95a1; text-align: center; margin: 8px 0 0; }

/* Trust side column (right in LTR, left visually in RTL via order) */
.ps-pd-side { display: grid; gap: 10px; }
.ps-pd-side .ps-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--ps-surface, #F6F8FA);
  border: 1px solid var(--ps-line, #eef1f4);
  border-radius: 10px;
  font-size: 12.5px;
  color: #4a5560;
  font-weight: 600;
}
.ps-pd-side .ps-trust svg { color: var(--ps-accent, #437AA8); flex: none; }

/* Short description strip */
.ps-pd-desc {
  margin-top: 26px;
  background: var(--ps-surface, #F6F8FA);
  border: 1px solid var(--ps-line, #eef1f4);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 13.5px;
  color: #4a5560;
  line-height: 2;
}
.ps-pd-desc h2 { font-size: 1rem; margin: 0 0 8px; color: var(--ps-ink, #1F2937); }

/* Attributes table (excel-like) */
.ps-pd-attrs { margin-top: 14px; }
.ps-pd-attrs table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ps-pd-attrs th, .ps-pd-attrs td {
  border: 1px solid var(--ps-line, #eef1f4);
  padding: 9px 12px;
  text-align: right;
}
.ps-pd-attrs th { background: var(--ps-surface, #F6F8FA); color: #7c8794; font-weight: 700; width: 140px; }

/* Mobile sticky buy bar */
.ps-pd-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: #fff;
  border-top: 1px solid var(--ps-line, #e2e7ec);
  box-shadow: 0 -8px 24px -16px rgba(20, 45, 70, .35);
  padding: 10px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ps-pd-bar .ps-pd-bar-price { display: grid; line-height: 1.4; }
.ps-pd-bar .ps-pd-bar-price .ps-pd-price { font-size: .95rem; }
.ps-pd-bar .ps-pd-bar-price small { font-size: 10px; color: #8a95a1; }
.ps-pd-bar button.button, .ps-pd-bar .single_add_to_cart_button {
  background: var(--ps-accent, #437AA8);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 10px 26px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.ps-pd-bar button.button:disabled { opacity: .55; }

/* ---------- Mobile / responsive ---------- */
@media (max-width: 1000px) {
  .ps-pd-main { grid-template-columns: 1fr 1fr; }
  .ps-pd-side { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .ps-product-page .sectionwrap { padding: 16px 16px 90px; }
  .ps-pd-main { grid-template-columns: 1fr; gap: 16px; }
  .ps-pd-gallery { position: static; }
  .ps-pd-side { grid-template-columns: 1fr 1fr; }
  .ps-pd-bar { display: flex; }
  body.woocommerce.single-product { padding-bottom: 0; }
  .ps-pd-buy h1.ps-pd-title { font-size: 1.02rem; }
}
@media (max-width: 480px) {
  .ps-pd-side { grid-template-columns: 1fr; }
  .ps-pd-thumbs button { width: 48px; height: 48px; }
}