/* ==========================================================================
   product-detail.css
   Styles for the product detail page (/produs/{slug}-{id}).
   Replaces inline styles from product-detail.php.
   ========================================================================== */

/* Inactive overlay */
.pd-inactive-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
}
.pd-inactive-overlay__inner { text-align: center; padding: 2rem; }
.pd-inactive-overlay__icon { margin-bottom: 1rem; }
.pd-inactive-overlay__title { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.pd-inactive-overlay__text { font-size: 0.9375rem; color: rgba(255,255,255,0.7); margin-bottom: 1.5rem; }
.pd-inactive-overlay__btn {
  display: inline-block; padding: 0.625rem 2rem;
  background: var(--cta); color: #fff; border-radius: var(--radius-sm);
  font-size: 0.9375rem; font-weight: 600; text-decoration: none;
}

/* Breadcrumb wrapper */
.pd-breadcrumb-wrap { padding: calc(0.75rem + 52px + 1.5rem) 0 0; }
.pd-breadcrumb { padding: 0.75rem 0; }

/* Main section */
.pd-section { padding: 1rem 0 3rem; }

/* Gallery */
.pd-gallery { margin-bottom: 1.5rem; }
.pd-gallery__main {
  aspect-ratio: 4/3; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.pd-gallery__empty {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: var(--text-muted);
}
.pd-gallery__thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.pd-gallery__offer-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 12px; font-size: 0.75rem; z-index: 2;
}

/* Content card (description, specs, offers, etc.) */
.pd-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem;
}
.pd-card--sm { margin-bottom: 1rem; }
.pd-card__title {
  font-size: 1.125rem; font-weight: 700;
  color: var(--text-heading); margin-bottom: 1rem;
}

/* Specs grid */
.pd-specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.pd-specs-key {
  padding: 0.625rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.875rem; color: var(--text-muted);
}
.pd-specs-val {
  padding: 0.625rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.875rem; font-weight: 600; color: var(--text-heading);
}

/* Sidebar */
.pd-sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem;
}
.pd-product-title {
  font-size: 1.375rem; font-weight: 700;
  color: var(--text-heading); margin-bottom: 0.75rem; line-height: 1.3;
}
.pd-badges { margin-bottom: 1rem; }

/* Out of stock alert */
.pd-oos-alert {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem; background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.2); border-radius: var(--radius-sm);
  margin-bottom: 1rem; font-size: 0.875rem; color: #DC2626;
}
.pd-oos-alert svg { flex-shrink: 0; }

/* Price */
.pd-price {
  font-size: 2rem; font-weight: 800; color: var(--cta); margin-bottom: 1rem;
}
.pd-price__unit { font-size: 0.875rem; font-weight: 400; color: var(--text-muted); margin-left: 4px; }
.pd-price__vat { font-size: 0.75rem; font-weight: 400; color: var(--text-muted); margin-left: 6px; }

/* Quick info */
.pd-quick-info {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1rem 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin-bottom: 1rem;
}
.pd-info-row { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; }
.pd-info-row a { color: var(--cta); font-weight: 600; }

/* Vendor section */
.pd-vendor-label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.75rem;
}

/* Own product box */
.pd-own-product {
  background: rgba(249,115,22,0.06); border: 1px solid rgba(249,115,22,0.2);
  border-radius: var(--radius-sm); padding: 1rem;
}
.pd-own-product__header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.pd-own-product__icon {
  width: 40px; height: 40px; background: rgba(249,115,22,0.1);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
}
.pd-own-product__title { font-weight: 700; color: var(--cta); font-size: 0.875rem; }
.pd-own-product__sub { font-size: 0.75rem; color: var(--text-muted); }

/* Hidden vendor (before reveal) */
.pd-vendor-hidden {
  background: rgba(100,116,139,0.04); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); padding: 1rem;
}
.pd-vendor-hidden__header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.pd-vendor-hidden__avatar {
  width: 40px; height: 40px; background: #E2E8F0;
  border-radius: var(--radius-sm); filter: blur(4px); flex-shrink: 0;
}
.pd-vendor-hidden__name { font-weight: 600; color: var(--text-heading); filter: blur(4px); user-select: none; }
.pd-vendor-hidden__text { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 0.75rem; text-align: center; }

