.page {
  max-width: 1180px;
  margin: 40px auto;
  padding: 0 20px;
}

.breadcrumb {
  font-size: 13px;
  color: #777;
  margin-bottom: 25px;
}

.product-section {
  display: flex;
  flex-direction: row-reverse;
  gap: 30px;
  align-items: flex-start;
}

.product-info {
  flex: 1.2;
}

.product-info h1 {
  font-size: 25px;
  margin-bottom: 18px;
  color: #222;
}

.meta {
  color: #777;
  font-size: 14px;
  margin-bottom: 8px;
}

.description {
  margin-top: 22px;
  color: #555;
  font-size: 15px;
  text-align: justify;
}

.actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn-cart {
  border: none;
  background: #006b45;
  color: #fff;
  padding: 11px 24px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
}

.btn-cart:hover {
  background: #004f33;
  transform: translateY(-2px);
}

.simple-link {
  border: none;
  background: transparent;
  color: #444;
  cursor: pointer;
  font-size: 14px;
}

.simple-link:hover {
  color: #006b45;
}

.share {
  border-top: 1px solid #eee;
  margin-top: 28px;
  padding-top: 18px;
  font-size: 14px;
  color: #666;
}

.product-image-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.06);
  text-align: center;
  flex: 0.8;
}

.image-zoom-box {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: zoom-in;
  background: #eee;
}

.image-zoom-box img {
  width: 100%;
  display: block;
  transition:
    transform 0.45s ease,
    filter 0.45s ease;
}

.image-zoom-box:hover img {
  transform: scale(1.08);
  filter: brightness(0.88);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.05));
  opacity: 0;
  transition: 0.35s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 22px;
  color: #fff;
  font-size: 14px;
}

.image-zoom-box:hover .image-overlay {
  opacity: 1;
}

.zoom-icon {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #555;
  font-size: 24px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.zoom-icon:hover {
  transform: scale(1.14) rotate(6deg);
  background: #006b45;
  color: #fff;
}

.tabs-area {
  margin-top: 45px;
  background: #fff;
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.05);
}

.section-title {
  font-size: 20px;
  margin-bottom: 25px;
  border-right: 4px solid #006b45;
  padding-right: 12px;
}

.rating-wrapper {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
  align-items: center;
}

