.product-page-shell {
  padding-top: 6px;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
  gap: 18px;
  align-items: start;
}

#productMainImageWrap {
  border-radius: 26px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 251, 0.98));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  padding: 12px;
}

.product-detail-side {
  position: static;
  max-height: none;
  overflow: visible;
  scrollbar-width: auto;
  scrollbar-color: auto;
}

.product-page-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-main-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 249, 247, 0.98));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.product-detail-image {
  width: 100%;
  height: clamp(320px, 42vw, 460px);
  object-fit: contain;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  background: #fff;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.product-detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 248, 0.98));
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.07);
}

.product-status-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.product-page-title,
.product-detail-title {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.product-detail-category {
  margin-bottom: 10px;
  font-size: 13px;
}

.product-detail-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-category-icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.product-detail-category-icon svg {
  width: 16px;
  height: 16px;
}

.product-detail-price {
  margin-bottom: 0;
  font-size: clamp(30px, 3.2vw, 40px);
}

.product-lead-mode-badge {
  background: #fff7ed;
  color: #9a3412;
  border-color: rgba(154, 52, 18, 0.18);
}

.product-promotion-badge {
  border-color: rgba(20, 184, 166, 0.18);
  background: rgba(236, 253, 245, 0.86);
  color: #047857;
}

.product-promotion-badge-sponsored {
  border-color: rgba(15, 23, 42, 0.12);
  background: linear-gradient(135deg, #0f172a, #0f766e);
  color: #f8fafc;
}

.product-lead-price-note {
  margin-top: -8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.product-description,
.product-detail-description {
  font-size: 14px;
  line-height: 1.62;
  margin: 0;
  white-space: pre-wrap;
  color: var(--text);
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
}

.product-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.product-meta-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

body.dark .product-meta-card {
  background: rgba(255, 255, 255, 0.04);
}

.product-meta-label {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}

.product-meta-value {
  font-weight: 700;
  line-height: 1.35;
  font-size: 15px;
}

.product-meta-card-delivery {
  grid-column: 1 / -1;
}

.product-meta-value-delivery {
  display: flex;
  align-items: center;
  min-height: 24px;
}

.product-detail-delivery-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
}

.product-detail-delivery-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  max-width: none;
  overflow: visible;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  color: var(--text);
  padding-inline: 10px;
  line-height: 1;
  white-space: nowrap;
}

.product-detail-delivery-name {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.product-detail-delivery-chip--dpd {
  border-color: rgba(220, 38, 38, 0.12);
}

.product-detail-delivery-chip--omniva {
  border-color: rgba(255, 107, 0, 0.16);
}

.product-detail-delivery-chip--smartpost {
  border-color: rgba(14, 165, 233, 0.14);
}

.product-detail-delivery-size {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.01em;
}

body.dark .product-detail-delivery-size {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

body.dark .product-detail-delivery-chip {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
}

body.dark .product-detail-delivery-name {
  color: rgba(255, 255, 255, 0.92);
}

.product-delivery-empty {
  color: var(--muted);
  font-weight: 650;
}

.product-alert-sold,
.product-alert-safe {
  border-radius: 16px;
  padding: 13px 15px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.55;
}

.product-alert-sold {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.24);
  color: #b91c1c;
}

.product-alert-safe {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.24);
  color: #047857;
}

.product-lead-only-notice {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 22px;
  padding: 16px 18px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at 12% 18%, rgba(251, 191, 36, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.72));
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.product-lead-only-notice strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.product-lead-only-notice p {
  max-width: 820px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-lead-only-kicker {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-lead-price-note {
  display: inline-flex;
  width: fit-content;
  margin: 6px 0 14px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(251, 191, 36, 0.16);
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

body.dark .product-lead-only-notice {
  background:
    radial-gradient(circle at 12% 18%, rgba(251, 191, 36, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(46, 47, 56, 0.94), rgba(35, 36, 44, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark .product-lead-only-kicker {
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
}

body.dark .product-lead-mode-badge {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.22);
  color: #fdba74;
}

body.dark .product-promotion-badge {
  border-color: rgba(153, 246, 228, 0.22);
  background: rgba(20, 184, 166, 0.14);
  color: rgba(153, 246, 228, 0.96);
}

body.dark .product-promotion-badge-sponsored {
  border-color: rgba(248, 250, 252, 0.16);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.14), rgba(20, 184, 166, 0.42));
  color: #fff;
}

body.dark .product-lead-price-note {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
}

.product-actions-wrap,
.row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  margin-top: 0;
}

.product-actions-wrap .btn,
.product-actions-wrap .product-report-link {
  min-height: 46px;
  width: 100%;
}

#buyProductBtn,
#buyByOfferBtn,
#existingOrderBtn,
.product-lead-contact-btn {
  grid-column: 1 / -1;
}

.product-seller-card {
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  padding: 16px;
}

body.dark .product-seller-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark #productMainImageWrap,
body.dark .product-detail-side {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(46, 47, 56, 0.96), rgba(35, 36, 44, 0.98));
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark .product-detail-category-chip,
body.dark .product-detail-description {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.product-seller-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.product-seller-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.product-seller-head .muted {
  margin-top: 5px;
  font-size: 12px;
}

.product-seller-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.product-card-premium-seller {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 999px;
  background: rgba(240, 253, 250, 0.92);
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

body.dark .product-card-premium-seller {
  border-color: rgba(45, 212, 191, 0.25);
  background: rgba(20, 83, 45, 0.24);
  color: #99f6e4;
}

.product-premium-trust-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(45, 212, 191, 0.2), transparent 38%),
    linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.78));
}

.product-premium-trust-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.04em;
  box-shadow: 0 10px 22px rgba(20, 184, 166, 0.2);
}

.product-premium-trust-copy {
  min-width: 0;
}

.product-premium-trust-copy strong,
.product-premium-trust-copy small {
  display: block;
}

.product-premium-trust-copy strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.1;
}

