@import "common.css";

/* ── NAV BACK ── */
.nav-back {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.nav-back:hover { color: var(--green); }
.nav-back svg { width: 16px; height: 16px; fill: currentColor; }

/* ── PAGE HEADER ── */
.page-header {
  padding: 48px 20px 32px;
  max-width: 680px;
  margin: 0 auto;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.page-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1.1;
  color: #1a1d1b;
  margin-bottom: 12px;
}

.page-title span { color: var(--green); }

.page-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
}

/* ── PRODUCT DETAIL CARD ── */
.product-section {
  max-width: 680px;
  margin: 0 auto 48px;
  padding: 0 20px;
}

.product-detail-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.product-detail-card:hover {
  border-color: rgba(0,166,81,0.35);
  box-shadow: 0 4px 24px rgba(0,166,81,0.10);
}

/* Image gallery with colour switcher */
.gallery-wrap {
  position: relative;
  background: var(--surface);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-main {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s;
}

.gallery-main.fading { opacity: 0; }

/* Colour swatch row */
.colour-row {
  position: absolute;
  bottom: 14px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.colour-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.colour-swatch:hover { transform: scale(1.1); }
.colour-swatch.active { border-color: var(--green); }

/* Thumbnail strip */
.thumb-strip {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--card-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.thumb-strip::-webkit-scrollbar { display: none; }

.thumb {
  width: 62px; height: 48px;
  object-fit: contain;
  border-radius: 6px;
  border: 1.5px solid var(--card-border);
  background: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s;
  padding: 4px;
}

.thumb.active, .thumb:hover { border-color: var(--green); }

/* Product body */
.product-body {
  padding: 24px 20px;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.product-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 24px;
  color: #1a1d1b;
  margin: 0;
}

.product-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(0,166,81,0.08);
  border: 1px solid rgba(0,166,81,0.22);
  color: var(--green);
}

.product-tagline {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Spec grid */
.spec-divider {
  height: 1px;
  background: var(--card-border);
  margin: 0 0 20px;
}

.spec-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.spec-item {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: all 0.25s ease;
}

.spec-item-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.spec-item-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  font-family: 'Montserrat', sans-serif;
}

.spec-item-value-small {
  font-size: 13px;
}

.spec-item-unit {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 2px;
}

/* Accordion specs */
.spec-accordion {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
  transition: all 0.25s ease;
}

.spec-accordion-item {
  border-bottom: 1px solid var(--card-border);
}

.spec-accordion-item:last-child { border-bottom: none; }

.spec-accordion-btn {
  width: 100%;
  background: var(--surface);
  border: none;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  transition: all 0.25s ease;
}

.spec-accordion-btn:hover {
  background: rgba(0,166,81,0.05);
}

.spec-accordion-btn svg {
  width: 16px; height: 16px;
  fill: var(--text-muted);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.spec-accordion-btn.open svg { transform: rotate(180deg); }

.spec-accordion-panel {
  display: none;
  padding: 0 16px 14px;
  background: var(--card);
}

.spec-accordion-panel.open { display: block; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.spec-table tr {
  border-bottom: 1px solid var(--card-border);
}

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

.spec-table td {
  padding: 9px 0;
  vertical-align: top;
  line-height: 1.4;
}

.spec-table td:first-child {
  color: var(--text-muted);
  font-weight: 600;
  width: 42%;
  padding-right: 12px;
}

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

/* CTA row */
.cta-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

/* Section divider */
.divider {
  height: 1px;
  background: var(--card-border);
  max-width: 640px;
  margin: 0 auto 48px;
}

@media (min-width: 480px) {
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
}