*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

:root {
  --accent:       #f5b120;
  --accent-hover: #efa400;
  --text:         #3a3a3a;
  --text-light:   #777;
  --bg:           #f7f6f5;
  --white:        #fff;
  --border:       #e8e5e0;
  --header-h:     4rem;
}

body {
  font-family: "Roboto", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: "Playfair Display", serif;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* ── HEADER ─────────────────────────────────── */
.model-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
  transition: color 0.2s;
}
.back-btn:hover { color: var(--accent); }

.header-logo img {
  height: 2.2rem;
  display: block;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  transition: color 0.2s;
}
.header-cta:hover { color: var(--accent-hover); }

/* ── MAIN / SECTION ─────────────────────────── */
main { flex: 1; }

/* ── NOT FOUND ──────────────────────────────── */
.not-found {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 60vh;
  text-align: center;
  padding: 4rem 2rem;
}
.not-found i  { font-size: 3rem; color: var(--accent); }
.not-found h2 { font-size: 2rem; }
.not-found p  { color: var(--text-light); }

/* ── MODEL HERO ─────────────────────────────── */
.model-hero {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 2rem 3rem;
}

/* ── INTRO: badge + title ───────────────────── */
.model-intro {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.model-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-light);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  white-space: nowrap;
}

.model-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--text);
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1;
}

.model-divider {
  width: 2.5rem;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── BODY: image | info ─────────────────────── */
.model-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── IMAGE COLUMN ───────────────────────────── */
.model-img-col {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  /* width constrains the image, aspect-ratio then sets height naturally */
  width: clamp(240px, 36vw, 390px);
}

.model-main-img-wrap {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
  background: var(--white);
  cursor: zoom-in;
  position: relative;
}
.model-main-img-wrap::after {
  content: "\f00e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  bottom: 0.75rem;
  right: 0.9rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.model-main-img-wrap:hover::after { opacity: 1; }

.model-main-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  object-position: center top;
  transition: transform 0.35s ease;
}
.model-main-img-wrap:hover img { transform: scale(1.02); }

/* ── THUMBNAIL NAV ──────────────────────────── */
.thumb-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.thumb-arrow {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  transition: background 0.15s, color 0.15s;
}
.thumb-arrow:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.thumb-arrow:disabled { opacity: 0.25; cursor: default; pointer-events: none; }

.thumb-strip {
  display: flex;
  gap: 0.4rem;
  flex: 1;
  width: 0; /* force flex: 1 to actually constrain */
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.thumb-strip::-webkit-scrollbar { display: none; }

.thumb-btn {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: none;
  opacity: 0.6;
  transition: border-color 0.18s, opacity 0.18s;
}
.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.thumb-btn:hover { opacity: 0.9; border-color: var(--border); }
.thumb-btn.active { border-color: var(--accent); opacity: 1; }

.thumb-slot-empty {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border: 2px dashed #d5d0ca;
  border-radius: 8px;
  background: #faf9f7;
  display: grid;
  place-items: center;
  color: #ccc;
  font-size: 1.1rem;
}
.thumb-slot-empty::after { content: "+"; }

/* ── INFO COLUMN ────────────────────────────── */
.model-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  padding-top: 0.25rem;
}

/* description first */
.model-description {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.8;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  background: rgba(245, 177, 32, 0.04);
  padding: 1rem 1rem 1rem 1.1rem;
  border-radius: 0 8px 8px 0;
}

/* specs table */
.model-specs {
  border-collapse: collapse;
  width: 100%;
}
.model-specs tr { border-bottom: 1px solid var(--border); }
.model-specs tr:first-child { border-top: 1px solid var(--border); }
.model-specs td { padding: 0.7rem 0.5rem; font-size: 0.9rem; }
.spec-label {
  color: var(--text-light);
  font-weight: 400;
  width: 45%;
  padding-left: 0 !important;
}
.spec-val { color: var(--text); font-weight: 600; }

/* CTA */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 2rem;
  background: var(--accent);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 10px;
  transition: background 0.2s, transform 0.15s;
  width: 100%;
  margin-top: 0.5rem;
}
.cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* ── MODEL NAV ──────────────────────────────── */
.model-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 2rem;
  border-top: 1px solid var(--border);
}

.model-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  transition: color 0.2s;
}
.model-nav-btn:hover { color: var(--accent); }
.model-nav-btn--right { flex-direction: row-reverse; }

.model-nav-all {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.model-nav-all:hover { color: var(--accent); }

/* ── FOOTER ─────────────────────────────────── */
.model-footer {
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-light);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* ── LIGHTBOX ───────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
}
.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  user-select: none;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.15s;
}
.lightbox-close:hover { color: white; }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 1rem 0.9rem;
  border-radius: 6px;
  transition: background 0.15s;
  z-index: 1001;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 960px) {
  .model-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .model-img-col {
    position: static;
    width: clamp(240px, 70%, 400px);
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .model-header { padding: 0 1rem; }
  .back-btn span,
  .header-cta span { display: none; }
  .header-logo img { height: 1.8rem; }

  .model-hero { padding: 1.25rem 1rem 2rem; }
  .model-intro { gap: 0.8rem; margin-bottom: 1.5rem; }
  .model-title { font-size: 1.9rem; letter-spacing: 2px; }

  .model-img-col {
    width: 100%;
  }

  .thumb-btn,
  .thumb-slot-empty { width: 54px; height: 54px; }

  .model-nav { padding: 1.25rem 1rem; }
  .model-nav-btn span { display: none; }

  .model-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }
  .footer-links { flex-direction: column; gap: 0.5rem; }
}
