/* ============================================================
   FUEL GUARD X - 3D Product Explorer Page
   model.css
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.model-hero {
  padding-top: clamp(132px, calc(5vw + 64px), 172px); /* navbar + product-subnav */
}

.model-canvas-wrap {
  position: relative;
  width: 100%;
  height: clamp(300px, 70vh, 680px);
  min-height: clamp(280px, 40vw, 500px);
  max-height: 680px;
  /* Scene background: deep dark with subtle warm-orange glow at center + cool blue accent */
  background:
    radial-gradient(ellipse at 50% 48%, rgba(217, 101, 21, 0.13) 0%, transparent 52%),
    radial-gradient(ellipse at 20% 70%, rgba(0, 50, 140, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 20%, rgba(80, 110, 200, 0.06) 0%, transparent 40%),
    linear-gradient(180deg, #080e18 0%, #0a1120 100%);
  overflow: hidden;
}

[data-theme="dark"] .model-canvas-wrap {
  background:
    radial-gradient(ellipse at 50% 48%, rgba(217, 101, 21, 0.16) 0%, transparent 52%),
    radial-gradient(ellipse at 20% 70%, rgba(0, 50, 140, 0.10) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 20%, rgba(80, 110, 200, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, #0a1628 0%, #0c1830 100%);
  border-bottom: 1px solid rgba(43, 94, 232, 0.15);
}

[data-theme="light"] .model-canvas-wrap {
  background:
    radial-gradient(ellipse at 50% 48%, rgba(200, 80, 15, 0.09) 0%, transparent 52%),
    radial-gradient(ellipse at 20% 70%, rgba(26, 77, 208, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 20%, rgba(80, 110, 200, 0.05) 0%, transparent 40%),
    linear-gradient(180deg, #eee8e0 0%, #f2ece4 100%);
  border-bottom: 1px solid rgba(200, 80, 15, 0.12);
}

[data-theme="light"] .model-canvas-product-name {
  color: #0f1a2e;
}

[data-theme="light"] .model-canvas-hint {
  color: rgba(15, 26, 46, 0.55);
}

#product-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: auto; /* page scrolls by default; none only in interact mode */
}

.model-canvas-wrap.interact-active #product-canvas {
  touch-action: none;
}

.model-canvas-wrap.interact-active {
  box-shadow: 0 0 0 2px rgba(217, 101, 21, 0.45), 0 20px 56px rgba(0, 0, 0, 0.40);
}

/* ── Interact overlay ────────────────────────────────────── */
.model-interact-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  pointer-events: none;
}

.model-interact-btn {
  pointer-events: all;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: rgba(8, 16, 30, 0.68);
  border: 1px solid rgba(217, 101, 21, 0.42);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.model-interact-btn:hover {
  background: rgba(217, 101, 21, 0.22);
  border-color: rgba(217, 101, 21, 0.70);
  color: #fff;
}

.model-interact-btn svg { flex-shrink: 0; }

.model-canvas-wrap.interact-active .model-interact-btn {
  background: rgba(217, 101, 21, 0.32);
  border-color: rgba(217, 101, 21, 0.80);
  color: #fff;
}

.model-canvas-hint {
  transition: opacity 0.3s ease;
}

.model-canvas-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 1.5rem 1.5rem;
}

.model-canvas-title {
  text-align: center;
}

.model-canvas-product-name {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #F2F8FF;
  line-height: 1;
}

.model-canvas-product-name .name-accent {
  background: linear-gradient(125deg, #ED7B2E 0%, #D96515 50%, #B84A08 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.model-canvas-subtitle {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #E88040;
}

.model-canvas-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.model-canvas-hint svg,
.model-canvas-hint i {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

/* ── Stats bar — mobile-first ──────────────────────────────── */
.model-stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
}

@media (min-width: 640px) {
  .model-stats-bar { grid-template-columns: repeat(4, 1fr); }
}

.model-stat {
  padding: clamp(1rem, 2vw, 1.375rem) clamp(1rem, 2vw, 1.5rem);
  text-align: center;
  border-right: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

.model-stat:last-child { border-right: none; }

.model-stat:hover { background-color: var(--bg-card-hover); }

.model-stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-orange);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.model-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
}

/* ── Real Device Showcase — mobile-first ─────────────────── */
.device-showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .device-showcase-grid { grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 4vw, 4.5rem); }
}

.device-photo-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-orange);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

