/* =============================================
   exploded-views.com — custom design
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
  --ev-primary:      #1e40af;
  --ev-primary-h:    #1d4ed8;
  --ev-accent:       #3b82f6;
  --ev-bg:           #f1f5f9;
  --ev-card:         #ffffff;
  --ev-text:         #0f172a;
  --ev-muted:        #64748b;
  --ev-border:       #e2e8f0;
  --ev-shadow:       0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --ev-shadow-lg:    0 8px 24px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.06);
  --ev-radius:       14px;
  --ev-radius-sm:    8px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  background: var(--ev-bg) !important;
  color: var(--ev-text) !important;
  line-height: 1.6;
}

a { color: var(--ev-accent); }
a:hover { color: var(--ev-primary); }

/* ---- Navbar ---- */
.navbar {
  background: rgba(255,255,255,.97) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ev-border) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
  padding: .75rem 0 !important;
  position: sticky !important;
  top: 0;
  z-index: 1030;
}
.navbar-brand {
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  color: var(--ev-primary) !important;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-brand img {
  height: 32px;
  width: auto;
}
.navbar-brand .ev-brand-logo {
  height: 32px;
  width: 32px;
  transition: transform .25s ease;
}
.navbar-brand:hover .ev-brand-logo {
  transform: rotate(45deg);
}
.nav-link {
  color: var(--ev-muted) !important;
  font-weight: 500 !important;
  font-size: .875rem !important;
  padding: .4rem .75rem !important;
  border-radius: 6px !important;
  transition: background .15s, color .15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--ev-primary) !important;
  background: #eff6ff !important;
}
.navbar-toggler {
  border: none !important;
  padding: .35rem;
  color: var(--ev-muted);
}
.navbar-toggler:focus { box-shadow: none !important; }
.dropdown-menu {
  border: 1px solid var(--ev-border) !important;
  border-radius: var(--ev-radius-sm) !important;
  box-shadow: var(--ev-shadow-lg) !important;
  font-size: .875rem;
}
.dropdown-item:active, .dropdown-item.active {
  background: #eff6ff !important;
  color: var(--ev-primary) !important;
}

/* ---- Page wrapper ---- */
.ev-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ---- Hero (homepage) ---- */
.ev-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 55%, #2563eb 100%);
  color: white;
  padding: 4.5rem 2rem 3.5rem;
  text-align: center;
  margin: 0 -1.25rem 2.5rem;
  border-radius: 0 0 28px 28px;
  position: relative;
  overflow: hidden;
}
.ev-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.ev-hero-logo {
  display: block;
  margin: 0 auto 1rem;
  width: 72px;
  height: 72px;
  position: relative;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .18));
  transition: transform .35s ease;
}
.ev-hero:hover .ev-hero-logo { transform: rotate(45deg); }
.ev-hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -.035em;
  margin-bottom: .75rem;
  position: relative;
}
.ev-hero p {
  font-size: 1.05rem;
  opacity: .85;
  max-width: 520px;
  margin: 0 auto 2.25rem;
  position: relative;
}
.ev-search-wrap {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}
.ev-search-wrap .form-control {
  border-radius: 50px !important;
  padding: .85rem 3rem .85rem 1.5rem !important;
  font-size: .95rem !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.18) !important;
}
.ev-search-wrap .form-control:focus {
  box-shadow: 0 4px 24px rgba(0,0,0,.25) !important;
  outline: none;
}
.ev-search-icon {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ev-muted);
  pointer-events: none;
  font-size: 1rem;
}

/* ---- Section label ---- */
.ev-section-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ev-muted);
  margin-bottom: 1.25rem;
}

