/* ===== Product Detail Styles ===== */

.breadcrumb-wrap {
  padding: calc(var(--header-height) + 24px) 0 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--text); }

.breadcrumb span {
  color: var(--text);
}

.product {
  padding: 32px 0 60px;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Gallery ---------- */
.gallery-main {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.gallery-main::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 50%);
}

.gallery-badges {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.gallery-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  z-index: 1;
}

.gallery-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.025em;
  color: var(--text);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.gallery-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-thumb {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  opacity: 0.6;
}

.gallery-thumb:hover { opacity: 0.9; }

.gallery-thumb.active {
  opacity: 1;
  border-color: var(--text);
}

/* ---------- Info ---------- */
.product-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.product-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.product-lead {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.price-block {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.price-now {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.price-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.info-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
}

.btn-lg {
  padding: 16px 24px;
}

@media (max-width: 480px) {
  .info-actions { grid-template-columns: 1fr; }
}

.info-meta {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.info-meta li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}

.info-meta svg {
  margin-top: 3px;
  color: var(--success);
  flex-shrink: 0;
}

.info-meta strong {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.info-meta span {
  color: var(--text-dim);
  font-size: 12px;
}

/* ---------- Tabs ---------- */
.product-tabs-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.product-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.product-tab {
  padding: 18px 28px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text-dim);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.product-tab:hover { color: var(--text-muted); }

.product-tab.active {
  color: var(--text);
  border-color: var(--text);
}

.tab-panel {
  padding: 40px;
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 300ms var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Prose ---------- */
.prose {
  max-width: 680px;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.prose h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 10px;
}

.prose p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.prose strong { color: var(--text); font-weight: 600; }

/* ---------- Features List ---------- */
.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 720px) {
  .features-list { grid-template-columns: 1fr; }
}

.feat-item {
  display: flex;
  gap: 14px;
}

.feat-check {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 999px;
  color: var(--success);
}

.feat-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feat-item p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Specs Table ---------- */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.specs-table tr:last-child td { border-bottom: 0; }

.specs-table td:first-child {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  width: 200px;
}

.specs-table td:last-child { color: var(--text); }

/* ---------- Changelog ---------- */
.changelog { display: flex; flex-direction: column; gap: 28px; }

.log-entry { padding-left: 20px; border-left: 2px solid var(--border); }

.log-version {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text);
  margin-bottom: 10px;
}

.log-entry ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry li {
  padding-left: 14px;
  position: relative;
  color: var(--text-muted);
  font-size: 14px;
}

.log-entry li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  background: var(--text-dim);
  border-radius: 50%;
}

/* ---------- Related ---------- */
.related { padding: 40px 0 100px; }
.related .products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) { .related .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .related .products-grid { grid-template-columns: 1fr; } }

/* ---------- Free price & skeleton loading ---------- */
.product-price-free,
.price-now.price-free {
  color: #22c55e !important;
}

/* Hide static content during load */
.product-gallery.is-loading,
.product-info.is-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}
.product-gallery.is-loading::after,
.product-info.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.03) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: pg-shimmer 1.5s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}
@keyframes pg-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Product page: framework tags under title */
.product-info .product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 18px;
}
.product-info .ptag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px 4px 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.product-info .ptag-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.product-info .ptag-esx .ptag-dot { background: #ff8c1a; }
.product-info .ptag-esx { color: #ffb070; }
.product-info .ptag-qb .ptag-dot { background: #ef4444; }
.product-info .ptag-qb { color: #fca5a5; }
.product-info .ptag-standalone .ptag-dot { background: #3b82f6; }
.product-info .ptag-standalone { color: #93c5fd; }

/* Product not-found state */
.product-notfound {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  max-width: 500px;
  margin: 0 auto;
}
.product-notfound svg { color: var(--text-dim); margin-bottom: 20px; }
.product-notfound h2 { font-size: 24px; margin: 0 0 10px; color: var(--text); }
.product-notfound p { color: var(--text-muted); margin: 0 0 24px; }
