/* ============================================
   Pavesi Oven Configurator — Stylesheet
   ============================================ */

:root {
  --color-bg: #faf9f7;
  --color-surface: #ffffff;
  --color-surface-2: #f1efe8;
  --color-text: #1a1a1a;
  --color-text-muted: #5f5e5a;
  --color-text-faint: #888780;
  --color-border: rgba(0, 0, 0, 0.12);
  --color-border-strong: rgba(0, 0, 0, 0.25);
  --color-accent: #c8102e;
  --color-accent-bg: #fceaec;
  --color-accent-text: #8a0a1f;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1a1a;
    --color-surface: #242424;
    --color-surface-2: #2c2c2a;
    --color-text: #f5f5f5;
    --color-text-muted: #b4b2a9;
    --color-text-faint: #888780;
    --color-border: rgba(255, 255, 255, 0.12);
    --color-border-strong: rgba(255, 255, 255, 0.25);
    --color-accent: #e84a5f;
    --color-accent-bg: #3a1820;
    --color-accent-text: #f4a5b0;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   Layout
   ============================================ */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-xl);
}

.page-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.brand-mark {
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--space-lg);
  align-items: start;
}

@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.main-col {
  min-width: 0;
}

.side-col {
  min-width: 0;
  position: sticky;
  top: var(--space-lg);
}

@media (max-width: 800px) {
  .side-col {
    position: static;
  }
}

.page-footer {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-faint);
  text-align: center;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl);
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

.hero-preview {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  overflow: hidden;
}

.oven-photo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.hero-text {
  min-width: 0;
  flex: 1;
}

@media (max-width: 600px) {
  .hero {
    flex-direction: column;
    text-align: center;
    align-items: stretch;
  }
  .hero-preview {
    width: 100%;
    height: 200px;
  }
}

.eyebrow {
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.hero-title {
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 var(--space-xs);
}

.hero-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-md);
}

/* ----- Selection chips (live snapshot of choices) ----- */

.selection-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-md);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
}

.chip-icon {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 11px;
}

/* ============================================
   Steps
   ============================================ */

.step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.step-h {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 var(--space-md);
  display: flex;
  align-items: center;
  color: var(--color-text);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-surface-2);
  font-size: 12px;
  font-weight: 500;
  margin-right: var(--space-sm);
  color: var(--color-text-muted);
}

.hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-faint);
  font-weight: 400;
}

.note {
  font-size: 12px;
  color: var(--color-text-faint);
  margin: var(--space-sm) 0 0;
  line-height: 1.5;
}

/* ============================================
   Grids
   ============================================ */

.grid {
  display: grid;
  gap: 6px;
}

.grid-series { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.grid-models { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.grid-fuel { display: flex; flex-wrap: wrap; }
.grid-version { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid-finish { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ============================================
   Pills (selectable options)
   ============================================ */

.pill {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  text-align: left;
  transition: all 0.12s ease;
  font-family: inherit;
}

.pill:hover {
  border-color: var(--color-border-strong);
}

.pill.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

.pill .ttl {
  font-weight: 500;
}

.pill .sub {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 2px;
}

/* ============================================
   Accessories
   ============================================ */

.accessory-list {
  display: flex;
  flex-direction: column;
}

.acc-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  font-size: 13px;
  cursor: pointer;
}

.acc-row:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
}

.acc-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.acc-name {
  flex: 1;
}

.acc-price {
  color: var(--color-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

/* ============================================
   Summary panel
   ============================================ */

.summary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.summary-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 var(--space-lg);
}

.line-items {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  align-items: baseline;
  padding: 4px 0;
}

.summary-line .lbl {
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.summary-line .val {
  font-size: 13px;
  white-space: nowrap;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.summary-total span:first-child {
  font-size: 14px;
  font-weight: 500;
}

.summary-total span:last-child {
  font-size: 22px;
  font-weight: 500;
  color: var(--color-accent);
}

.btn-primary {
  width: 100%;
  padding: 12px;
  margin-top: var(--space-lg);
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.12s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:active {
  transform: scale(0.98);
}

.summary-note {
  font-size: 11px;
  color: var(--color-text-faint);
  margin: var(--space-md) 0 0;
  line-height: 1.4;
}