/* ---- Brand grid (homepage) ---- */
.ev-brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .875rem;
}
.brand-item { display: block; }
.ev-brand-card {
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius);
  padding: 1.25rem .875rem 1rem;
  text-align: center;
  text-decoration: none !important;
  color: var(--ev-text) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 150px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  box-shadow: var(--ev-shadow);
}
.ev-brand-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ev-shadow-lg);
  border-color: #bfdbfe;
  color: var(--ev-primary) !important;
}
.ev-brand-card img {
  max-width: 150px;
  max-height: 72px;
  object-fit: contain;
}
.ev-brand-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 2px solid var(--ev-primary);
  border-radius: 50%;
  font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: .04em;
  color: var(--ev-primary);
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  text-transform: uppercase;
  box-shadow: inset 0 0 0 4px #ffffff;
}
.ev-brand-card:hover .ev-brand-logo-fallback {
  border-color: var(--ev-accent);
  color: var(--ev-accent);
}
.ev-brand-name {
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.3;
}
.ev-brand-arrow {
  font-size: .7rem;
  color: var(--ev-accent);
  font-weight: 500;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  background: transparent !important;
  padding: 1.25rem 0 0 !important;
  margin-bottom: 0;
  font-size: .82rem;
}
.breadcrumb-item a {
  color: var(--ev-accent);
  text-decoration: none;
}
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--ev-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: #cbd5e1; }

/* ---- Page header (brand/view) ---- */
.ev-page-header {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 1.5rem 0 1.5rem;
  border-bottom: 1px solid var(--ev-border);
  margin-bottom: 2rem;
}
.ev-page-header-logo {
  flex-shrink: 0;
}
.ev-page-header-logo img {
  max-height: 64px;
  max-width: 150px;
  object-fit: contain;
}
.ev-page-header h1 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 0 .25rem;
  line-height: 1.25;
}
.ev-page-header p {
  color: var(--ev-muted);
  margin: 0;
  font-size: .9rem;
}

/* ---- CTA banner ---- */
.ev-cta {
  background: linear-gradient(135deg, var(--ev-primary) 0%, #1d4ed8 100%);
  color: white;
  border-radius: var(--ev-radius);
  padding: 1.25rem 1.75rem;
  margin: 1.75rem 0;
  text-align: center;
  font-size: .9rem;
}

/* ---- Model search (brand page) ---- */
.ev-model-search-wrap {
  max-width: 460px;
  margin: 0 auto 1.5rem;
  position: relative;
}
.ev-model-search-wrap .form-control {
  border-radius: 50px !important;
  padding: .65rem 1.25rem !important;
  font-size: .9rem !important;
  border: 1px solid var(--ev-border) !important;
  box-shadow: var(--ev-shadow) !important;
}
.ev-model-search-wrap .form-control:focus {
  border-color: var(--ev-accent) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15) !important;
}

/* ---- Model grid (brand page) - notice-facile style cards ---- */
.ev-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: .75rem;
}
.model-item a {
  display: flex;
  flex-direction: column;
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: 10px;
  color: var(--ev-text);
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(30,41,59,.04);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  height: 100%;
}
.model-item a:hover {
  transform: translateY(-2px);
  border-color: var(--ev-accent);
  box-shadow: 0 8px 20px rgba(30,41,59,.10);
  color: var(--ev-text);
}
.model-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--ev-border);
}
.model-thumb {
  max-width: 80%;
  max-height: 80%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform .25s ease;
}
.model-thumb-logo {
  max-width: 55%;
  max-height: 55%;
  opacity: .85;
}
.model-item a:hover .model-thumb {
  transform: scale(1.04);
}
.model-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #cbd5e1;
}
.model-card-body {
  padding: .55rem .75rem .7rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  flex-grow: 1;
  background: #fff;
}
.model-ref {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ev-text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.model-type {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ev-primary);
}
.model-cat {
  font-size: .74rem;
  color: var(--ev-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Vue header ---- */
.ev-vue-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 1.5rem 1.5rem;
  background: #fff;
  border: 1px solid var(--ev-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(30,41,59,.04);
  margin-bottom: 1.5rem;
}
.ev-vue-img {
  flex-shrink: 0;
  width: 180px;
}
.ev-vue-img img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius);
  padding: 8px;
}
.ev-vue-meta {
  flex: 1;
  min-width: 0;
}
.ev-vue-brand-logo {
  max-height: 36px;
  max-width: 120px;
  object-fit: contain;
  margin-bottom: .75rem;
  display: block;
}
.ev-vue-meta h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.025em;
  margin-bottom: .5rem;
  line-height: 1.3;
}
.ev-vue-meta p {
  color: var(--ev-muted);
  font-size: .9rem;
  margin: 0;
}
@media (max-width: 640px) {
  .ev-vue-header { flex-direction: column; gap: 1rem; }
  .ev-vue-img { width: 100%; }
  .ev-vue-img img { width: 100%; height: auto; max-height: 220px; }
}