/* Revealed vendor */
.pd-vendor-revealed {
  background: rgba(22,163,74,0.04); border: 1px solid rgba(22,163,74,0.2);
  border-radius: var(--radius-sm); padding: 1rem;
}
.pd-vendor-revealed__header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.pd-vendor-revealed__avatar {
  width: 44px; height: 44px; background: #E2E8F0;
  border-radius: var(--radius-sm); overflow: hidden;
}
.pd-vendor-revealed__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pd-vendor-revealed__name { font-weight: 700; color: var(--text-heading); font-size: 0.9375rem; }

/* Contact links */
.pd-contact-list { display: flex; flex-direction: column; gap: 0.5rem; }
.pd-contact-link {
  display: flex; align-items: center; gap: 8px; font-size: 0.875rem;
  color: var(--text); padding: 8px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none;
}
.pd-contact-unlocked {
  margin-top: 0.75rem; padding-top: 0.75rem;
  border-top: 1px solid rgba(22,163,74,0.15);
  font-size: 0.75rem; color: var(--success);
  display: flex; align-items: center; gap: 4px;
}

/* Reveal hint */
.pd-reveal-hint { font-size: 0.6875rem; color: var(--text-muted); margin-top: 0.5rem; text-align: center; }
.pd-reveal-hint--error { color: var(--error); }
.pd-free-credits-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2); border-radius: var(--radius-full);
  font-size: 0.6875rem; font-weight: 600; color: #3B82F6;
}

/* Transaction status */
.pd-tx-active {
  width: 100%; margin-top: 0.75rem; padding: 0.625rem; text-align: center;
  background: rgba(22,163,74,0.1); border: 1px solid rgba(22,163,74,0.3);
  border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; color: #16a34a;
}

/* Multi-vendor offers */
.pd-offers__header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem;
}
.pd-offers__title { font-size: 1.125rem; font-weight: 700; color: var(--text-heading); }
.pd-offers__count { font-size: 0.875rem; font-weight: 600; color: var(--info); }
.pd-offers__desc { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 1rem; }

.pd-offer-current {
  padding: 1rem; background: rgba(249,115,22,0.04);
  border: 1.5px solid rgba(249,115,22,0.25); border-radius: var(--radius-sm);
  margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: space-between;
}
.pd-offer-current__price { font-size: 1.375rem; font-weight: 800; color: var(--cta); }
.pd-offer-current__badge {
  padding: 6px 14px; background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.2); border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; color: var(--cta); white-space: nowrap;
}

.pd-offer-link {
  display: flex; padding: 1rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 0.5rem; align-items: center; justify-content: space-between;
  transition: border-color 0.15s; text-decoration: none;
}
.pd-offer-link:hover { border-color: var(--cta); }
.pd-offer-link__price { font-size: 1.25rem; font-weight: 800; color: var(--text-heading); }
.pd-offer-link__cta { font-size: 0.8125rem; color: var(--cta); font-weight: 600; white-space: nowrap; }

.pd-offer-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.375rem; font-size: 0.8125rem; }
.pd-offer-meta__location { color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.pd-offer-meta__rating { color: var(--warning); }

/* Share / Report buttons */
.pd-actions { display: flex; gap: 0.5rem; }
.pd-actions .btn-ghost { flex: 1; }

/* Similar products */
.pd-similar { margin-top: 3rem; }
.pd-similar .grid-products { margin-top: 1rem; }

/* Report modal */
.pd-report-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; }
.pd-report-reasons { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.pd-report-reason {
  display: flex; align-items: center; gap: 8px; padding: 0.625rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color 0.15s;
}
.pd-report-reason:hover { border-color: var(--cta); }
.pd-report-reason input { accent-color: var(--cta); }
.pd-report-reason span { font-size: 0.875rem; }

/* Mobile sticky reveal bar */
.pd-sticky-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  padding: 0.75rem 1rem; background: var(--surface);
  border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
  transform: translateY(100%); transition: transform 0.3s ease;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}
.pd-sticky-bar__btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.75rem; background: var(--cta); color: #fff;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9375rem;
  text-decoration: none; border: none; cursor: pointer;
}
.pd-sticky-bar__btn--revealed {
  background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.2);
  color: var(--success); cursor: pointer;
}
.pd-sticky-bar__btn--disabled { opacity: 0.5; cursor: not-allowed; }
.pd-sticky-bar__hint { text-align: center; font-size: 0.6875rem; color: var(--text-muted); margin-top: 4px; }

/* Price unit/vat inline helpers */
.pd-unit { font-size: 0.875rem; font-weight: 400; color: var(--text-muted); }
.pd-vat { font-size: 0.75rem; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
