/* =============================================
   PRODUCT DETAIL PAGE — Open, wide, no cards
   ============================================= */

.product-layout {
  max-width: 1400px;
  margin-inline: auto;
  padding-block: var(--space-4) var(--space-12);
}

/* ---- Breadcrumb ---- */
.product-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-6);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.product-breadcrumb a {
  color: var(--text-tertiary);
  transition: color var(--duration-fast) var(--ease-out);
}

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

.product-breadcrumb .sep {
  color: var(--border-strong);
  user-select: none;
}

/* ---- Top section: image + info ---- */
.product-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-subtle);
}

.product-image-col {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.product-image-box {
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-10);
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
}

.product-main-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.product-info-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  justify-content: center;
}

.product-info-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.product-category {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--accent-text);
  letter-spacing: 0.04em;
}

.product-name {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

/* ---- Key specs strip — no cards, inline with separators ---- */
.product-key-specs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-5);
  margin: var(--space-2) 0;
}

.key-spec {
  display: flex;
  flex-direction: column;
}

.key-spec-value {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.key-spec-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* ---- Purchase row ---- */
.product-purchase {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.product-price {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.product-skill-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--accent-text);
  background: var(--accent-subtle);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}

/* Actions */
.product-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  cursor: pointer;
  min-height: 40px;
  transition: background var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              color var(--duration-normal) var(--ease-out);
  text-decoration: none;
}

.action-button.add-button {
  background: var(--accent);
  color: var(--text-inverse);
  border: 1px solid var(--accent);
}

.action-button.add-button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.action-button.remove-button {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--border-default);
}

.action-button.remove-button:hover {
  background: var(--error-subtle);
  border-color: var(--error);
}

.action-button.buy-button {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.action-button.buy-button:hover {
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

.action-button.buy-button svg {
  opacity: 0.4;
  transition: opacity var(--duration-fast);
}

.action-button.buy-button:hover svg {
  opacity: 0.8;
}

/* Description */
.product-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 560px;
}

/* ---- Detail grid: specs left, sidebar right ---- */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

.product-specs-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  min-width: 0;
}

/* Section — no border, no background, just a heading + content */
.product-section {
  border: none;
  border-radius: 0;
  overflow: visible;
}

.product-section-title {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0 var(--space-3) 0;
  border-bottom: 1px solid var(--border-default);
  background: none;
  margin: 0 0 0 0;
}

/* Spec table — clean rows, thin dividers */
.product-spec-table {
  width: 100%;
  border-collapse: collapse;
}

.product-spec-table td {
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.product-spec-table tr:last-child td {
  border-bottom: none;
}

.spec-label {
  color: var(--text-tertiary);
  font-weight: var(--weight-medium);
  width: 200px;
  padding-right: var(--space-6);
}

.spec-val {
  color: var(--text-primary);
}

/* Hover tooltips */
.product-spec-table .hover {
  cursor: help;
  position: relative;
  font-style: normal;
  border-bottom: 1px dashed var(--border-strong);
}

.product-spec-table .popup {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 10;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  min-width: 200px;
  max-width: 280px;
  box-shadow: var(--shadow-lg);
  line-height: var(--leading-relaxed);
}

.product-spec-table .hover:hover .popup {
  display: block;
}

/* ---- Pros & Cons — open, side by side ---- */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.pros-col,
.cons-col {
  padding: 0;
}

.pros-cons-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.pros-label { color: var(--success); }
.cons-label { color: var(--error); }

.pros-cons-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ---- Sidebar — no cards, just labeled text blocks ---- */
.product-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.sidebar-block {
  border: none;
  border-radius: 0;
  padding: 0;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-3);
}

.sidebar-block:first-child {
  border-top: none;
  padding-top: 0;
}

.sidebar-block--muted {
  background: none;
}

.sidebar-block-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.sidebar-block-value {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* Compat rows */
.compat-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.compat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.compat-row:last-child {
  border-bottom: none;
}

.compat-ok {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--success);
}

.compat-warn {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--warning);
}

.compat-err {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--error);
}

/* ---- Vendor section (legacy, still used by Wheel page) ---- */
.vendor-section {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-6);
}

.vendor-title {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.vendor-table {
  width: 100%;
}

.vendor-table th {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  border-bottom: 1px solid var(--border-default);
  text-align: left;
}

.vendor-table td {
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.vendor-price {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

.vendor-link {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--accent-text);
  transition: color var(--duration-normal) var(--ease-out);
}

.vendor-link:hover {
  color: var(--accent-hover);
}

.vendor-logo {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  margin-right: var(--space-2);
  border-radius: var(--radius-sm);
}

/* Hover tooltips (legacy) */
.specs-section .hover,
.vendor-section .hover {
  cursor: help;
  position: relative;
  font-style: normal;
  border-bottom: 1px dashed var(--border-strong);
}

.specs-section .popup,
.vendor-section .popup {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 10;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  min-width: 200px;
  max-width: 280px;
  box-shadow: var(--shadow-lg);
  line-height: var(--leading-relaxed);
}

.specs-section .hover:hover .popup,
.vendor-section .hover:hover .popup {
  display: block;
}

/* Legacy specs-section fallback */
.specs-section {
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-8);
}

.specs-section .specs-title {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.specs-section .specs-table {
  width: 100%;
}

.specs-section .specs-table th {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  text-align: left;
  padding: var(--space-2) var(--space-6) var(--space-2) 0;
  width: 200px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-subtle);
}

.specs-section .specs-table td {
  font-size: var(--text-sm);
  color: var(--text-primary);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.specs-section .specs-table tr:last-child th,
.specs-section .specs-table tr:last-child td {
  border-bottom: none;
}

.compatibility-section {
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-8);
}

.compatibility-title {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.compatibility-table {
  width: 100%;
}

.compatibility-table th {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  border-bottom: 1px solid var(--border-default);
  text-align: left;
}

.compatibility-table td {
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.compatibility-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.compatibility-status.compatible { color: var(--success); }
.compatibility-status.warning { color: var(--warning); }
.compatibility-status.incompatible { color: var(--error); }

/* ---- Responsive ---- */
@media (min-width: 640px) {
  .product-top {
    grid-template-columns: 300px 1fr;
  }

  .product-image-box {
    max-width: none;
    aspect-ratio: auto;
    min-height: 260px;
  }

  .product-detail-grid {
    grid-template-columns: 1fr 240px;
  }
}

@media (min-width: 1024px) {
  .product-top {
    grid-template-columns: 400px 1fr;
    gap: var(--space-10);
  }

  .product-image-box {
    min-height: 360px;
  }

  .product-name {
    font-size: var(--text-3xl);
  }

  .product-detail-grid {
    grid-template-columns: 1fr 320px;
    gap: var(--space-12);
  }
}

@media (min-width: 1280px) {
  .product-detail-grid {
    grid-template-columns: 1fr 360px;
  }

  .spec-label {
    width: 240px;
  }
}

@media (max-width: 639px) {
  .pros-cons-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .key-spec {
    min-width: 70px;
  }
}
