/**
 * OPEX product page — gallery, specs, buy CTA
 */
.product {
  display: grid;
  gap: var(--opex-space-8);
}

@media (min-width: 1024px) {
  .product {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
  }
}

.product__gallery {
  background: var(--opex-surface);
  border: 1px solid var(--opex-border);
  border-radius: var(--opex-radius-lg);
  padding: var(--opex-space-6);
}

.product__main-image {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #fafaf8;
  border-radius: var(--opex-radius-md);
}

.product__main-image img {
  max-height: 100%;
  object-fit: contain;
}

.product__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--opex-space-2);
  margin-top: var(--opex-space-4);
}

.product__thumb {
  width: 64px;
  height: 64px;
  border: 1px solid var(--opex-border);
  border-radius: var(--opex-radius-sm);
  background: #fafaf8;
  padding: 4px;
  opacity: 0.85;
}

.product__thumb.is-active,
.product__thumb:hover {
  border-color: var(--opex-black);
  opacity: 1;
}

.product__info {
  display: flex;
  flex-direction: column;
  gap: var(--opex-space-4);
}

.product__brand {
  font-size: var(--opex-text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--opex-muted);
}

.product__brand a:hover {
  color: var(--opex-black);
}

.product__title {
  font-size: var(--opex-text-3xl);
}

.product__sku {
  font-size: var(--opex-text-sm);
  color: var(--opex-muted);
}

.product__sku code {
  font-family: var(--opex-font-mono);
  font-size: 0.85em;
}

.product__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--opex-space-2);
}

.product__buybox {
  margin-top: var(--opex-space-2);
  padding: var(--opex-space-5);
  background: var(--opex-surface);
  border: 1px solid var(--opex-border);
  border-radius: var(--opex-radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--opex-space-4);
}

.product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--opex-space-2);
}

.product__actions .btn--primary {
  flex: 1;
  min-width: 200px;
}

.product__retailer-note {
  font-size: var(--opex-text-xs);
  color: var(--opex-muted);
  line-height: 1.45;
}

.product__meta-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--opex-space-2);
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--opex-border);
  font-size: var(--opex-text-sm);
}

.product__meta-row dt {
  color: var(--opex-muted);
}

.product__meta-row dd {
  margin: 0;
  font-weight: 500;
}

/* Specs table */
.specs {
  margin-top: var(--opex-space-10);
}

.specs__title {
  font-size: var(--opex-text-2xl);
  margin-bottom: var(--opex-space-4);
}

.specs__table {
  width: 100%;
  background: var(--opex-surface);
  border: 1px solid var(--opex-border);
  border-radius: var(--opex-radius-md);
  overflow: hidden;
}

.specs__table tr:nth-child(even) {
  background: #fafaf8;
}

.specs__table th,
.specs__table td {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: var(--opex-text-sm);
  border-bottom: 1px solid var(--opex-border);
  vertical-align: top;
}

.specs__table th {
  width: 38%;
  font-weight: 500;
  color: var(--opex-muted);
}

.specs__table tr:last-child th,
.specs__table tr:last-child td {
  border-bottom: 0;
}

/* Related products */
.related {
  margin-top: var(--opex-space-12);
}

.related__title {
  font-size: var(--opex-text-2xl);
  margin-bottom: var(--opex-space-5);
}

/* Compare table */
.compare-table {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--opex-border);
  border-radius: var(--opex-radius-md);
  background: var(--opex-surface);
}

.compare-table table {
  width: 100%;
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--opex-border);
  font-size: var(--opex-text-sm);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  background: var(--opex-bg);
  font-weight: 600;
}

.compare-table tbody th {
  color: var(--opex-muted);
  font-weight: 500;
  width: 180px;
}
