/* Al Masdar storefront — Bootstrap 5.3 RTL theme (EPT-inspired rhythm) */
:root {
  --qitaa-primary: #1160de;
  --qitaa-secondary: #0b1b2a;
  --qitaa-accent: #ff6a13;
  --qitaa-bg: #f2f4f6;
  --qitaa-text: #12171c;
  --qitaa-muted: #5a6672;
  --qitaa-border: #e5e9ed;
  --qitaa-radius: 12px;
  --qitaa-shadow: 0 4px 18px rgba(11, 27, 42, 0.08);
  --qitaa-shadow-hover: 0 8px 28px rgba(11, 27, 42, 0.12);
  --qitaa-green: #0f7b4f;
  --qitaa-line: var(--qitaa-border);
  --bs-primary: var(--qitaa-primary);
  --bs-body-font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --q-scroll-gap: 1rem;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body.q-store {
  background: var(--qitaa-bg);
  color: var(--qitaa-text);
  overflow-x: clip;
  max-width: 100%;
}

/* Keep offcanvas from expanding document scroll width in RTL */
.offcanvas {
  max-width: 100vw;
}

.q-promo {
  background: var(--qitaa-green);
  color: #fff;
  font-size: 0.8125rem;
  text-align: center;
}

.q-navbar {
  background: #fff;
  border-bottom: 1px solid var(--qitaa-border);
  transition: box-shadow 0.25s ease;
}

.q-navbar.is-scrolled {
  box-shadow: 0 2px 12px rgba(11, 27, 42, 0.08);
}

.q-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
}

.q-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--qitaa-secondary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Sans Arabic", "Archivo", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  font-weight: 800;
  font-family: Archivo, sans-serif;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.q-brand-name {
  font-weight: 700;
  color: var(--qitaa-secondary);
  line-height: 1.1;
}

.q-brand-en {
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: #8b98a5;
  font-family: Archivo, sans-serif;
}

.q-cart-btn {
  background: var(--qitaa-secondary);
  border: none;
  color: #fff;
}

.q-cart-btn:hover {
  background: #152a42;
  color: #fff;
}

/* Mega menu — 3-panel EPT-style */
.q-mega-dropdown .dropdown-menu {
  border: 1px solid var(--qitaa-border);
  border-radius: var(--qitaa-radius);
  padding: 0;
  margin-top: 0.5rem;
}

.q-mega-menu {
  width: min(920px, 92vw);
  max-height: min(72vh, 560px);
  overflow: hidden;
}

.q-mega-panels {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  min-height: 320px;
}

.q-mega-col {
  border-inline-start: 1px solid var(--qitaa-border);
  overflow-y: auto;
  max-height: min(72vh, 560px);
}

.q-mega-col:first-child {
  border-inline-start: none;
}

.q-mega-item {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--qitaa-text);
  text-decoration: none;
  transition: background 0.15s ease;
}

.q-mega-item:hover,
.q-mega-item.active {
  background: #eef4fc;
  color: var(--qitaa-primary);
}

.q-mega-item .en {
  display: block;
  font-size: 0.7rem;
  color: var(--qitaa-muted);
}

.q-mega-cats {
  padding: 0.75rem 1rem;
}