/* ---- Piece cards (vue page) ---- */
.piece-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 10px !important;
  background: var(--ev-card) !important;
  border: 1px solid var(--ev-border) !important;
  border-radius: var(--ev-radius-sm) !important;
  padding: .5rem !important;
  box-shadow: none !important;
  transition: border-color .13s;
}
.piece-item:hover { border-color: #bfdbfe !important; }
.piece-item .piece-image { flex: 0 0 70px; max-width: 70px; }
.piece-item .piece-image img {
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  border: 1px solid var(--ev-border);
  background: white;
  padding: 3px;
  border-radius: 6px;
  display: block;
}
.piece-item .card-body { flex: 1 1 auto; padding: .2rem 0 !important; }

/* ---- Chat box ---- */
#chatgpt-box {
  border: 1px solid var(--ev-border) !important;
  border-radius: var(--ev-radius) !important;
  box-shadow: var(--ev-shadow) !important;
}
#chatgpt-messages {
  background: var(--ev-bg) !important;
  border: 1px solid var(--ev-border) !important;
  border-radius: var(--ev-radius-sm) !important;
}

/* ---- Buttons ---- */
.btn-primary {
  background: var(--ev-primary) !important;
  border-color: var(--ev-primary) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  font-size: .875rem !important;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn-primary:hover {
  background: var(--ev-primary-h) !important;
  border-color: var(--ev-primary-h) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.btn-outline-primary {
  border-color: var(--ev-primary) !important;
  color: var(--ev-primary) !important;
  border-radius: 8px !important;
  font-size: .875rem !important;
}
.btn-outline-primary:hover,
.btn-outline-primary.active {
  background: var(--ev-primary) !important;
  border-color: var(--ev-primary) !important;
  color: white !important;
}
.btn-sm { font-size: .8rem !important; padding: .35rem .75rem !important; }

/* ---- Form controls ---- */
.form-control {
  border: 1px solid var(--ev-border) !important;
  border-radius: var(--ev-radius-sm) !important;
  font-size: .9rem;
  color: var(--ev-text);
}
.form-control:focus {
  border-color: var(--ev-accent) !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15) !important;
}

/* ---- Alerts ---- */
.alert { border-radius: var(--ev-radius-sm) !important; font-size: .9rem; }

/* ---- Card overrides ---- */
.card {
  border: 1px solid var(--ev-border) !important;
  border-radius: var(--ev-radius) !important;
  box-shadow: var(--ev-shadow) !important;
}

/* ---- Footer ---- */
.ev-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 0;
  margin-top: 4rem;
}
.ev-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.ev-footer-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: .5rem;
  letter-spacing: -.02em;
}
.ev-footer-tagline {
  font-size: .82rem;
  line-height: 1.6;
  max-width: 240px;
}
.ev-footer h6 {
  color: white !important;
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1rem;
}
.ev-footer a {
  color: #94a3b8 !important;
  text-decoration: none;
  font-size: .82rem;
  display: block;
  margin-bottom: .45rem;
  transition: color .13s;
}
.ev-footer a:hover { color: white !important; }
.ev-footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 2.5rem;
  padding: 1.25rem;
  text-align: center;
  font-size: .78rem;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Empty/muted messages ---- */
#noBrandMatch, #noModelMatch {
  color: var(--ev-muted);
  font-size: .9rem;
  text-align: center;
  margin-bottom: 2rem;
}

