@import url("cairo-font.css");

/* Auto House — public showroom */
:root {
  --ah-dark: #0c0e12;
  --ah-dark-mid: #141820;
  --ah-accent: #c9a227;
  --ah-accent-hover: #e0b82e;
  --ah-text: #e8eaef;
  --ah-muted: #8b929e;
  --ah-surface: #ffffff;
  --ah-border: #e2e5ea;
  /* Form field hint text — light gray */
  --ah-input-placeholder: #aeb6c3;
}

body.auto-house {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 64px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f4f5f7;
  color: #1a1d24;
}

.ah-navbar {
  height: 64px;
  background: var(--ah-dark) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1030;
  overflow: visible;
}

.ah-navbar > .container {
  overflow: visible;
}

.ah-navbar .dropdown-menu {
  z-index: 1050;
}

.ah-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: #fff !important;
}

.ah-logo {
  height: 40px;
  width: auto;
  max-width: min(200px, 48vw);
  object-fit: contain;
  display: block;
}

.ah-navbar .brand-accent {
  color: var(--ah-accent);
}

.ah-navbar .nav-link {
  color: rgba(255, 255, 255, 0.78) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem !important;
}

.ah-navbar .nav-link:hover {
  color: #fff !important;
}

.ah-hero {
  position: relative;
  display: flex;
  align-items: center;
  background: #000;
  overflow: hidden;
}

.ah-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 2rem 0 2.5rem;
}

.ah-hero-kicker {
  color: var(--ah-accent);
  letter-spacing: 0.12em;
}

.ah-hero-logo {
  width: 100%;
  max-width: min(420px, 100%);
  height: auto;
  object-fit: contain;
  display: block;
  margin-inline: auto;
}

@media (min-width: 992px) {
  .ah-hero-logo {
    margin-inline: 0 0 auto;
  }
}

.ah-hero h1 {
  color: var(--ah-text);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  max-width: 14ch;
  margin-inline: auto;
}

@media (min-width: 992px) {
  .ah-hero h1 {
    margin-inline: 0;
  }
}

.ah-hero .lead {
  color: var(--ah-muted);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  max-width: 40ch;
  margin-top: 0.85rem;
  margin-inline: auto;
}

@media (min-width: 992px) {
  .ah-hero .lead {
    margin-inline: 0;
  }
}

@media (min-width: 768px) {
  .ah-hero-inner {
    padding: 2.5rem 0 3rem;
  }
}

.ah-hero .btn-gold,
body.auto-house .btn-gold {
  background: var(--ah-accent);
  border: none;
  color: var(--ah-dark);
  font-weight: 600;
  padding: 0.65rem 1.35rem;
}

.ah-hero .btn-gold:hover,
body.auto-house .btn-gold:hover {
  background: var(--ah-accent-hover);
  color: var(--ah-dark);
}

.ah-hero .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--ah-text);
  font-weight: 500;
}

.ah-hero .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.ah-section {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

.ah-section-title {
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.ah-section-sub {
  color: #5c6370;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.ah-table-card {
  background: '#fff';
  border-radius: 0.75rem;
  border: 1px solid var(--ah-border);
  box-shadow: 0 4px 24px rgba(15, 20, 30, 0.06);
  overflow: hidden;
}

.ah-table-card .table {
  margin-bottom: 0;
}

.ah-table-card thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  font-weight: 600;
  border-bottom-width: 1px;
  background: #fafbfc;
  padding: 0.85rem 1rem;
  white-space: nowrap;
}

.ah-table-card tbody td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  font-size: 0.925rem;
}

.ah-latest-th-col {
  width: 1%;
  white-space: nowrap;
}

.ah-latest-grid-wrap {
  overflow: visible;
}

/* Homepage latest arrivals: grid reflows when client-side filter hides cards */
.ah-index-latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .ah-index-latest-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* Showroom inventory: card grid (list/table is default) */
.ah-showroom-vehicles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .ah-showroom-vehicles-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

.ah-latest-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ah-latest-card:hover {
  box-shadow: 0 0.75rem 2rem rgba(15, 20, 30, 0.12) !important;
  transform: translateY(-2px);
}

.ah-latest-card__ratio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ah-latest-card__placeholder {
  position: absolute;
  inset: 0;
}

.ah-latest-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  vertical-align: middle;
}

.ah-latest-thumb-placeholder {
  width: 72px;
  height: 54px;
  margin: 0 auto;
}

.ah-table-card tbody tr:hover {
  background: rgba(201, 162, 39, 0.04);
}

.ah-price {
  font-weight: 600;
  color: #1a1d24;
  font-variant-numeric: tabular-nums;
}