[data-theme="light"] .device-photo-frame {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
}

.device-photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.device-photo-badge {
  position: absolute;
  bottom: 0.875rem;
  left: 0.875rem;
  right: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 18, 36, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
}

[data-theme="light"] .device-photo-badge {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.08);
}

.device-badge-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-heading);
}

.device-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
  animation: devicePulse 2s ease-in-out infinite;
}

@keyframes devicePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.device-badge-right {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.device-showcase-info h2 { margin-bottom: 1rem; }
.device-showcase-info > p { margin-bottom: 1.75rem; }

.device-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
}

.device-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.125rem 1.25rem;
  background: var(--bg-card);
}

.device-info-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: -0.02em;
  line-height: 1;
}

[data-theme="light"] .device-info-value { color: var(--orange); }

.device-info-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

/* ── Feature Highlights — mobile-first ───────────────────── */
.model-highlights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.25rem);
}

@media (min-width: 640px) {
  .model-highlights-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .model-highlights-grid { grid-template-columns: repeat(3, 1fr); }
}

.model-highlight-card {
  padding: 2rem 1.75rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.model-highlight-card:hover {
  border-color: var(--border-orange);
  box-shadow: 0 8px 32px rgba(217, 101, 21, 0.08);
}

.model-highlight-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background-color: var(--accent-orange-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  margin-bottom: 1.25rem;
}

.model-highlight-icon svg,
.model-highlight-icon i {
  width: 26px;
  height: 26px;
  stroke-width: 2px;
}

.model-highlight-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.model-highlight-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Specs Section — mobile-first ────────────────────────── */
.model-specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 2rem);
}

@media (min-width: 640px) {
  .model-specs-grid { grid-template-columns: repeat(2, 1fr); }
}

.model-specs-block {
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.model-specs-block-header {
  padding: 1rem 1.5rem;
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.model-specs-block-header svg,
.model-specs-block-header i {
  width: 18px;
  height: 18px;
  color: var(--accent-orange);
  stroke-width: 2px;
}

.model-specs-block-header span {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-heading);
}

.model-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

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

.spec-key {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  min-width: 0;
  flex-shrink: 0;
}

.spec-val {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading);
  text-align: right;
}

.spec-val.spec-badge {
  background-color: var(--accent-orange-glow);
  color: var(--accent-orange);
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

/* ── CTA ──────────────────────────────────────────────────── */
.model-cta {
  text-align: center;
  padding: clamp(2.5rem, 5vw, 5.5rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.model-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(217, 101, 21, 0.07) 0%, transparent 60%);
  pointer-events: none;
}

.model-cta h2 {
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.model-cta p {
  max-width: 520px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}

.model-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ── WebGL fallback ───────────────────────────────────────── */
.model-canvas-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background-color: var(--bg-secondary);
}

.model-canvas-fallback img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 3rem;
}

/* ── Responsive ───────────────────────────────────────────── */

/* Stats bar border fixes for 2-col layout on mobile */
.model-stat:nth-child(2) { border-right: none; }
.model-stat:nth-child(3) { border-top: 1px solid var(--border-subtle); }
.model-stat:nth-child(4) { border-top: 1px solid var(--border-subtle); border-right: none; }

@media (min-width: 640px) {
  .model-stat:nth-child(2) { border-right: 1px solid var(--border-subtle); }
  .model-stat:nth-child(3) { border-top: none; }
  .model-stat:nth-child(4) { border-top: none; border-right: none; }
}

@media (max-width: 768px) {
  .model-canvas-overlay { padding: 1.5rem 1rem 1rem; }
  .model-highlights-grid { max-width: min(480px, 100%); margin: 0 auto; }
}

@media (max-width: 480px) {
  .model-stat-value { font-size: 1.25rem; }
  .model-cta-buttons {
    flex-direction: column;
    max-width: min(340px, 100%);
    margin-left: auto;
    margin-right: auto;
  }
  .model-cta-buttons .btn { width: 100%; }
  .model-highlight-card { padding: clamp(1.25rem, 3vw, 1.75rem); }
}

@media (hover: none) {
  .model-highlight-card:hover { transform: none; box-shadow: none; border-color: var(--border-subtle); }
  .model-stat:hover { background-color: transparent; }
}