/* ---- Diagram tabs ---- */
#diagram-list .btn { margin-bottom: .35rem; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .ev-footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .ev-hero { padding: 2.75rem 1.25rem 2.5rem; border-radius: 0; margin: 0 -1.25rem 2rem; }
  .ev-hero-logo { width: 56px; height: 56px; margin-bottom: .75rem; }
  .ev-hero h1 { font-size: 1.65rem; }
  .ev-brand-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .625rem; }
  .ev-brand-card { min-height: 130px; }
  .ev-brand-card img { max-width: 120px; max-height: 60px; }
  .ev-brand-logo-fallback { width: 60px; height: 60px; font-size: 1.4rem; }
  .ev-footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .ev-page-header { flex-direction: column; align-items: flex-start; gap: .875rem; }
  .ev-model-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .625rem; }
  .model-ref { font-size: .8rem; padding: .5rem .5rem; }
}

/* ---- Legal pages ---- */
.ev-legal {
  max-width: 820px;
  margin: 1.5rem auto 3rem;
  padding: 2.25rem 2rem;
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius);
  box-shadow: var(--ev-shadow);
  line-height: 1.7;
}
.ev-legal h1 { font-size: 1.9rem; margin: 0 0 .75rem; color: var(--ev-primary); }
.ev-legal h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; color: var(--ev-text); }
.ev-legal h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; color: var(--ev-text); }
.ev-legal .lead { color: var(--ev-muted); font-size: 1.05rem; margin-bottom: 1.5rem; }
.ev-legal ul { padding-left: 1.25rem; }
.ev-legal table { width: 100%; font-size: .9rem; margin: .75rem 0 1.25rem; }
.ev-legal table th { background: #f1f5f9; font-weight: 600; }
.ev-legal code { background: #f1f5f9; padding: .15rem .4rem; border-radius: 4px; font-size: .85em; }
.ev-legal a { word-break: break-word; }

/* ---- Cookie consent banner ---- */
#ev-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 860px;
  background: #ffffff;
  color: var(--ev-text);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
  padding: 1.1rem 1.25rem;
  z-index: 2000;
  font-size: .92rem;
  line-height: 1.5;
}
#ev-cookie-banner[hidden] { display: none; }
#ev-cookie-banner h2 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
  color: var(--ev-primary);
}
#ev-cookie-banner p { margin: 0 0 .75rem; color: var(--ev-text); }
#ev-cookie-banner .ev-cc-actions {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
}
#ev-cookie-banner .ev-cc-actions .btn { white-space: nowrap; }
#ev-cookie-banner details { margin-top: .75rem; }
#ev-cookie-banner summary {
  cursor: pointer;
  color: var(--ev-primary);
  font-weight: 500;
  user-select: none;
}
#ev-cookie-banner .ev-cc-cat {
  border-top: 1px solid var(--ev-border);
  padding: .65rem 0;
  display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem;
  align-items: start;
}
#ev-cookie-banner .ev-cc-cat:last-of-type { border-bottom: 1px solid var(--ev-border); margin-bottom: .75rem; }
#ev-cookie-banner .ev-cc-cat strong { display: block; margin-bottom: .15rem; }
#ev-cookie-banner .ev-cc-cat small { color: var(--ev-muted); }
#ev-cookie-banner .ev-cc-cat input[type="checkbox"] {
  width: 2.25rem; height: 1.25rem; appearance: none;
  background: #cbd5e1; border-radius: 999px; position: relative;
  transition: background .15s; cursor: pointer;
}
#ev-cookie-banner .ev-cc-cat input[type="checkbox"]:checked { background: var(--ev-accent); }
#ev-cookie-banner .ev-cc-cat input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 1rem; height: 1rem; background: #fff; border-radius: 50%;
  transition: transform .15s;
}
#ev-cookie-banner .ev-cc-cat input[type="checkbox"]:checked::after { transform: translateX(1rem); }
#ev-cookie-banner .ev-cc-cat input[type="checkbox"][disabled] { opacity: .6; cursor: not-allowed; }
#ev-cookie-banner .ev-cc-more { margin-top: .5rem; font-size: .85rem; }
@media (max-width: 640px) {
  #ev-cookie-banner { bottom: 0; border-radius: 12px 12px 0 0; width: 100%; left: 0; transform: none; }
  #ev-cookie-banner .ev-cc-actions .btn { flex: 1 1 auto; }
}