.q-mega-cats a {
  display: inline-block;
  margin: 0.2rem 0.15rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #f4f6f8;
  color: var(--qitaa-text);
  font-size: 0.8rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.q-mega-cats a:hover {
  background: var(--qitaa-primary);
  color: #fff;
}

/* Hero carousel — full-bleed; preserve Bootstrap slide visibility (one at a time) */
.q-hero {
  background: #0b1b2a;
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  padding-inline: 0;
  overflow-x: clip;
  box-sizing: border-box;
}

.q-hero #heroCarousel,
.q-hero .carousel {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.q-hero .carousel-inner {
  position: relative;
  width: 100%;
  max-width: none;
  overflow: hidden;
  aspect-ratio: 1920 / 650;
  margin: 0;
  padding: 0;
}

/*
 * Do NOT set margin:0 / display / float on .carousel-item —
 * Bootstrap needs margin-inline -100% (+ float) so slides overlay, not stack.
 * Visibility stays with Bootstrap:
 *   .carousel-item { display: none }
 *   .carousel-item.active|.carousel-item-next|.carousel-item-prev { display: block }
 */
.q-hero .carousel-item {
  width: 100%;
  max-width: none;
  padding: 0;
  /* leave margin/float/display to Bootstrap */
}

.q-hero .carousel-item picture {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
}

.q-hero .carousel-item img,
.q-hero .q-hero-img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
  object-position: var(--hero-desk-pos, center center);
  margin: 0;
  padding: 0;
}

.q-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0b1b2a 0%, rgba(11, 27, 42, 0.55) 45%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.q-hero .carousel-caption {
  inset-inline: 8%;
  bottom: 18%;
  text-align: start;
  max-width: 520px;
  z-index: 2;
}

.q-hero .carousel-control-prev,
.q-hero .carousel-control-next {
  width: 48px;
  opacity: 0.85;
}

.q-hero-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: 1920 / 650;
  background: linear-gradient(135deg, #0b1b2a 0%, #1a3a5c 45%, #1160de 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.25rem;
  font-weight: 700;
}

@media (max-width: 767.98px) {
  .q-hero {
    width: 100vw;
    max-width: none;
    margin-inline: calc(50% - 50vw);
    padding-inline: 0;
  }

  .q-hero .carousel-inner {
    aspect-ratio: 768 / 900;
  }

  .q-hero .carousel-item img,
  .q-hero .q-hero-img {
    object-fit: contain;
    object-position: var(--hero-mob-pos, center center);
  }

  .q-hero-placeholder {
    aspect-ratio: 768 / 900;
  }

  .q-hero-overlay {
    background: linear-gradient(180deg, transparent 20%, rgba(11, 27, 42, 0.65) 100%);
  }

  .q-hero .carousel-caption {
    bottom: 10%;
    padding: 0.5rem;
    display: block !important;
  }

  .q-hero .carousel-caption h2 {
    font-size: 1rem;
  }

  .q-hero .carousel-caption .lead {
    font-size: 0.85rem;
    margin-bottom: 0.5rem !important;
  }

  .q-hero .carousel-caption .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
  }
}

/* Horizontal scroll sliders — RTL-aware */
.q-slider-section {
  position: relative;
}

.q-scroll-wrap {
  position: relative;
  overflow: hidden;
}

.q-scroll-track {
  display: flex;
  gap: var(--q-scroll-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem 0 0.75rem;
}

.q-scroll-track::-webkit-scrollbar {
  display: none;
}

.q-scroll-track > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.q-scroll-nav {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--qitaa-border);
  background: #fff;
  box-shadow: var(--qitaa-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--qitaa-secondary);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.q-scroll-nav:hover {
  background: var(--qitaa-primary);
  color: #fff;
  border-color: var(--qitaa-primary);
}

.q-scroll-nav:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.q-scroll-prev {
  inset-inline-start: -0.5rem;
}

.q-scroll-next {
  inset-inline-end: -0.5rem;
}

@media (max-width: 575.98px) {
  .q-scroll-nav {
    display: none;
  }

  /* Keep the full establishment name on two short lines next to the phone controls. */
  .q-brand-name {
    font-size: 0.875rem;
    line-height: 1.25;
    max-width: 9.5rem;
  }

  .q-brand-en {
    display: none;
  }
}

/* Brand cards */
.q-brand-card {
  width: clamp(140px, 28vw, 180px);
  border: 1px solid var(--qitaa-border);
  border-radius: var(--qitaa-radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.q-brand-card:hover {
  box-shadow: var(--qitaa-shadow-hover);
  transform: translateY(-2px);
  color: inherit;
}

.q-brand-card-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #e8edf2, #f8fafb);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.q-brand-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.28s ease;
}

.q-brand-card:hover .q-brand-card-media img {
  transform: scale(1.04);
}

.q-brand-card-body {
  padding: 0.75rem;
  text-align: center;
}

/* Visual category / model cards */
.q-visual-card {
  width: clamp(200px, 42vw, 260px);
  border-radius: var(--qitaa-radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--qitaa-border);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s ease;
}

.q-visual-card:hover {
  box-shadow: var(--qitaa-shadow-hover);
  color: inherit;
}

.q-visual-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e8edf2;
}

.q-visual-card-media img,
.q-visual-card-media .q-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.q-visual-card:hover .q-visual-card-media img {
  transform: scale(1.04);
}

.q-visual-card-body {
  padding: 0.85rem 1rem;
}

/* Product cards */
.q-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1rem;
}

@media (min-width: 768px) {
  .q-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.q-product-card {
  background: #fff;
  border: 1px solid var(--qitaa-border);
  border-radius: var(--qitaa-radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.q-product-card:hover {
  box-shadow: var(--qitaa-shadow-hover);
  transform: translateY(-2px);
}

.q-product-media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: #fff;
  border-bottom: 1px solid var(--qitaa-border);
  overflow: hidden;
  text-decoration: none;
}

.q-product-media img,
.q-product-media .q-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  transition: transform 0.28s ease;
}

.q-product-card:hover .q-product-media img {
  transform: scale(1.04);
}

.q-product-badges {
  position: absolute;
  top: 0.5rem;
  inset-inline-start: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1;
}

.q-tag-genuine {
  background: #edf7f1;
  color: var(--qitaa-green);
  font-size: 0.7rem;
}

.q-tag-after {
  background: #fff4ec;
  color: #b24700;
  font-size: 0.7rem;
}

.q-tag-discount {
  background: var(--qitaa-accent);
  color: #fff;
  font-size: 0.7rem;
}

.q-product-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
}

