:root {
  --amber-soft: #fff5db;
  --charcoal: #20252a;
  --surface-raised: #fff;
  --radius-sm: 0.35rem;
  --radius-md: 0.65rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 6px 18px rgb(16 19 22 / 8%);
  --shadow-md: 0 16px 40px rgb(16 19 22 / 13%);
  --focus-ring: 0 0 0 0.22rem rgb(245 158 11 / 32%);
  --mobile-actions-height: 4.25rem;
}
body { line-height: 1.55; text-rendering: optimizeLegibility; }
html, body { max-width: 100%; overflow-x: clip; }
img, svg, video { max-width: 100%; }
button, input, select, textarea { font: inherit; }
p, li, td, th, label, a { overflow-wrap: anywhere; }

/* Controls */
.btn {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  line-height: 1.2;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled, .btn.disabled { transform: none; opacity: 0.55; pointer-events: none; }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus,
button:focus-visible, a:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--focus-ring);
  border-color: var(--amber-dark);
}
.form-control, .form-select {
  min-height: 2.8rem;
  border-color: #b9c0c6;
  border-radius: var(--radius-sm);
  background-color: #fff;
}
textarea.form-control { min-height: 7rem; resize: vertical; }
.form-label { color: #30363b; font-weight: 700; margin-bottom: 0.4rem; }
.form-check { min-height: 1.75rem; }
.form-check-input { width: 1.15rem; height: 1.15rem; border-color: #78828a; }
.form-check-input:checked { background-color: var(--amber-dark); border-color: var(--amber-dark); }
.form-check-label { padding-left: 0.25rem; }

/* Cards, badges, tables and feedback */
.service-card, .inventory-card, .vehicle-card, .sale-card, .search-group-results article {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.inventory-card:hover, .vehicle-card:hover, .sale-card:hover, .service-card:hover {
  border-color: #c5cbd0;
  box-shadow: var(--shadow-md);
}
.vehicle-card { border-top: 4px solid var(--charcoal); }
.sale-card { border-top: 4px solid var(--amber); }
.badge, .sale-badge { white-space: normal; text-align: left; line-height: 1.25; }
.price, .sale-price { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.table-responsive { border: 1px solid var(--border); border-radius: var(--radius-md); }
.table { margin: 0; --bs-table-striped-bg: #f6f7f8; }
.table > :not(caption) > * > * { padding: 0.85rem; vertical-align: middle; }
.table thead th { background: var(--ink); color: #fff; border: 0; white-space: nowrap; }
.alert { border: 0; border-left: 4px solid currentColor; border-radius: var(--radius-sm); }
.empty-state { background: rgb(255 255 255 / 72%); border-radius: var(--radius-md); }
.breadcrumbs, .sale-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
  color: var(--steel);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}
.breadcrumbs a, .sale-breadcrumb a { color: #394047; text-underline-offset: 0.2em; }
.pagination, .sale-pagination, .search-pagination { flex-wrap: wrap; }
.page-link { color: var(--ink); min-width: 2.7rem; min-height: 2.7rem; display: grid; place-items: center; }
.page-link.active, .active > .page-link { background: var(--ink); border-color: var(--ink); }
.nav-tabs { border-bottom-color: #aeb6bd; gap: 0.25rem; }
.nav-tabs .nav-link { color: var(--ink); font-weight: 700; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.nav-tabs .nav-link.active { border-top: 3px solid var(--amber); }
.app-toast {
  width: min(23rem, calc(100vw - 2rem));
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  animation: toast-in 180ms ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(0.5rem); } }

/* Header, footer and surfaces */
.site-nav { box-shadow: 0 6px 18px rgb(0 0 0 / 18%); }
.site-nav .navbar-brand { min-width: 0; }
.site-nav .navbar-brand span:last-child { overflow-wrap: normal; }
.site-nav .nav-link { border-radius: var(--radius-sm); padding-inline: 0.65rem; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { background: rgb(255 255 255 / 5%); }
.offcanvas { --bs-offcanvas-width: min(88vw, 22rem); }
.offcanvas-body { overflow-y: auto; }
.site-footer a { color: #d9dee2; text-decoration-color: #667078; text-underline-offset: 0.2em; }
.site-footer a:hover { color: var(--amber); }
.prose { font-size: 1.03rem; }
.prose h2, .prose h3 { margin-top: 2.25rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.filters, #part-request, #contact-form { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.search-panel.row { margin-right: 0; margin-left: 0; }
.stepper span { border-radius: 1rem; }

/* Galleries and skeletons */
.detail-gallery-main, .gallery-main, .gallery-main img { border-radius: var(--radius-md); }
.gallery-main { overflow: hidden; }
.gallery-main img, .detail-gallery-main { max-height: 46rem; }
.gallery-thumbs { overflow-x: auto; scrollbar-width: thin; padding-bottom: 0.25rem; }
.gallery-thumbs button { border-radius: var(--radius-sm); overflow: hidden; min-width: 4rem; }
.gallery-thumbs button:hover, .gallery-thumbs button:focus-visible { border-color: var(--amber); }
.skeleton { border-radius: var(--radius-md); }

/* Fixed modal shell: only the body scrolls on short screens. */
.modal { padding: 0.75rem !important; }
.modal-dialog {
  min-height: calc(100% - 1.5rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.modal-content {
  width: 100%;
  max-height: calc(100dvh - 1.5rem);
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgb(0 0 0 / 36%);
}
.modal-header, .modal-footer { flex: 0 0 auto; background: #fff; }
.modal-body { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }

/* Native dialogs and filter drawers use the same fixed-shell behavior. */
.sale-dialog[open] {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(90dvh, 56rem);
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.sale-dialog .dialog-close-row { margin: 0; }
.sale-dialog-body, .lead-dialog > form, #mobile-sale-filters {
  overflow-y: auto;
  min-height: 0;
  padding-top: 1rem;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.lightbox[open] { display: block; }
.lightbox > img { max-height: calc(90dvh - 4rem); }

/* Requested viewport quality gates: 1920, 1440, 1280, 1024, 768 and phones. */
@media (min-width: 1440px) {
  .container { max-width: 1320px; }
  .hero .container { max-width: 1400px; }
}
@media (min-width: 1920px) {
  .container { max-width: 1500px; }
  .hero { min-height: 720px; }
  .sale-results-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1279px) {
  .section { padding-block: 4.25rem; }
  .site-nav .nav-link { padding-inline: 0.45rem; font-size: 0.92rem; }
}
@media (max-width: 1023px) {
  .filters, .fulfillment-card { position: static; }
  .hero { min-height: 620px; }
  .site-footer { padding-top: 3.5rem; }
}
@media (max-width: 767px) {
  body { padding-bottom: calc(var(--mobile-actions-height) + env(safe-area-inset-bottom)); }
  .section { padding-block: 3.25rem; }
  .section-title { font-size: clamp(2.25rem, 12vw, 3.25rem); }
  .hero { min-height: auto; padding: 5rem 0 4rem; }
  .search-panel { margin-inline: 0; padding: 1rem; }
  .toast-region { bottom: calc(var(--mobile-actions-height) + env(safe-area-inset-bottom) + 0.75rem); left: 1rem; right: 1rem; }
  .app-toast { width: 100%; }
  .mobile-actions { min-height: var(--mobile-actions-height); border-top: 1px solid #30363b; }
  .mobile-actions a { min-width: 0; display: grid; place-content: center; }
  .site-footer { padding-bottom: 2rem; }
  .sale-toolbar .form-select { width: 100%; min-width: 0; }
  .sale-breadcrumb, .breadcrumbs { font-size: 0.84rem; }
  .sale-dialog[open] {
    inset: 0;
    transform: none;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .sale-filter-dialog[open] { inset: 0 0 0 auto; }
  .modal { padding: 0 !important; }
  .modal-dialog { min-height: 100%; }
  .modal-content { max-height: 100dvh; border-radius: 0; }
  .gallery-main {
    height: clamp(11rem, 60vw, 17rem);
    aspect-ratio: auto;
  }
  .gallery-main img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
  }
  .detail-gallery-main { aspect-ratio: 4 / 3; max-height: none; }
}

.contact-hero { padding: clamp(4rem, 9vw, 8rem) 0; }
.contact-hero h1 { max-width: 17ch; font-size: clamp(2.5rem, 6vw, 5rem); }
.contact-hero .lead { max-width: 50rem; }
.contact-detail { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid #d9dde1; }
.contact-detail > i { display: grid; place-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; color: var(--charcoal); background: var(--amber); font-size: 1.25rem; }
.contact-detail h3 { margin: 0 0 .25rem; font-size: 1rem; }
.contact-detail p { margin: 0 0 .35rem; overflow-wrap: anywhere; }
.contact-form { padding: clamp(1.25rem, 4vw, 3rem); border: 1px solid #d9dde1; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.business-hours .table th, .business-hours .table td { padding-inline: 0; }
.map-shell { min-height: 20rem; display: grid; place-content: center; text-align: center; border-radius: var(--radius-lg); background: #e6eaed; overflow: hidden; }
.map-shell iframe { width: 100%; min-height: clamp(20rem, 48vw, 32rem); border: 0; }
.contact-success { padding-block: 2rem; }
@media (max-width: 575px) {
  .contact-hero .btn { width: 100%; }
  .contact-form { padding: 1.15rem; }
}

.request-honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.request-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .75rem; }
.request-preview { display: grid; gap: .35rem; min-width: 0; }
.request-preview img { width: 100%; height: 7rem; object-fit: cover; border-radius: var(--radius-sm); background: #e6eaed; }
.request-preview span { overflow-wrap: anywhere; font-size: .8rem; }
.request-review dt { font-weight: 700; }

.services-hero { position: relative; min-height: clamp(32rem, 68vh, 48rem); display: grid; align-items: end; overflow: hidden; background: var(--charcoal); color: #fff; }
.services-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.services-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(12 15 17 / 94%) 0%, rgb(12 15 17 / 72%) 56%, rgb(12 15 17 / 28%) 100%); }
.services-hero-overlay { position: relative; z-index: 1; padding: clamp(5rem, 10vw, 9rem) 0 clamp(3rem, 7vw, 6rem); }
.services-hero h1 { max-width: 18ch; font-size: clamp(2.35rem, 6vw, 5rem); line-height: .98; }
.services-hero .lead { max-width: 48rem; }
.services-hero .breadcrumb-item a, .services-hero .breadcrumb-item.active, .services-hero .breadcrumb-item + .breadcrumb-item::before { color: #fff; }
.services-intro { max-width: 58rem; margin-inline: auto; text-align: center; }
.service-jump { display: flex; gap: .65rem; overflow-x: auto; padding: 1.5rem 0 2.5rem; scrollbar-width: thin; }
.service-jump a { flex: 0 0 auto; padding: .55rem .9rem; border: 1px solid #c8cdd1; border-radius: 999px; color: var(--charcoal); text-decoration: none; }
.service-list { display: grid; gap: clamp(3rem, 8vw, 7rem); margin-top: 3rem; }
.service-feature { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); scroll-margin-top: 7rem; }
.service-feature-reverse .service-feature-media { order: 2; }
.service-feature-media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-lg); background: #e6eaed; }
.service-feature-media img { width: 100%; height: 100%; object-fit: cover; }
.service-feature-copy h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
.service-feature-copy dl { display: grid; grid-template-columns: minmax(8rem, .35fr) minmax(0, 1fr); gap: .7rem 1rem; margin: 1.75rem 0; }
.service-feature-copy dt { font-weight: 800; }
.service-feature-copy dd { margin: 0; color: var(--bs-secondary-color); }
@media (max-width: 767px) {
  .services-hero { min-height: 36rem; }
  .services-hero::after { background: linear-gradient(0deg, rgb(12 15 17 / 96%), rgb(12 15 17 / 45%)); }
  .service-feature { grid-template-columns: 1fr; gap: 1.5rem; }
  .service-feature-reverse .service-feature-media { order: 0; }
  .service-feature-copy dl { grid-template-columns: 1fr; gap: .25rem; }
  .service-feature-copy dd { margin-bottom: .75rem; }
}

.about-hero { position: relative; min-height: clamp(30rem, 66vh, 46rem); display: grid; align-items: end; overflow: hidden; background: var(--charcoal); color: #fff; }
.about-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.about-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(12 15 17 / 94%), rgb(12 15 17 / 62%) 58%, rgb(12 15 17 / 20%)); }
.about-hero-overlay { position: relative; z-index: 1; padding: clamp(5rem, 10vw, 9rem) 0 clamp(3rem, 7vw, 6rem); }
.about-hero h1 { max-width: 18ch; font-size: clamp(2.4rem, 6vw, 5rem); line-height: .98; }
.about-hero .lead { max-width: 50rem; }
.about-hero .breadcrumb-item a, .about-hero .breadcrumb-item.active, .about-hero .breadcrumb-item + .breadcrumb-item::before { color: #fff; }
.about-sections { display: grid; gap: clamp(3rem, 8vw, 7rem); }
.about-feature { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); scroll-margin-top: 7rem; }
.about-feature-reverse .about-feature-media { order: 2; }
.about-feature-media { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-lg); background: #e6eaed; }
.about-feature-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.about-feature-copy { min-width: 0; }
.about-feature-copy h2 { font-size: clamp(2rem, 4vw, 3.35rem); }
.about-feature-text-only { grid-template-columns: minmax(0, 52rem); justify-content: center; text-align: center; }
.about-list { display: grid; gap: .65rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.about-list li { position: relative; padding-left: 1.65rem; }
.about-list li::before { content: ''; position: absolute; left: 0; top: .55em; width: .65rem; height: .65rem; border-radius: 50%; background: var(--amber); }
.about-trust { margin: clamp(4rem, 9vw, 8rem) 0 2rem; padding-top: 2rem; border-top: 1px solid #d9dde1; }
.about-trust-links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.about-trust-links a { color: var(--charcoal); font-weight: 700; }
.about-closing { margin-top: 3rem; padding: clamp(2rem, 6vw, 5rem); border-radius: var(--radius-lg); }
.about-closing h2 { max-width: 22ch; font-size: clamp(2rem, 4vw, 3.5rem); }
.about-closing > p:not(.eyebrow) { max-width: 48rem; }
@media (max-width: 767px) {
  .about-hero { min-height: 35rem; }
  .about-hero::after { background: linear-gradient(0deg, rgb(12 15 17 / 96%), rgb(12 15 17 / 38%)); }
  .about-feature { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-feature-reverse .about-feature-media { order: 0; }
  .about-feature-text-only { text-align: left; }
}
@media (max-width: 575px) {
  .container { --bs-gutter-x: 1.25rem; }
  .display-hero { font-size: clamp(2.65rem, 15vw, 3.35rem); }
  .hero .lead { font-size: 1rem; }
  .search-panel > [class*='col'] { flex: 0 0 100%; width: 100%; }
  .btn-lg { font-size: 1rem; min-height: 3rem; }
  .sale-card-actions, .sale-actions { display: grid; grid-template-columns: 1fr; }
  .sale-card-actions .btn, .sale-actions .btn, .sale-actions a { width: 100%; }
  .spec-list { font-size: 0.92rem; }
  #part-request, #contact-form { padding: 1rem !important; }
  .site-footer .row { --bs-gutter-y: 2.25rem; }
  .mobile-actions a { font-size: 0.62rem; }
  .gallery-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery-thumbs button { min-width: 0; height: clamp(3.5rem, 18vw, 5rem); }
  .gallery-thumbs img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
  .about-closing .btn { width: 100%; }
  .about-closing { margin-inline: -.25rem; padding-inline: 1.25rem; }
}

@media (max-width: 359px) {
  .navbar-brand { font-size: 1.05rem; }
  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .mobile-actions a { font-size: 0.58rem; }
  .filter-chip { max-width: 100%; }
  .navbar > .container { flex-wrap: nowrap; }
}
@media (max-height: 640px) and (min-width: 768px) {
  .modal-content, .sale-dialog[open] { max-height: calc(100dvh - 1rem); }
  .lightbox > img { height: calc(100dvh - 5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .service-card, .inventory-card, .vehicle-card, .sale-card, .app-toast {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* Module A: complete public part-detail pathway. */
.inventory-card-image { display: block; overflow: hidden; background: var(--surface-muted, #eef0f2); }
.inventory-card h3 a { color: inherit; text-decoration: none; }
.part-gallery { position: relative; }
.part-gallery-main { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius-lg); overflow: hidden; background: #e9ecef; aspect-ratio: 4 / 3; }
.part-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.part-image-count { margin: .65rem 0; color: var(--bs-secondary-color); }
.part-gallery-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; }
.part-gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: .5rem; overflow: hidden; aspect-ratio: 4 / 3; background: #e9ecef; }
.part-gallery-thumbs button[aria-current="true"] { border-color: var(--amber, #e59b16); }
.part-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.part-status { display: flex; flex-wrap: wrap; gap: .5rem; }
.part-detail-section { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid #d9dde1; }
.part-detail-section h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.compare-price { color: var(--bs-secondary-color); margin-bottom: -.75rem; }
.compatibility-warning { border-left: .35rem solid #8b5000; }
.part-lightbox[open] { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); max-width: 94vw; max-height: 92dvh; padding: 2.5rem 1rem 1rem; border: 0; background: #111; }
.part-lightbox::backdrop { background: rgb(0 0 0 / 82%); }
.part-lightbox img { max-width: 90vw; max-height: calc(90dvh - 3rem); object-fit: contain; }
.part-lightbox .btn-close { position: absolute; top: .65rem; right: .65rem; filter: invert(1); }
@media (max-width: 575px) {
  .part-gallery-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .part-actions .btn, .part-actions a { width: 100%; }
  .part-detail-section { margin-top: 2.5rem; }
}

/* Module 16: WCAG 2.2 focus and target visibility safeguards. */
.section:not(.section-dark) .eyebrow,
.section:not(.section-dark) .text-warning {
  color: #7a4100 !important;
}
:focus-visible {
  outline: 3px solid #0b67c2;
  outline-offset: 3px;
}
.site-nav :focus-visible,
.mobile-actions :focus-visible,
.section-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: #ffd166;
}
[tabindex="-1"]:focus { outline: none; }
.skip-link:focus {
  position: fixed;
  inset: 0.75rem auto auto 0.75rem;
  z-index: 2000;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Detail-media normalization: final override for every item-detail gallery. */
.part-detail .col-lg-7,
.sale-detail .col-lg-7 { min-width: 0; }
.part-gallery,
.gallery-main,
.detail-gallery-main {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
}
.part-gallery-main,
.gallery-main,
.detail-gallery-main {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: 36rem;
  overflow: hidden;
  background: #e6eaed;
  border-radius: var(--radius-md);
}
.part-gallery-main img,
.gallery-main img,
.detail-gallery-main {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 36rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}
.gallery-thumbs,
.part-gallery-thumbs { max-width: 48rem; margin-inline: auto; }
.gallery-thumbs button,
.part-gallery-thumbs button { height: clamp(3.75rem, 8vw, 6rem); aspect-ratio: 4 / 3; }
.gallery-thumbs img,
.part-gallery-thumbs img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sale-dialog.lightbox[open] {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  width: min(68rem, calc(100vw - 2rem));
}
.sale-dialog.lightbox > img,
.part-lightbox > img {
  width: auto;
  height: auto;
  max-width: calc(100vw - 3rem);
  max-height: calc(100dvh - 6rem);
  object-fit: contain;
}
@media (max-width: 767px) {
  .part-gallery-main,
  .gallery-main,
  .detail-gallery-main {
    height: clamp(12rem, 68vw, 21rem);
    max-height: 21rem;
    aspect-ratio: auto;
  }
  .part-gallery-main img,
  .gallery-main img,
  .detail-gallery-main {
    height: 100%;
    max-height: 21rem;
    aspect-ratio: auto;
  }
  .gallery-thumbs,
  .part-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }
  .gallery-thumbs button,
  .part-gallery-thumbs button { width: 100%; min-width: 0; height: clamp(3.5rem, 18vw, 5rem); }
  .sale-dialog.lightbox[open],
  .part-lightbox[open] { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
}