.rating-card {
  background: linear-gradient(135deg, #f5fff9, #ffffff);
  border: 1px solid #dceee6;
  border-radius: 22px;
  padding: 28px;
  text-align: center;
}

.average-circle {
  width: 125px;
  height: 125px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: conic-gradient(#006b45 0deg, #e6e6e6 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: 0.5s;
}

.average-circle::before {
  content: "";
  position: absolute;
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: #fff;
}

.average-number {
  position: relative;
  font-size: 30px;
  font-weight: bold;
  color: #006b45;
}

.vote-count {
  color: #777;
  font-size: 14px;
}

.user-rating-box {
  background: #fafafa;
  border-radius: 22px;
  padding: 28px;
  border: 1px solid #eee;
}

.user-rating-box h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.hint {
  font-size: 14px;
  color: #777;
  margin-bottom: 20px;
}

.stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 18px;
}

.star {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 26px;
  cursor: pointer;
  color: #ccc;
  transition: 0.25s;
}

.star:hover,
.star.active {
  color: #ffc400;
  background: #fff8d7;
  border-color: #ffd54a;
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 18px rgba(255, 196, 0, 0.22);
}

.rating-message {
  min-height: 28px;
  font-size: 14px;
  color: #006b45;
  margin-bottom: 20px;
  font-weight: bold;
}

.rating-bars {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 45px 1fr 35px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: #666;
}

.bar {
  height: 9px;
  background: #eee;
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #006b45, #3ab879);
  border-radius: 99px;
  transition: width 0.5s;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 25px;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 88vh;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  animation: zoomIn 0.35s ease;
}

.close-lightbox {
  position: absolute;
  top: 25px;
  left: 35px;
  background: #fff;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}

@keyframes zoomIn {
  from {
    transform: scale(0.82);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 500px) {
  .product-section {
    flex-direction: column;
  }

  .product-info,
  .product-image-card {
    width: 100%;
  }

  .stars {
    justify-content: center;
  }
}
@media (max-width: 900px) {
  .page {
    max-width: 100%;
    margin: 24px auto;
    padding: 0 16px;
  }

  .breadcrumb {
    font-size: 12px;
    margin-bottom: 18px;
  }

  .product-section {
    flex-direction: column;
    gap: 22px;
  }

  /* تصویر در گوشی بالا بیاید */
  .product-image-card {
    order: 1;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    flex: unset;
    padding: 16px;
  }

  /* متن زیر تصویر بیاید */
  .product-info {
    order: 2;
    width: 100%;
    flex: unset;
  }

  .product-info h1 {
    font-size: 21px;
    line-height: 1.7;
  }

  .description {
    font-size: 14px;
  }

  .tabs-area {
    margin-top: 28px;
    padding: 24px;
  }

  .rating-wrapper {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .stars {
    justify-content: center;
  }
}

/* گوشی‌های کوچک */
@media (max-width: 500px) {
  .page {
    margin: 16px auto;
    padding: 0 12px;
  }

  .product-info h1 {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .meta {
    font-size: 12.5px;
  }

  .description {
    margin-top: 16px;
    font-size: 13.5px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .btn-cart,
  .simple-link {
    width: 100%;
    text-align: center;
  }

  .btn-cart {
    padding: 12px 16px;
  }

  .simple-link {
    background: #f5f5f5;
    padding: 10px 14px;
    border-radius: 999px;
  }

  .share {
    font-size: 13px;
    margin-top: 20px;
    padding-top: 14px;
  }

  .product-image-card {
    padding: 12px;
    border-radius: 12px;
  }

  .image-zoom-box {
    border-radius: 12px;
  }

  .image-overlay {
    display: none;
  }

  .zoom-icon {
    width: 42px;
    height: 42px;
    left: 10px;
    bottom: 10px;
    font-size: 20px;
  }

  .tabs-area {
    padding: 18px;
    border-radius: 12px;
  }

  .section-title {
    font-size: 17px;
    margin-bottom: 18px;
  }

  .rating-card {
    padding: 20px;
    border-radius: 16px;
  }

  .average-circle {
    width: 105px;
    height: 105px;
  }

  .average-circle::before {
    width: 80px;
    height: 80px;
  }

  .average-number {
    font-size: 25px;
  }

  .vote-count {
    font-size: 13px;
  }

  .user-rating-box {
    padding: 18px;
    border-radius: 16px;
  }

  .user-rating-box h3 {
    font-size: 16px;
  }

  .hint {
    font-size: 13px;
  }

  .stars {
    gap: 6px;
  }

  .star {
    width: 42px;
    height: 42px;
    font-size: 24px;
    border-radius: 12px;
  }

  .rating-message {
    font-size: 13px;
    text-align: center;
  }

  .bar-row {
    grid-template-columns: 52px 1fr 28px;
    gap: 8px;
    font-size: 12px;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox img {
    max-width: 95%;
    max-height: 80vh;
    border-radius: 12px;
  }

  .close-lightbox {
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
}

/* خیلی کوچک، مثل گوشی‌های قدیمی */
@media (max-width: 360px) {
  .star {
    width: 37px;
    height: 37px;
    font-size: 21px;
  }

  .bar-row {
    grid-template-columns: 48px 1fr 24px;
  }
}


/* =========================================================
   Bulletin version chooser — only used in simpleBulletin.php
   ========================================================= */
.bulletin-inline-notice {
  margin: 16px 0 0;
  padding: 12px 16px;
  background: #fff7ed;
  border: 1px solid #ffdfac;
  border-radius: 12px;
  color: #87571b;
  font-size: 13px;
  line-height: 1.9;
}

.bulletin-choice-overlay[hidden] { display: none !important; }
.bulletin-choice-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 20px;
  direction: rtl;
}
.bulletin-choice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 34, 27, .58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.bulletin-choice-dialog {
  position: relative;
  width: min(100%, 675px);
  max-height: min(92vh, 810px);
  overflow-y: auto;
  border-radius: 24px;
  padding: 30px;
  background: #fff;
  box-shadow: 0 25px 90px rgba(0, 34, 22, .2);
  outline: none;
  animation: bulletinModalEnter .22s ease both;
}
.bulletin-choice-close {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 36px;
  height: 36px;
  border: 1px solid #e7ece9;
  border-radius: 50%;
  background: #f7f9f8;
  color: #62716a;
  font-size: 15px;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.bulletin-choice-close:hover { color: #064c34; background: #eef6f1; }
.bulletin-choice-header { text-align: center; padding: 4px 25px 23px; }
.bulletin-choice-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #006b45;
  background: #edf7f1;
  border-radius: 99px;
  padding: 5px 13px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 13px;
}
.bulletin-choice-header h2 {
  color: #192c22;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 4px;
}
.bulletin-choice-header p {
  color: #78827c;
  font-size: 12.5px;
  line-height: 1.9;
  margin: 0;
}
.bulletin-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.bulletin-choice-card {
  border: 1px solid #e4ece7;
  border-radius: 18px;
  padding: 20px 18px 16px;
  background: #fff;
  text-align: right;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.bulletin-choice-card:hover {
  border-color: #91c9ac;
  box-shadow: 0 8px 24px rgba(0, 87, 55, .07);
  transform: translateY(-2px);
}
.bulletin-choice-card--paid { background: linear-gradient(155deg, #f4faf6 0%, #fff 60%); border-color: #cce5d5; }
.bulletin-choice-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #006b45;
  background: #eaf6ee;
  margin-bottom: 16px;
  font-size: 19px;
}
.bulletin-choice-card-heading { color: #23342a; font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.bulletin-choice-price { color: #006b45; font-size: 23px; font-weight: 700; line-height: 1.7; }
.bulletin-choice-price span { font-size: 12px; font-weight: 400; color: #687b70; }
.bulletin-choice-card-desc { font-size: 12px; color: #74817a; line-height: 1.9; margin: 6px 0 22px; }
.bulletin-choice-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 12px 10px;
  margin-top: auto;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s;
}
.bulletin-choice-button--free { background: #fff; border: 1px solid #c7d9cf; color: #006b45; }
.bulletin-choice-button--free:hover { background: #edf7f1; }
.bulletin-choice-button--paid { background: #006b45; border: 1px solid #006b45; color: #fff; }
.bulletin-choice-button--paid:hover { background: #005136; }
.bulletin-choice-button:active { transform: scale(.985); }
.bulletin-choice-footnote {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  line-height: 1.9;
  color: #88928c;
  text-align: center;
  margin: 18px 0 0;
}
.bulletin-choice-close:focus-visible,
.bulletin-choice-button:focus-visible,
#openBulletinModal:focus-visible { outline: 3px solid #86bfa1; outline-offset: 3px; }
@keyframes bulletinModalEnter {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 580px) {
  .bulletin-choice-overlay { padding: 14px; }
  .bulletin-choice-dialog { padding: 24px 16px 18px; border-radius: 20px; max-height: 93vh; }
  .bulletin-choice-header { padding: 10px 26px 20px; }
  .bulletin-choice-header h2 { font-size: 19px; }
  .bulletin-choice-grid { grid-template-columns: 1fr; gap: 10px; }
  .bulletin-choice-card { padding: 14px 16px; }
  .bulletin-choice-icon { margin-bottom: 8px; }
  .bulletin-choice-price { font-size: 20px; }
  .bulletin-choice-card-desc { margin: 3px 0 10px; }
  .bulletin-choice-footnote { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .bulletin-choice-dialog { animation: none; }
  .bulletin-choice-card, .bulletin-choice-button { transition: none; }
}

/* Disabled file editions remain visible, but cannot be submitted. */
.bulletin-choice-button:disabled {opacity: .58; cursor: not-allowed; filter: grayscale(.25);}
.bulletin-choice-button:disabled:hover {transform: none; background: #f3f6f4; color: #596e60;}