.ah-badge-stock {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ah-footer {
  background: var(--ah-dark);
  color: rgba(255, 255, 255, 0.65);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
  font-size: 0.875rem;
}

.ah-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.ah-footer a:hover {
  color: var(--ah-accent);
}

.ah-footer .footer-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.ah-footer .footer-heading {
  color: #fff;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

@media (max-width: 991.98px) {
  .ah-navbar .navbar-collapse {
    background: var(--ah-dark-mid);
    padding: 1rem;
    margin: 0.5rem -0.5rem 0;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* Full-bleed promoted strip when nested inside .container (e.g. public showroom) */
.ah-promo-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.ah-promo-bleed .ah-promo-shell {
  margin-left: 0;
  margin-right: 0;
}

/* Homepage: horizontal sliding promoted vehicle strip */
.ah-promo-shell {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0 -0.25rem;
}

.ah-promo-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ah-promo-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0.15rem 0.85rem;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge */
}

.ah-promo-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.ah-promo-track:focus-visible {
  outline: 2px solid var(--ah-accent);
  outline-offset: 2px;
}

.ah-promo-card {
  flex: 0 0 min(420px, 82vw);
  max-width: 500px;
  scroll-snap-align: start;
}

.ah-promo-card__link {
  background: var(--ah-surface);
  border-radius: 0.75rem;
  box-shadow: 0 4px 24px rgba(15, 20, 30, 0.06);
  overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.ah-promo-card__link:hover {
  border-color: rgba(201, 162, 39, 0.45);
  box-shadow: 0 8px 28px rgba(15, 20, 30, 0.1);
}

.ah-promo-card__media {
  aspect-ratio: 4 / 3;
  background: #f0f2f5;
  overflow: hidden;
}

.ah-promo-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ah-promo-card__placeholder {
  width: 100%;
  height: 100%;
  min-height: 8rem;
  background: linear-gradient(145deg, #f4f5f7 0%, #e8eaef 100%);
}

.ah-promo-card__body {
  padding: 0.9rem 1rem 1rem;
}

.ah-promo-card__title {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1a1d24;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.ah-promo-card__price {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1d24;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.ah-promo-btn {
  flex: 0 0 auto;
  align-self: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ah-border);
  border-radius: 50%;
  background: var(--ah-surface);
  color: #1a1d24;
  box-shadow: 0 1px 3px rgba(15, 20, 30, 0.06);
}

.ah-promo-btn:hover {
  background: #fafbfc;
  border-color: rgba(201, 162, 39, 0.55);
  color: #101318;
}

.ah-promo-btn:focus-visible {
  outline: 2px solid var(--ah-accent);
  outline-offset: 2px;
}

@media (max-width: 575.98px) {
  .ah-promo-shell {
    gap: 0.15rem;
    margin: 0 -0.75rem;
  }

  .ah-promo-bleed .ah-promo-shell {
    margin-left: 0;
    margin-right: 0;
  }

  .ah-promo-btn {
    display: none;
  }

  .ah-promo-track {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Forms: label emphasis (matches Bootstrap .small + .lh-1) */
body.auto-house .form-label {
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
}

/* Light muted placeholder — all inputs/textareas on public pages */
body.auto-house input::placeholder,
body.auto-house textarea::placeholder,
body.auto-house .form-control::placeholder,
body.auto-house textarea.form-control::placeholder {
  color: var(--ah-input-placeholder);
  opacity: 1;
}

body.auto-house input::-webkit-input-placeholder,
body.auto-house textarea::-webkit-input-placeholder,
body.auto-house .form-control::-webkit-input-placeholder,
body.auto-house textarea.form-control::-webkit-input-placeholder {
  color: var(--ah-input-placeholder);
}

body.auto-house input::-moz-placeholder,
body.auto-house textarea::-moz-placeholder,
body.auto-house .form-control::-moz-placeholder,
body.auto-house textarea.form-control::-moz-placeholder {
  color: var(--ah-input-placeholder);
  opacity: 1;
}

/* Public inventory: sticky side filter (index + showroom) */
@media (min-width: 992px) {
  .ah-filter-sidebar {
    align-self: stretch;
  }

  .ah-showroom-filter-card {
    position: sticky;
    top: calc(64px + 0.75rem);
    z-index: 10;
    max-height: calc(100vh - 64px - 1.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Public vehicle page: full-screen photo album (vehicle.php) */
body.vehicle-album-lightbox-open {
  overflow: hidden;
}

.vehicle-album-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1085;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  box-sizing: border-box;
}

.vehicle-album-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}

.vehicle-album-lightbox__stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: min(100vw, 1400px);
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.25rem 3.5rem 2.75rem;
  box-sizing: border-box;
  pointer-events: none;
}

.vehicle-album-lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  border-radius: 0.25rem;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.45);
}

.vehicle-album-lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 3rem;
  height: 3rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.vehicle-album-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 3rem;
  height: 3rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.vehicle-album-lightbox__nav--prev {
  left: 0.5rem;
}

.vehicle-album-lightbox__nav--next {
  right: 0.5rem;
}

.vehicle-album-lightbox__counter {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

#ahVehicleCarousel .ah-vehicle-album-thumb {
  cursor: zoom-in;
}

@media (max-width: 575.98px) {
  .vehicle-album-lightbox__stage {
    padding: 3rem 0.25rem 2.5rem;
  }

  .vehicle-album-lightbox__nav--prev {
    left: 0.25rem;
  }

  .vehicle-album-lightbox__nav--next {
    right: 0.25rem;
  }

  .vehicle-album-lightbox__nav {
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* —— Car parts shop (carparts/) —— */
.ah-parts-main {
  padding-top: 0.5rem;
}

.ah-parts-hero {
  background: linear-gradient(135deg, var(--ah-dark-mid) 0%, #1a2230 45%, #243044 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ah-parts-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ah-parts-card:hover {
  box-shadow: 0 0.5rem 1.25rem rgba(12, 14, 18, 0.12) !important;
  transform: translateY(-2px);
}