.q-product-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--qitaa-text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.q-product-title:hover {
  color: var(--qitaa-primary);
}

.q-product-meta {
  font-size: 0.7rem;
  color: var(--qitaa-muted);
  font-family: "IBM Plex Mono", monospace;
}

.q-product-fit {
  font-size: 0.72rem;
}

.q-product-fit.ok {
  color: var(--qitaa-green);
}

.q-product-fit.muted {
  color: #8b98a5;
}

.q-product-price {
  font-weight: 700;
  color: var(--qitaa-primary);
  font-size: 1rem;
}

.q-product-was {
  font-size: 0.75rem;
  color: #8b98a5;
  text-decoration: line-through;
  margin-inline-start: 0.35rem;
}

.q-product-card .sf-add,
.q-product-card .q-add-btn {
  margin-top: auto;
  width: 100%;
  font-size: 0.8rem;
}

.q-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #eef2f6, #f8fafb);
  color: var(--qitaa-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.5rem;
}

/* Slider product card widths */
.q-scroll-track .q-product-card {
  width: clamp(156px, 72vw, 220px);
}

@media (min-width: 768px) {
  .q-scroll-track .q-product-card {
    width: clamp(180px, 22vw, 220px);
  }
}

/* Reviews */
.q-review-card {
  width: clamp(280px, 85vw, 360px);
  background: #fff;
  border: 1px solid var(--qitaa-border);
  border-radius: var(--qitaa-radius);
  padding: 1.25rem;
}

.q-review-stars {
  color: #f5a623;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
}

.q-review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eaf1fd;
  color: var(--qitaa-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Trust / payment / footer / whatsapp */
.q-trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eaf1fd;
  color: var(--qitaa-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.q-pay-badge {
  border: 1px solid var(--qitaa-border);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  background: #fff;
  display: inline-block;
  margin: 0.15rem;
}

.q-whatsapp-fab {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 1050;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  text-decoration: none;
  font-size: 1.35rem;
}

.q-whatsapp-fab:hover {
  color: #fff;
  transform: scale(1.05);
}

.q-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--qitaa-secondary);
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000;
}

.q-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Vehicle selector bar */
.q-vehicle-bar {
  background: #fff;
  border: 1px solid var(--qitaa-border);
  border-radius: var(--qitaa-radius);
  padding: 1rem;
}

/* Part category tabs */
.q-part-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}

.q-part-tabs::-webkit-scrollbar {
  display: none;
}

.q-part-tab {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--qitaa-border);
  border-radius: var(--qitaa-radius);
  background: #fff;
  text-decoration: none;
  color: var(--qitaa-text);
  min-width: 88px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.q-part-tab:hover,
.q-part-tab.active {
  border-color: var(--qitaa-primary);
  background: #eef4fc;
  color: var(--qitaa-primary);
}

.q-part-tab .icon {
  font-size: 1.25rem;
}

.q-part-tab .lbl {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}

/* Category page — filters & pagination (sf-* compat) */
.q-cat-page {
  padding: 1.5rem 0 3rem;
}

.sf-breadcrumb,
.q-breadcrumb {
  font-size: 0.8rem;
  color: var(--qitaa-muted);
  margin-bottom: 1rem;
}

.sf-breadcrumb a,
.q-breadcrumb a {
  color: var(--qitaa-muted);
  text-decoration: none;
}

.sf-breadcrumb .current,
.q-breadcrumb .current {
  color: var(--qitaa-text);
}

.sf-cat-layout,
.q-cat-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 991.98px) {
  .sf-cat-layout,
  .q-cat-layout {
    grid-template-columns: 1fr;
  }
}

.sf-filters,
.q-filters {
  background: #fff;
  border: 1px solid var(--qitaa-border);
  border-radius: var(--qitaa-radius);
  padding: 1rem;
}

.sf-filters-head,
.q-filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 600;
}

.sf-filter-group,
.q-filter-group {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--qitaa-border);
}

.sf-filter-label,
.q-filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.sf-check,
.q-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.sf-price-range,
.q-price-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sf-price-range input,
.q-price-range input {
  flex: 1;
  min-width: 0;
}

