/* =========================================================
   GOparts.mn — Дэд хуудсуудын нийтлэг загвар (pages.css)
   Хуудасны толгой, breadcrumb, галерей, lightbox, CTA.
   about, news, news-detail хуудсууд ашиглана.
   ========================================================= */

/* ---------- Хуудасны толгой ---------- */
.page-hero { padding-top: clamp(20px, 3vw, 36px); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--gray-600); }
.breadcrumb a { color: var(--gray-600); transition: color .2s var(--ease); }
.breadcrumb a:hover { color: var(--black); }
.breadcrumb [aria-current] { color: var(--black); font-weight: 600; }
.page-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px 56px; align-items: end;
  margin-top: clamp(24px, 4vw, 48px);
}
.page-title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(36px, 5vw, 64px); line-height: 1.02; letter-spacing: .2px;
}
.page-lead { font-size: 17px; line-height: 1.65; color: var(--gray-600); max-width: 58ch; }
.page-hero-media {
  width: 100%; max-width: calc(var(--container) + var(--gutter) * 2);
  margin: clamp(28px, 4vw, 48px) auto 0; padding-inline: var(--gutter);
}
.page-hero-media img { width: 100%; aspect-ratio: 1180 / 490; object-fit: cover; border-radius: var(--radius); }

.section-note { margin-top: 6px; font-size: 14px; color: var(--gray-600); }

/* ---------- Шоурумын галерей ---------- */
.showroom { padding-block: var(--section-y); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(160px, 18vw, 240px); gap: 12px; }
.g-wide { grid-column: span 2; }
.g-item button { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius); background: var(--gray-200); cursor: zoom-in; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s var(--ease); }
.g-item button::after {
  content: ""; position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317150F' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.2-4.2M11 8.5v5M8.5 11h5'/%3E%3C/svg%3E") center / 20px no-repeat;
  opacity: 0; transform: scale(.7); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.g-item button:hover img, .g-item button:focus-visible img { transform: scale(1.05); }
.g-item button:hover::after, .g-item button:focus-visible::after { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center;
  padding: 24px 8px; background: rgba(17, 15, 11, .92);
  opacity: 0; transition: opacity .25s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lb-figure { display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 100%; }
.lb-img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 4px; transform: scale(.97); transition: transform .3s var(--ease); }
.lightbox.is-open .lb-img { transform: none; }
.lb-cap { color: rgba(255, 255, 255, .8); font-size: 14px; text-align: center; }
.lb-nav, .lb-close { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: rgba(255, 255, 255, .1); transition: background-color .2s var(--ease), color .2s var(--ease); }
.lb-nav:hover, .lb-close:hover { background: var(--yellow); color: var(--black); }
.lb-nav svg, .lb-close svg { width: 22px; height: 22px; }
.lb-prev { justify-self: center; }
.lb-next { justify-self: center; }
.lb-close { position: absolute; top: 16px; right: 16px; }

/* ---------- CTA ---------- */
.cta-band { background: var(--black); color: var(--white); padding-block: clamp(40px, 6vw, 64px); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.cta-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.05; margin-bottom: 10px; }
.cta-band p { color: rgba(255, 255, 255, .72); max-width: 54ch; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.cta-phone { display: flex; flex-direction: column; line-height: 1.2; }
.cta-phone span { font-size: 12px; color: rgba(255, 255, 255, .6); }
.cta-phone strong { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: .5px; color: var(--yellow); white-space: nowrap; }

@media (max-width: 991px) {
  .page-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 600px) {
  .page-hero-media { padding-inline: 0; }
  .page-hero-media img { border-radius: 0; aspect-ratio: 4 / 3; }
  .gallery { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: 140px; }
  .g-wide { grid-column: span 2; }
  .g-item.g-wide:last-child { grid-column: auto; }
  .lightbox { grid-template-columns: 48px minmax(0, 1fr) 48px; padding-inline: 0; }
  .lb-nav { width: 40px; height: 40px; }
}