.product-premium-trust-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.product-premium-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
}

.product-premium-trust-pills i {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.09);
  color: #0f766e;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
}

body.dark .product-premium-trust-card {
  border-color: rgba(45, 212, 191, 0.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(45, 212, 191, 0.16), transparent 40%),
    linear-gradient(135deg, rgba(20, 83, 45, 0.28), rgba(15, 23, 42, 0.36));
}

body.dark .product-premium-trust-pills i {
  background: rgba(45, 212, 191, 0.12);
  color: #99f6e4;
}

.product-seller-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-seller-stat {
  padding: 14px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
}

body.dark .product-seller-stat {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.product-seller-stat strong {
  display: block;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 4px;
}

.product-seller-stat p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.product-seller-city {
  margin-top: 14px;
}

.gallery-row,
.product-gallery-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.gallery-thumb-btn,
.product-thumb-btn {
  width: 88px;
  height: 88px;
  padding: 0;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.gallery-thumb-btn:hover,
.product-thumb-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.gallery-thumb-btn.active,
.product-thumb-btn.active {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  transform: translateY(-1px);
}

.gallery-thumb-btn.active .gallery-thumb-img,
.product-thumb-btn.active .product-thumb-image {
  border-color: var(--accent);
}

.gallery-thumb-img,
.product-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: block;
}

body.dark .product-main-card {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.07), transparent 24%),
    linear-gradient(180deg, rgba(52, 53, 65, 0.96), rgba(43, 44, 52, 0.98));
  border-color: rgba(255, 255, 255, 0.08);
}

.title-24 {
  font-size: 24px;
  line-height: 1.15;
  margin: 0;
}

.product-inline-meta {
  display: grid;
  gap: 10px;
}

.rating-stars,
.review-stars {
  letter-spacing: 0.08em;
  color: #f59e0b;
  font-weight: 700;
}

.old-price-inline {
  display: inline-block;
  margin-right: 10px;
  color: var(--muted);
  text-decoration: line-through;
  font-size: 20px;
  font-weight: 500;
}

.offer-modal-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
}

.offer-old-price {
  display: inline-block;
  margin-right: 8px;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 500;
}

#createProductImagesPreview.grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.image-preview-item {
  position: relative;
}

.image-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 13px;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.14s ease;
  z-index: 2;
}

.image-preview-remove:hover {
  background: rgba(239, 68, 68, 0.88);
}

@media (max-width: 1100px) {
  .product-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .product-layout {
    grid-template-columns: 1fr;
  }

  /* Disable sticky sidebar on mobile (single column layout) */
  .product-detail-side {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding: 18px;
  }
}

@media (max-width: 900px) {
  .product-main-card .grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .product-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .product-actions-wrap .btn,
  .row-actions .btn {
    width: 100%;
  }

  .product-actions-wrap,
  .row-actions {
    grid-template-columns: 1fr;
  }

  .product-page-title,
  .product-detail-title {
    font-size: 26px;
  }

  .product-related-grid {
    grid-template-columns: 1fr;
  }

  .product-detail-image {
    height: 320px;
    border-radius: 20px;
  }

  #productMainImageWrap {
    padding: 12px;
    border-radius: 22px;
  }

  .product-main-card,
  .product-qa-card,
  .more-from-seller-section {
    border-radius: 20px;
  }

  .gallery-thumb-btn,
  .product-thumb-btn {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 400px) {
  .product-meta-grid {
    grid-template-columns: 1fr;
  }

  .product-detail-image {
    height: 260px;
  }
}