.sf-mobile-filter-bar,
.q-mobile-filter-bar {
  display: none;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 991.98px) {
  .sf-filters,
  .q-filters {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    top: auto;
    max-height: 85vh;
    z-index: 1060;
    border-radius: var(--qitaa-radius) var(--qitaa-radius) 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .sf-filters.open,
  .q-filters.open {
    transform: translateY(0);
  }

  .sf-filters-backdrop,
  .q-filters-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1055;
  }

  .sf-filters-backdrop[hidden],
  .q-filters-backdrop[hidden] {
    display: none;
  }

  .sf-mobile-filter-bar,
  .q-mobile-filter-bar {
    display: flex;
  }

  .sf-sort-desktop,
  .q-sort-desktop {
    display: none;
  }
}

.sf-subcats,
.q-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sf-subcat,
.q-subcat {
  border: 1px solid var(--qitaa-border);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.sf-subcat.active,
.q-subcat.active {
  background: var(--qitaa-primary);
  border-color: var(--qitaa-primary);
  color: #fff;
}

.sf-results-bar,
.q-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.sf-active-chips,
.q-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sf-chip-active,
.q-chip-active {
  border: 1px solid var(--qitaa-border);
  background: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
}

.sf-chip-clear-all,
.q-chip-clear-all {
  border: 0;
  background: transparent;
  color: var(--qitaa-primary);
  font-size: 0.75rem;
}

.sf-pagination,
.q-pagination {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.sf-page-btn,
.q-page-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--qitaa-border);
  background: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
}

.sf-page-btn.active,
.q-page-btn.active {
  background: var(--qitaa-primary);
  border-color: var(--qitaa-primary);
  color: #fff;
}

.sf-page-btn:disabled,
.q-page-btn:disabled {
  opacity: 0.4;
}

.sf-skeleton-card .sf-skel-media,
.q-skeleton-card .q-skel-media {
  aspect-ratio: 1;
  background: linear-gradient(90deg, #eef2f6 25%, #f8fafb 50%, #eef2f6 75%);
  background-size: 200% 100%;
  animation: q-shimmer 1.2s infinite;
}

.sf-skel-line,
.q-skel-line {
  height: 12px;
  background: #eef2f6;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.sf-skel-line.short {
  width: 60%;
}

.sf-skel-btn,
.q-skel-btn {
  height: 36px;
  background: #eef2f6;
  border-radius: 8px;
  margin-top: 0.5rem;
}

@keyframes q-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.sf-empty-state,
.q-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--qitaa-muted);
}

/* Product detail page */
.q-pdp-gallery-main {
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--qitaa-border);
  border-radius: var(--qitaa-radius);
  overflow: hidden;
}

.q-pdp-gallery-main img,
.q-pdp-gallery-main .q-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.q-pdp-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}

.q-pdp-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border: 2px solid var(--qitaa-border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  padding: 0;
}

.q-pdp-thumb.active {
  border-color: var(--qitaa-primary);
}

.q-pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.q-pdp-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--qitaa-primary);
}

.q-stock-badge {
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

/* Phase 7 — model hero + year selector */
.q-model-hero {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(11, 84, 130, 0.08), transparent 55%),
    linear-gradient(180deg, #f7f9fb 0%, #ffffff 100%);
  border: 1px solid var(--qitaa-border, #e5e9ef);
  border-radius: 16px;
  padding: 1rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .q-model-hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    padding: 1.25rem 1.5rem;
  }
}

.q-model-hero-media {
  position: relative;
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  background: #eef2f6;
  border-radius: 12px;
  overflow: hidden;
}

.q-model-hero-img,
.q-model-hero-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.q-model-hero-brand {
  font-size: 0.95rem;
  color: var(--qitaa-muted, #5a6672);
  letter-spacing: 0.01em;
}

.q-model-hero-title {
  line-height: 1.2;
}

.q-model-year-badge {
  display: inline-block;
  font-weight: 700;
  color: var(--qitaa-primary, #0b5482);
  margin-inline-end: 0.35rem;
}

.q-year-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: 100%;
}

.q-year-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--qitaa-border, #d7dee7);
  border-radius: 8px;
  background: #fff;
  color: #243447;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.q-year-chip:hover {
  border-color: var(--qitaa-primary, #0b5482);
  color: var(--qitaa-primary, #0b5482);
}

.q-year-chip.is-active {
  background: var(--qitaa-primary, #0b5482);
  border-color: var(--qitaa-primary, #0b5482);
  color: #fff;
}

.q-visual-card-media img {
  object-fit: contain;
  background: #f3f6f9;
}

@media (max-width: 991.98px) {
  .q-mega-panels {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .q-mega-col {
    max-height: 200px;
  }
}
