/* Product detail page. Scoped under .pd-page so Molla/Bootstrap rules stay intact. */
.pd-page {
  width: 100%;
  color: #1f2430;
  text-align: right;
  font-family: "dana", "iransans", Tahoma, sans-serif;
  font-size: 14px;
  line-height: 1.8;
  padding-bottom: 28px;
}

.pd-page *,
.pd-page *::before,
.pd-page *::after { box-sizing: border-box; }

.pd-page h1,
.pd-page h2,
.pd-page h3,
.pd-page p { margin: 0; font-family: inherit; letter-spacing: 0; color: inherit; }

.pd-page a { color: inherit; text-decoration: none; }
.pd-page button,
.pd-page input { font-family: inherit; }

.pd-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.pd-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 18px 0 8px;
  font-size: 13px;
  color: #6b7280;
}
.pd-crumb a { color: #6b7280; }
.pd-crumb a:hover { color: #2563eb; }
.pd-crumb .pd-sep { color: #c0c4cc; font-size: 11px; }
.pd-crumb .pd-current { color: #0f172a; font-weight: 700; }

.pd-hero {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr;
  gap: 28px;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
  margin: 8px 0 22px;
}

.pd-gallery { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pd-main {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 1px solid #e6e8ee;
  background: linear-gradient(135deg, #f8fafc, #eef0f4);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.pd-main img { width: 100%; height: 100%; object-fit: contain; }
.pd-main.is-missing img { opacity: 0; }
.pd-main.is-missing::after {
  content: "تصویر محصول";
  position: absolute;
  color: #a0a0b0;
  font-size: 13px;
  font-weight: 700;
}
.pd-sale,
.pd-zoom {
  position: absolute;
  z-index: 2;
  border: 0;
  border-radius: 99px;
  font-weight: 800;
}
.pd-sale {
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
}
.pd-zoom {
  bottom: 14px;
  left: 14px;
  background: rgba(15, 23, 42, .75);
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
}

.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
}
.pd-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1.5px solid #e6e8ee;
  background: #f8fafc;
  padding: 4px;
  cursor: pointer;
  overflow: hidden;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumb.is-active,
.pd-thumb:hover { border-color: #2563eb; box-shadow: 0 4px 14px rgba(37, 99, 235, .15); }
.pd-thumb.is-missing img { opacity: 0; }

.pd-info { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pd-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}
.pd-badge.is-green { background: rgba(16, 185, 129, .12); color: #059669; border: 1px solid rgba(16, 185, 129, .25); }
.pd-badge.is-red { background: rgba(239, 68, 68, .1); color: #dc2626; border: 1px solid rgba(239, 68, 68, .25); }
.pd-badge.is-blue { background: rgba(37, 99, 235, .1); color: #2563eb; border: 1px solid rgba(37, 99, 235, .2); }
.pd-badge.is-gold { background: rgba(245, 158, 11, .12); color: #b45309; border: 1px solid rgba(245, 158, 11, .3); }

.pd-info h1 { font-size: 24px; font-weight: 800; line-height: 1.55; color: #0f172a; }
.pd-short { font-size: 14px; color: #4b5563; line-height: 2; white-space: pre-line; }
.pd-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #6b7280;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e6e8ee;
}
.pd-meta strong { color: #0f172a; }

.pd-price {
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  border: 1px solid #e6e8ee;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pd-old { font-size: 15px; color: #a0a0b0; text-decoration: line-through; }
.pd-now { font-size: 28px; font-weight: 800; color: #0f172a; line-height: 1.3; }
.pd-now small { font-size: 13px; font-weight: 500; color: #6b7280; }
.pd-off {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 99px;
}
.pd-save { font-size: 13px; color: #059669; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pd-out { font-size: 18px; font-weight: 800; color: #dc2626; }

.pd-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-spec {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 10px;
  font-size: 13px;
}
.pd-spec .k { color: #6b7280; }
.pd-spec .v { color: #0f172a; font-weight: 700; margin-right: auto; }

.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pd-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.pd-qty button {
  width: 40px;
  height: 46px;
  border: 0;
  background: #f8fafc;
  cursor: pointer;
  font-size: 18px;
  color: #0f172a;
}
.pd-qty input {
  width: 52px;
  height: 46px;
  border: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  background: #fff;
}
.pd-add,
.pd-wa {
  flex: 1;
  min-width: 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
}
.pd-add { background: linear-gradient(135deg, #2563eb, #1d4ed8); box-shadow: 0 8px 22px rgba(37, 99, 235, .3); }
.pd-wa { background: linear-gradient(135deg, #25d366, #128c4a); box-shadow: 0 8px 22px rgba(37, 211, 102, .28); }
.pd-add:hover,
.pd-wa:hover { transform: translateY(-2px); }

.pd-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(139, 92, 246, .07);
  border: 1px solid rgba(139, 92, 246, .2);
  font-size: 12px;
  color: #5b21b6;
  line-height: 1.8;
}
.pd-emoji {
  display: inline-block;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  font-size: 20px;
  vertical-align: -0.12em;
}
.pd-zoom .pd-emoji { font-size: 16px; }
.pd-badge .pd-emoji,
.pd-save .pd-emoji { font-size: 16px; vertical-align: -0.08em; }
.pd-add .pd-emoji,
.pd-wa .pd-emoji,
.pd-tab .pd-emoji { font-size: 22px; vertical-align: -0.15em; }
.pd-card-add .pd-emoji { font-size: 18px; }
.pd-sticky .pd-emoji { font-size: 18px; }
.pd-note-ic { flex-shrink: 0; line-height: 1; }
.pd-note-ic .pd-emoji { font-size: 26px; }
.pd-tic .pd-emoji { font-size: 28px; }
.pd-ship-ic .pd-emoji { font-size: 26px; }

.pd-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pd-tic { font-size: 20px; line-height: 1; }
.pd-trust div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  font-weight: 700;
}

.pd-tabs {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
  margin-bottom: 26px;
}
.pd-tabbar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e6e8ee;
  padding: 6px 6px 0;
  overflow-x: auto;
}
.pd-tab {
  border: 0;
  background: transparent;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.pd-tab.is-active { color: #2563eb; border-bottom-color: #2563eb; }
.pd-panel { display: none; padding: 22px; }
.pd-panel.is-active { display: block; }
.pd-panel p,
.pd-long { font-size: 14px; line-height: 2; color: #4b5563; white-space: pre-line; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pd-table tr { border-bottom: 1px solid #eef0f4; }
.pd-table tr:nth-child(even) { background: #fafbfc; }
.pd-table td { padding: 12px 14px; }
.pd-table td:first-child { color: #6b7280; width: 40%; font-weight: 700; }
.pd-table td:last-child { color: #0f172a; font-weight: 700; }

.pd-ship {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  margin-bottom: 12px;
}
.pd-ship-ic {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .1), rgba(245, 158, 11, .06));
  display: grid;
  place-items: center;
  font-size: 20px;
}
.pd-ship strong { display: block; color: #0f172a; font-size: 14px; }
.pd-ship span { color: #6b7280; font-size: 13px; line-height: 1.9; }

.pd-related { margin-bottom: 10px; }
.pd-related-head { margin-bottom: 14px; }
.pd-related-head h2 { font-size: 22px; font-weight: 800; color: #0f172a; }
.pd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.pd-card {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}
.pd-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(37, 99, 235, .12); }
.pd-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f8fafc, #eef0f4);
  display: grid;
  place-items: center;
}
.pd-card-media img { width: 100%; height: 100%; object-fit: contain; }
.pd-card-media.is-missing img { opacity: 0; }
.pd-card-label {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
}
.pd-card-stock {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(16, 185, 129, .12);
  color: #059669;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 99px;
}
.pd-card-stock.is-out { background: rgba(239, 68, 68, .1); color: #dc2626; }
.pd-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pd-card-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.7;
  color: #0f172a;
  min-height: 46px;
}
.pd-card:hover .pd-card-title { color: #2563eb; }
.pd-card-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.pd-card-now { font-size: 15px; font-weight: 800; color: #0f172a; }
.pd-card-now small { font-size: 11px; color: #6b7280; font-weight: 500; }
.pd-card-old { font-size: 12px; color: #a0a0b0; text-decoration: line-through; }
.pd-card-add {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.pd-card-add:hover { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; }
.pd-card-add:disabled { cursor: not-allowed; color: #9ca3af; }

.pd-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border-top: 1px solid #e6e8ee;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, .12);
  padding: 10px 16px;
}
.pd-sticky.is-show { display: flex; }
.pd-sticky .t {
  font-size: 12px;
  color: #6b7280;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pd-sticky .p { font-size: 16px; font-weight: 800; color: #0f172a; }
.pd-sticky .p small { font-size: 11px; font-weight: 500; color: #6b7280; }
.pd-sticky .pd-actions { margin: 0; }
.pd-sticky .pd-add,
.pd-sticky .pd-wa { min-width: 0; padding: 10px 14px; flex: none; }

@media (max-width: 980px) {
  .pd-hero,
  .pd-grid { grid-template-columns: 1fr 1fr; }
  .pd-hero { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .pd-page { padding-bottom: 140px; }
  .pd-hero { padding: 14px; border-radius: 16px; }
  .pd-info h1,
  .pd-now { font-size: 20px; }
  .pd-specs,
  .pd-trust,
  .pd-grid { grid-template-columns: 1fr 1fr; }
  .pd-panel { padding: 14px; }
  .pd-sticky { bottom: 54px; justify-content: center; }
  .pd-sticky .sb-info { display: none; }
  .pd-table td { padding: 10px; font-size: 12.5px; }
}