/* ─── Drag & drop image upload zone ─────────────── */
.image-drop-zone {
  border: 2px dashed var(--line);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 14px;
  position: relative;
}

.image-drop-zone:hover,
.image-drop-zone.drag-active {
  border-color: var(--accent, #2563eb);
  background: rgba(37, 99, 235, 0.05);
  color: var(--accent);
}

.image-drop-zone-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
  line-height: 1;
}

.image-drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.listing-helper-card {
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.06);
}

.listing-helper-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.listing-helper-text,
.listing-inline-hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.listing-inline-hint {
  margin-top: -8px;
}

/* ─── Similar Products ──────────────────────────────────────────────────────── */

.similar-products-section {
  margin-top: 40px;
}

.similar-products-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.similar-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.similar-product-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card-bg, var(--surface));
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.similar-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.similar-product-img-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2, #f3f4f6);
}

.similar-product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.similar-product-info {
  padding: 12px;
}

.similar-product-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.similar-product-price {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: var(--primary, #2563eb);
}

@media (max-width: 480px) {
  .similar-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ─── Image Lightbox ─────────────────────────────────────────────────────────── */

.product-detail-image {
  cursor: zoom-in;
}

.lightbox-overlay:not(#lightboxOverlay) {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lbFadeIn 0.18s ease;
}

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-overlay:not(#lightboxOverlay) .lightbox-img-wrap {
  max-width: min(90vw, 900px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay:not(#lightboxOverlay) .lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  animation: lbImgIn 0.15s ease;
}

@keyframes lbImgIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-overlay:not(#lightboxOverlay) .lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s;
  z-index: 2001;
  padding: 4px 8px;
}

.lightbox-overlay:not(#lightboxOverlay) .lightbox-close:hover { opacity: 1; }

.lightbox-overlay:not(#lightboxOverlay) .lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 48px;
  line-height: 1;
  width: 52px;
  height: 72px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2001;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-overlay:not(#lightboxOverlay) .lightbox-nav:hover { background: rgba(255, 255, 255, 0.25); }

.lightbox-overlay:not(#lightboxOverlay) .lightbox-prev { left: 12px; }
.lightbox-overlay:not(#lightboxOverlay) .lightbox-next { right: 12px; }

.lightbox-overlay:not(#lightboxOverlay) .lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 14px;
  border-radius: 20px;
  z-index: 2001;
}

@media (max-width: 600px) {
  .lightbox-overlay:not(#lightboxOverlay) .lightbox-nav {
    width: 40px;
    height: 56px;
    font-size: 36px;
  }
  .lightbox-overlay:not(#lightboxOverlay) .lightbox-prev { left: 4px; }
  .lightbox-overlay:not(#lightboxOverlay) .lightbox-next { right: 4px; }
}

/* Seller location + map */
.seller-location-block {
  margin-bottom: 28px;
}
.seller-location-title {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}
.seller-map-box {
  width: 100%;
  height: 240px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background:
    radial-gradient(circle at 18% 16%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 16px 32px rgba(15, 23, 42, 0.08);
}
.seller-map-box-sm {
  height: 196px;
  margin-top: 12px;
}
.product-seller-city {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  margin-top: 14px;
  margin-bottom: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.product-seller-city::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

.seller-map-fallback {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.seller-map-fallback-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
}

.seller-map-fallback-art span {
  position: absolute;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
}

.seller-map-fallback-art span:nth-child(1) {
  width: 120px;
  height: 120px;
  left: 8%;
  top: 12%;
}

.seller-map-fallback-art span:nth-child(2) {
  width: 180px;
  height: 180px;
  right: -34px;
  bottom: -62px;
}

.seller-map-fallback-art span:nth-child(3) {
  width: 18px;
  height: 18px;
  left: 50%;
  top: 42%;
  background: #2563eb;
  box-shadow: 0 0 0 12px rgba(37, 99, 235, 0.15);
}

.seller-map-fallback-content {
  max-width: 250px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
  text-align: center;
}

.seller-map-fallback-kicker {
  margin-bottom: 4px;
  color: var(--primary, #2563eb);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seller-map-fallback-content strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.seller-map-fallback-content p {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.seller-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #1f2937;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.product-actions-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.product-actions-wrap .btn,
.product-actions-wrap a.btn {
  min-height: 42px;
  border-radius: 14px;
}

.product-actions-wrap .btn.btn-dark,
.product-actions-wrap a.btn.btn-dark {
  grid-column: 1 / -1;
}

.product-actions-wrap #shareProductBtn {
  justify-content: center;
}

/* Report product link */
.product-report-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.035);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.product-report-link:hover {
  border-color: rgba(0, 119, 130, 0.22);
  background: rgba(0, 119, 130, 0.06);
  color: #007782;
}

body.dark .product-report-link {
  border-color: rgba(244, 241, 232, 0.1);
  background: rgba(244, 241, 232, 0.04);
  color: #cbd5e1;
}

body.dark .product-report-link:hover {
  border-color: rgba(71, 196, 184, 0.22);
  background: rgba(71, 196, 184, 0.08);
  color: #8ee3d8;
}

/* ─── More From Seller ───────────────────────────────────────────────────────── */

.more-from-seller-section {
  margin-top: 28px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
}

.more-from-seller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.mfs-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mfs-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.mfs-card--sold { opacity: 0.55; }

.mfs-card-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-2, #f3f4f6);
}

.mfs-card-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.mfs-card-info { padding: 10px; }

.mfs-card-title {
  font-size: 12px; font-weight: 500;
  margin: 0 0 3px; line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mfs-card-price {
  font-size: 13px; font-weight: 700;
  margin: 0; color: var(--primary, #2563eb);
}

@media (max-width: 600px) {
  .more-from-seller-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

/* ─── Product Q&A ─────────────────────────────────────────────────────────────── */

.product-qa-section {
  margin-top: 24px;
}

.product-qa-card {
  padding: 22px;
  border-radius: 22px;
}

.product-qa-card .card-title {
  margin-bottom: 16px;
}

.qa-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted, #64748b);
  margin-left: 6px;
}

.qa-ask-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.qa-ask-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
}

.qa-ask-form input:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
}

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qa-item {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.qa-question {
  display: flex;
  gap: 12px;
}

.qa-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.qa-body {
  flex: 1;
  min-width: 0;
}

.qa-meta {
  margin-bottom: 4px;
}

.qa-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.qa-text {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
}

.qa-answer {
  background: var(--surface-2, #f8fafc);
  border-left: 3px solid var(--primary, #2563eb);
  border-radius: 0 10px 10px 0;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.qa-answer-label {
  font-weight: 700;
  color: var(--primary, #2563eb);
  margin-right: 4px;
}

.qa-answer-form {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.qa-answer-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
}

.qa-answer-input:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
}

.qa-answer-submit {
  padding: 8px 14px;
  font-size: 13px;
}

.qa-pending {
  font-size: 13px;
  color: var(--muted, #94a3b8);
  font-style: italic;
}

@media (max-width: 600px) {
  .qa-ask-form {
    flex-direction: column;
  }
}


/* === Redesign pass: product usability === */
.product-layout {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
  gap: 18px;
}

.product-detail-side {
  position: sticky;
  top: 88px;
  max-height: none;
  overflow: visible;
  padding: 20px;
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.055);
}

.product-actions-wrap .btn {
  min-height: 44px;
}

.product-actions-wrap {
  row-gap: 10px;
}

.product-actions-wrap #favoriteProductBtn,
.product-actions-wrap #offerBtn,
.product-actions-wrap #messageSellerBtn {
  font-weight: 600;
}

.product-actions-wrap #favoriteProductBtn {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.14);
}

.product-actions-wrap #shareProductBtn,
.product-actions-wrap .product-report-link {
  opacity: 0.78;
}

.review-summary-card,
.review-gate-card,
.review-empty-card {
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 252, 0.98));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.review-summary-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

body.dark .review-summary-card,
body.dark .review-gate-card,
body.dark .review-empty-card {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(46, 47, 56, 0.96), rgba(35, 36, 44, 0.98));
  border-color: rgba(255, 255, 255, 0.08);
}

.product-detail-side {
  scroll-padding-top: 16px;
}

@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
  }

  .product-detail-side {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .product-detail-image {
    height: 300px;
    border-radius: 20px;
  }

  .product-main-card {
    border-radius: 18px;
  }

  .product-description,
  .product-detail-description {
    font-size: 14px;
    line-height: 1.65;
  }

  .product-meta-card,
  .product-alert-sold,
  .product-alert-safe {
    border-radius: 16px;
    padding: 12px 14px;
  }

  .product-actions-wrap .btn,
  .product-actions-wrap a.btn,
  .product-actions-wrap .product-report-link {
    width: 100%;
    justify-content: center;
  }

  .product-actions-wrap {
    grid-template-columns: 1fr;
  }

  .product-seller-head {
    flex-direction: column;
  }

  .product-seller-stats {
    grid-template-columns: 1fr;
  }

  .product-meta-grid {
    grid-template-columns: 1fr;
  }

  .review-summary-meta {
    gap: 8px;
  }

  .gallery-thumb-btn,
  .product-thumb-btn {
    width: 68px;
    height: 68px;
  }

  .product-qa-card,
  .more-from-seller-section {
    padding: 18px;
    border-radius: 18px;
  }
}

/* === Product lower sections polish === */
.more-from-seller-section {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 252, 0.98));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.more-from-seller-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.mfs-card {
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.mfs-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
  border-color: rgba(37, 99, 235, 0.18);
}

.mfs-card--sold {
  opacity: 0.82;
}

.mfs-card-info {
  padding: 12px 13px 14px;
}

.mfs-card-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
}

.mfs-card-price {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.product-review-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 252, 0.98));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.product-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.product-review-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.review-avatar-placeholder {
  display: grid;
  place-items: center;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
}

.product-review-name {
  font-weight: 700;
}

.product-review-text {
  font-size: 14px;
  line-height: 1.68;
}

.product-qa-section {
  margin-top: 28px;
}

.product-qa-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 252, 0.98));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.qa-list {
  gap: 18px;
}

.qa-item {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 16px;
}

.qa-answer {
  margin-top: 10px;
  background: rgba(37, 99, 235, 0.06);
  border-left: 3px solid var(--primary, #2563eb);
  border-radius: 0 14px 14px 0;
  padding: 12px 14px;
}

body.dark .more-from-seller-section,
body.dark .product-review-card,
body.dark .product-qa-card {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(46, 47, 56, 0.96), rgba(35, 36, 44, 0.98));
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark .mfs-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark .product-review-avatar {
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark .qa-item {
  border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark .qa-answer {
  background: rgba(37, 99, 235, 0.12);
}

@media (max-width: 900px) {
  .more-from-seller-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .product-review-head {
    flex-direction: column;
    align-items: stretch;
  }

  .more-from-seller-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-review-card,
  .product-qa-card,
  .more-from-seller-section {
    padding: 18px;
    border-radius: 20px;
  }
}

/* Desktop detail balance: keep the left column filled instead of leaving a blank well. */
.product-detail-main {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.product-detail-copy {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 252, 0.98));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.055);
}

.product-detail-copy .product-detail-description,
.product-detail-copy .product-meta-grid {
  margin: 0;
}

.product-detail-side {
  align-self: start;
}

.product-detail-side .product-seller-card {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.dark .product-detail-copy {
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(46, 47, 56, 0.96), rgba(35, 36, 44, 0.98));
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark .product-detail-side .product-seller-card {
  background: transparent;
  border-color: transparent;
}

@media (max-width: 980px) {
  .product-detail-copy {
    padding: 18px;
    border-radius: 20px;
  }
}

/* Text safety for translated and contact-only product pages. */
.product-page-shell :where(
  .product-detail-title,
  .product-detail-category-chip,
  .product-detail-description,
  .product-meta-card,
  .product-meta-value,
  .product-lead-only-notice,
  .product-lead-only-notice strong,
  .product-lead-only-notice p,
  .product-lead-only-kicker,
  .product-lead-mode-badge,
  .product-lead-price-note,
  .product-seller-card,
  .product-seller-title,
  .product-report-link,
  .similar-product-title,
  .qa-text,
  .qa-answer
) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.product-lead-only-notice {
  display: block;
}

.product-lead-only-kicker,
.product-lead-mode-badge,
.product-lead-price-note {
  white-space: normal;
}

@media (max-width: 640px) {
  .product-lead-only-notice {
    padding: 14px;
    border-radius: 18px;
  }

  .product-detail-category-chip {
    white-space: normal;
  }
}

/* Delivery chips on the product page should read as text, not clipped mini logos. */
.product-detail-delivery-group {
  align-items: flex-start;
  min-width: 0;
}

.product-detail-delivery-chip {
  max-width: 100%;
  overflow: hidden;
}

.product-detail-delivery-name {
  max-width: min(150px, 56vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-delivery-chip--dpd,
.product-detail-delivery-chip--omniva,
.product-detail-delivery-chip--smartpost {
  background-image: none !important;
}

@media (max-width: 640px) {
  .product-detail-delivery-chip {
    gap: 6px;
    min-height: 28px;
    padding-inline: 8px;
  }

  .product-detail-delivery-name {
    max-width: 92px;
    font-size: 11px;
  }

  .product-detail-delivery-size {
    min-width: 22px;
    height: 19px;
    padding-inline: 6px;
    font-size: 10px;
  }
}
