/*
 * storefront.css (B11, 2026-11-26)
 * 1) Product image box: one fixed square frame, contain, light grey (no stretch, no CLS).
 * 2) Product rows: 5 cards per row on desktop (home strips, brand sections, listings).
 * 3) Home banner (blocks/beyazoglu_banner_split): large banner + two stacked cards.
 * Loaded after layout.css / responsive.css so it wins without !important.
 */

/* —— 1) Product image box ———————————————————————————————————————— */
/* Square frame, whole part visible (contain), room at the bottom for the stock chip. */
.bg-product-media {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f6f7f8;
  overflow: hidden;
}

.bg-product-media > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 8% 8% 2.5rem;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
  /* Catalogue photos are shot on white: let the frame colour show through. */
  mix-blend-mode: multiply;
}

/* One card per row (phones by default, or the "1 sütun" density): a square would be ~350px+
   tall, so the frame goes landscape there. */
.bg-catalog-main[data-grid-density="1"] .bg-product-media {
  aspect-ratio: 16 / 10;
  max-height: 22rem;
}

@media (max-width: 639px) {
  .bg-catalog-main:not([data-grid-density]) .bg-product-grid .bg-product-media {
    aspect-ratio: 16 / 10;
  }
}

/* Product page: full-size main image and gallery thumbs, never cropped. */
.bg-pdp__media > img {
  padding: 6%;
  box-sizing: border-box;
  mix-blend-mode: multiply;
}

.bg-pdp__thumbs [data-bg-gallery-thumb] img {
  object-fit: contain;
  padding: 8%;
  box-sizing: border-box;
  mix-blend-mode: multiply;
}

/* Category tiles: `height: 100%` on a grid item resolved to the photo's own height and the
   12% padding pushed it past the 4:3 frame, so tall photos were cut. Pin it to the frame. */
.bg-cat-tile__media {
  position: relative;
}

.bg-cat-tile__media img {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
}

/* —— 2) Five per row on desktop ———————————————————————————————————— */

/* Brand sections (Hyundai / Kia / Toyota): 6 products, 2 → 3 cols stay; desktop shows 5. */
@media (min-width: 1024px) {
  .bg-chip-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }

  .bg-chip-grid > :nth-child(n + 6) {
    display: none;
  }

  /* Home / PDP product carousels (plain and "peek" variant): exactly five cards in view. */
  .bg-product-carousel .bg-product-carousel__slide,
  .bg-product-carousel--peek .bg-product-carousel__slide {
    flex: 0 0 calc((100% - 4rem) / 5);
    width: calc((100% - 4rem) / 5);
    min-width: calc((100% - 4rem) / 5);
    max-width: calc((100% - 4rem) / 5);
  }
}

/* Phones: the strip head stacks; the copy's 12rem flex-basis became a 240px empty gap. */
@media (max-width: 767px) {
  .bg-product-carousel__head {
    align-items: stretch;
  }

  .bg-product-carousel__copy {
    flex: 0 0 auto;
    text-align: left;
  }
}

/* Listings (category / search / brand / model): the 16rem filter column leaves ~1000px at 1440. */
@media (min-width: 1280px) {
  .bg-product-grid {
    --bg-listing-cols: 4;
  }
}

@media (min-width: 1440px) {
  .bg-product-grid {
    --bg-listing-cols: 5;
  }
}

/* —— 3) Home banner: large banner + two cards ——————————————————————— */
.bg-banner-split {
  background: var(--color-background, #fff);
  padding-top: 24px;
}

.bg-banner-split__wrap {
  padding-bottom: 24px;
}

.bg-banner-split__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.bg-banner-split__side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.bg-banner-main,
.bg-banner-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  isolation: isolate;
  container-type: inline-size;
}

/* Neutral panel when an image is missing or still loading. */
.bg-banner--dark {
  background: #16213a;
  color: #fff;
  --bg-banner-scrim: linear-gradient(90deg, rgba(10, 16, 32, 0.82) 0%, rgba(10, 16, 32, 0.62) 38%, rgba(10, 16, 32, 0) 66%);
  --bg-banner-cta-bg: #fff;
  --bg-banner-cta-fg: #111726;
}

.bg-banner--light {
  background: #eef0f2;
  color: #111726;
  --bg-banner-scrim: linear-gradient(90deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.34) 40%, rgba(255, 255, 255, 0) 64%);
  --bg-banner-cta-bg: #fff;
  --bg-banner-cta-fg: #111726;
}

.bg-banner-main__media,
.bg-banner-card__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.bg-banner-main__media img,
.bg-banner-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.bg-banner-main__media::after,
.bg-banner-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-banner-scrim);
  pointer-events: none;
}

/* One link per card, stretched over the whole card (kartın tamamı tıklanabilir). */
.bg-banner__stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.bg-banner-main:focus-within,
.bg-banner-card:focus-within {
  outline: 3px solid var(--color-secondary, #c1121f);
  outline-offset: 2px;
}

.bg-banner__stretched:focus-visible {
  outline: none;
}

/* Large banner: picture on one half, flat text panel on the other (no text over the photo). */
.bg-banner-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 360px;
}

/* Desktop: the copy sets the height (never clipped); the photo half just covers it. */
@media (min-width: 1024px) {
  .bg-banner-main {
    min-height: 460px;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .bg-banner-main {
    min-height: 400px;
  }
}

.bg-banner-main.bg-banner--light {
  background: #f3f3f3;
  color: #111726;
  --bg-banner-cta-bg: var(--color-secondary, #c1121f);
  --bg-banner-cta-fg: #fff;
}

.bg-banner-main.bg-banner--dark {
  background: var(--color-primary, #111827);
  color: #fff;
  --bg-banner-cta-bg: #fff;
  --bg-banner-cta-fg: #111726;
}

.bg-banner-main .bg-banner-main__media {
  position: relative;
  inset: auto;
  z-index: 0;
  min-height: 0;
  background: #e5e7eb;
}

.bg-banner-main .bg-banner-main__media img {
  position: absolute;
  inset: 0;
  object-position: center;
}

.bg-banner-main .bg-banner-main__media::after {
  display: none;
}

.bg-banner-main__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  padding: 44px 44px 44px 48px;
  box-sizing: border-box;
}

.bg-banner-main__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--color-secondary, #c1121f);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bg-banner-main__title {
  margin: 0;
  font-family: var(--font-headings, inherit);
  font-size: clamp(28px, 2.5vw, 36px);
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: inherit;
  text-wrap: balance;
}

.bg-banner-main__title strong {
  display: block;
  font-weight: 800;
}

.bg-banner-main__text {
  margin: 20px 0 0;
  max-width: 400px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: inherit;
  opacity: 0.92;
}

.bg-banner-main__cta,
.bg-banner-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-banner-cta-bg);
  color: var(--bg-banner-cta-fg);
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bg-banner-main__cta {
  margin-top: 32px;
  height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 16px;
}

.bg-banner-main__cta svg,
.bg-banner-card__cta svg {
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .bg-banner-main:hover .bg-banner-main__cta,
  .bg-banner-card:hover .bg-banner-card__cta {
    box-shadow: 0 6px 18px rgba(17, 23, 38, 0.18);
  }

  .bg-banner-main:hover .bg-banner-main__cta svg,
  .bg-banner-card:hover .bg-banner-card__cta svg {
    transform: translateX(3px);
  }

  .bg-banner-main:hover .bg-banner-main__media img,
  .bg-banner-card:hover .bg-banner-card__media img {
    transform: scale(1.02);
  }
}

.bg-banner-main__media img,
.bg-banner-card__media img {
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Cards */
.bg-banner-card {
  display: flex;
  align-items: center;
  aspect-ratio: 1.7447;
  min-height: 180px;
}

.bg-banner-card__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 50%;
  padding: 24px 0 24px 28px;
  box-sizing: content-box;
}

.bg-banner-card__title {
  margin: 0;
  font-family: var(--font-headings, inherit);
  font-size: 24px;
  line-height: 31px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: inherit;
  text-wrap: balance;
}

.bg-banner-card__title a {
  color: inherit;
}

.bg-banner-card__text {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: inherit;
  opacity: 0.9;
}

.bg-banner-card__cta {
  margin-top: 16px;
  height: 39px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
}

/* Narrow cards (tablet columns, 1024–1279 desktop): title + button only. */
@container (max-width: 380px) {
  .bg-banner-card__copy {
    padding-left: 20px;
  }

  .bg-banner-card__title {
    font-size: 20px;
    line-height: 26px;
  }

  .bg-banner-card__text {
    display: none;
  }

  .bg-banner-card__cta {
    margin-top: 12px;
    height: 36px;
  }
}

/* Phones: the large banner becomes a vertical card (picture on top, copy below). */
@media (max-width: 767px) {
  .bg-banner-split {
    padding-top: 16px;
  }

  .bg-banner-split__wrap {
    padding-bottom: 16px;
  }

  .bg-banner-main {
    grid-template-columns: minmax(0, 1fr);
    aspect-ratio: auto;
    min-height: 0;
  }

  .bg-banner-main .bg-banner-main__media {
    aspect-ratio: 16 / 10;
  }

  .bg-banner-main__copy {
    padding: 20px 20px 24px;
  }

  .bg-banner-main__eyebrow {
    margin-bottom: 12px;
  }

  .bg-banner-main__title {
    font-size: 26px;
    line-height: 32px;
  }

  .bg-banner-main__text {
    margin-top: 12px;
    font-size: 15px;
    line-height: 22px;
  }

  .bg-banner-main__cta {
    align-self: stretch;
    margin-top: 20px;
    height: 48px;
  }

  .bg-banner-card {
    aspect-ratio: 1.74;
    min-height: 0;
  }

  .bg-banner-card__copy {
    width: 54%;
    padding: 16px 0 16px 20px;
  }
}

/* Tablets: large banner full width, the two cards side by side under it. */
@media (min-width: 768px) {
  .bg-banner-split__side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .bg-banner-split {
    padding-top: 24px;
  }

  .bg-banner-split__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
  }

  .bg-banner-split__grid--single {
    grid-template-columns: minmax(0, 1fr);
  }

  .bg-banner-split__side {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .bg-banner-split__side .bg-banner-card {
    aspect-ratio: auto;
    min-height: 0;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .bg-banner-main__copy {
    padding-left: 36px;
  }

  .bg-banner-main__title {
    font-size: 30px;
    line-height: 38px;
  }

  .bg-banner-main__text {
    font-size: 15px;
    line-height: 22px;
  }

  .bg-banner-main__cta {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-banner-main__media img,
  .bg-banner-card__media img,
  .bg-banner-main__cta svg,
  .bg-banner-card__cta svg {
    transition: none;
  }

  .bg-banner-main:hover .bg-banner-main__media img,
  .bg-banner-card:hover .bg-banner-card__media img {
    transform: none;
  }
}

/* PDP "Sepete Ekle": `main .px-8 { padding-inline: 0 }` (layout.css) also stripped this
   button's px-8, so the label ran into the edges. */
.bg-pdp__actions [data-add-to-cart-form] button[type="submit"] {
  padding-left: 28px;
  padding-right: 28px;
  min-height: 48px;
  justify-content: center;
  white-space: nowrap;
}

/* —— B12: home brand sections (partials/brand-showcase.blade.php) ——————————————
   Head (logo + title), all models in one scrollable chip row, product cards, then a
   panel with the brand's most stocked part groups (one scrollable row) and the
   "Tüm … Parçalarını Gör" link. */
.bg-brand-showcase__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.bg-brand-showcase__logo {
  width: 72px;
  height: 72px;
}

.bg-brand-showcase__label {
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted-foreground, #64748b);
}

.bg-brand-showcase__label-count {
  margin-left: 4px;
  font-weight: 600;
  opacity: 0.8;
}

.bg-brand-showcase__models {
  margin-bottom: 24px;
}

.bg-brand-showcase__foot {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 16px 20px;
}

.bg-brand-showcase__groups {
  flex: 1 1 auto;
  min-width: 0;
}

.bg-brand-showcase__all {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--color-primary, #111827);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.1s ease-out;
}

.bg-brand-showcase__all svg {
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .bg-brand-showcase__all:hover {
    background: var(--color-secondary, #c1121f);
  }

  .bg-brand-showcase__all:hover svg {
    transform: translateX(3px);
  }
}

.bg-brand-showcase__all:active {
  transform: scale(0.97);
}

.bg-brand-showcase__all:focus-visible {
  outline: 3px solid var(--color-secondary, #c1121f);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .bg-brand-showcase__head {
    gap: 12px;
    margin-bottom: 16px;
  }

  .bg-brand-showcase__logo {
    width: 56px;
    height: 56px;
  }

  .bg-brand-showcase__models {
    margin-bottom: 20px;
  }

  .bg-brand-showcase__foot {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }

  .bg-brand-showcase__all {
    width: 100%;
    height: 48px;
  }
}

/* One-row scrollable chips (assets/js/chip-scroll.js adds fades + mouse arrows).
   The track bleeds into the section padding a little so focus rings are not clipped. */
.bg-chip-scroll {
  position: relative;
  min-width: 0;
}

.bg-chip-scroll__track {
  display: flex;
  gap: 8px;
  margin: 0 -4px;
  padding: 4px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.bg-chip-scroll__track::-webkit-scrollbar {
  display: none;
}

.bg-chip-scroll__track > li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* Soft edge where more chips continue (only once the script knows the row overflows). */
.bg-chip-scroll[data-overflow]:not([data-end]) .bg-chip-scroll__track {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
}

.bg-chip-scroll[data-overflow]:not([data-start]):not([data-end]) .bg-chip-scroll__track {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
}

.bg-chip-scroll[data-overflow][data-end]:not([data-start]) .bg-chip-scroll__track {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px);
  mask-image: linear-gradient(90deg, transparent, #000 56px);
}

.bg-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 999px;
  background: var(--color-card, #fff);
  color: var(--color-primary, #111827);
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.1s ease-out;
  -webkit-tap-highlight-color: transparent;
}

.bg-chip__count {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-muted-foreground, #64748b);
}

.bg-chip--group {
  border-color: transparent;
  background: var(--color-secondary, #c1121f);
  color: #fff;
}

.bg-chip--group .bg-chip__count {
  color: rgba(255, 255, 255, 0.78);
}

@media (hover: hover) {
  .bg-chip--model:hover {
    border-color: var(--color-primary, #111827);
  }

  .bg-chip--group:hover {
    background: var(--color-primary, #111827);
  }
}

.bg-chip:active {
  transform: scale(0.97);
}

.bg-chip:focus-visible {
  outline: 2px solid var(--color-secondary, #c1121f);
  outline-offset: 2px;
}

.bg-chip--group:focus-visible {
  outline-color: var(--color-primary, #111827);
}

@media (pointer: coarse) {
  .bg-chip {
    height: 44px;
  }
}

.bg-chip-scroll__arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  padding: 0;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 999px;
  background: var(--color-card, #fff);
  color: var(--color-primary, #111827);
  box-shadow: 0 2px 8px rgba(17, 23, 38, 0.12);
  cursor: pointer;
  transition: transform 0.1s ease-out;
}

.bg-chip-scroll__arrow[hidden] {
  display: none;
}

.bg-chip-scroll__arrow--prev {
  left: -6px;
}

.bg-chip-scroll__arrow--next {
  right: -6px;
}

.bg-chip-scroll__arrow:active {
  transform: scale(0.92);
}

/* Touch screens swipe the row; the buttons are for mice only. */
@media (hover: none), (pointer: coarse) {
  .bg-chip-scroll__arrow {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-chip,
  .bg-chip-scroll__arrow,
  .bg-brand-showcase__all,
  .bg-brand-showcase__all svg {
    transition: none;
  }

  .bg-chip:active,
  .bg-chip-scroll__arrow:active,
  .bg-brand-showcase__all:active {
    transform: none;
  }
}

/* —— B12: large banner carousel (blocks/beyazoglu_banner_split, assets/js/hero-slider.js) ——
   Slides sit in one flex row inside a clipped viewport; the script only moves the track,
   so the first paint already has the final height (no layout shift). Controls are the
   hero's page control, recoloured to read over both the photo and the light panel. */
.bg-banner-carousel {
  position: relative;
  min-width: 0;
  --bg-banner-ctl-bg: rgba(17, 23, 38, 0.56);
}

.bg-banner-carousel__viewport {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  height: 100%;
}

.bg-banner-carousel__track {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.bg-banner-carousel[data-bg-hero-slider] .bg-banner-carousel__track {
  touch-action: pan-y;
  will-change: transform;
}

.bg-banner-carousel__track > .bg-banner-main {
  flex: 0 0 100%;
  min-width: 0;
}

/* The slide's own focus ring would be clipped by the viewport: draw it inside. */
.bg-banner-carousel .bg-banner-main:focus-within {
  outline-offset: -3px;
}

.bg-banner-carousel.is-dragging {
  cursor: grabbing;
}

.bg-banner-carousel.is-dragging .bg-banner-main,
.bg-banner-carousel .bg-banner-main img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.bg-banner-carousel .bg-banner-main.is-fading {
  animation: bg-hero-fade 240ms ease-out;
}

/* Page control over the photo half (desktop/tablet), below the card on phones. */
.bg-banner-carousel .bg-hero-controls {
  left: 25%;
  bottom: 16px;
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--bg-banner-ctl-bg);
}

.bg-banner-carousel:not(.is-ready) .bg-hero-controls,
.bg-banner-carousel:not(.is-ready) .bg-hero-arrow {
  visibility: hidden;
}

.bg-banner-carousel[data-playing] .bg-hero-dot.is-active .bg-hero-dot__fill {
  animation: bg-hero-progress var(--bg-hero-interval, 6000ms) linear forwards;
}

.bg-banner-carousel[data-paused] .bg-hero-dot.is-active .bg-hero-dot__fill {
  animation-play-state: paused;
}

.bg-banner-carousel[data-playing] .bg-hero-toggle__play {
  display: none;
}

.bg-banner-carousel[data-playing] .bg-hero-toggle__pause {
  display: block;
}

/* Arrows: solid white discs at the card's edges, shown on hover / keyboard focus. */
.bg-banner-carousel .bg-hero-arrow {
  border-color: rgba(17, 23, 38, 0.08);
  background: #fff;
  color: var(--color-primary, #111827);
  box-shadow: 0 4px 14px rgba(17, 23, 38, 0.16);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.bg-banner-carousel .bg-hero-arrow--prev {
  left: 14px;
}

.bg-banner-carousel .bg-hero-arrow--next {
  right: 14px;
}

.bg-banner-carousel:hover .bg-hero-arrow,
.bg-banner-carousel .bg-hero-arrow:focus-visible {
  opacity: 1;
}

.bg-banner-carousel .bg-hero-arrow:hover {
  background: #f3f4f6;
}

.bg-banner-carousel .bg-hero-arrow:focus-visible {
  outline-color: var(--color-secondary, #c1121f);
}

@media (min-width: 1024px) and (hover: hover) {
  .bg-banner-carousel .bg-hero-arrow {
    display: grid;
  }
}

@media (max-width: 1023px), (hover: none) {
  .bg-banner-carousel .bg-hero-arrow {
    display: none;
  }
}

@media (max-width: 767px) {
  /* Phones: the viewport sizes to the cards (the controls sit under it, in flow) and the
     copy starts at the top, so a shorter slide does not float in the middle of the card. */
  .bg-banner-carousel__viewport,
  .bg-banner-carousel__track {
    height: auto;
  }

  .bg-banner-carousel .bg-banner-main__copy {
    justify-content: flex-start;
  }

  /* The button sits at the bottom of every slide, wherever the copy ends. */
  .bg-banner-carousel .bg-banner-main__title,
  .bg-banner-carousel .bg-banner-main__text {
    margin-bottom: 20px;
  }

  .bg-banner-carousel .bg-banner-main__text + .bg-banner-main__cta,
  .bg-banner-carousel .bg-banner-main__title + .bg-banner-main__cta {
    margin-top: auto;
  }

  .bg-banner-carousel .bg-banner-main__title:has(+ .bg-banner-main__text) {
    margin-bottom: 0;
  }

  .bg-banner-carousel .bg-hero-controls {
    position: static;
    width: max-content;
    margin: 10px auto 0;
    transform: none;
    border-color: transparent;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .bg-banner-carousel .bg-hero-dot__bar {
    background: rgba(17, 23, 38, 0.22);
  }

  .bg-banner-carousel .bg-hero-dot.is-active .bg-hero-dot__bar {
    background: rgba(17, 23, 38, 0.14);
  }

  .bg-banner-carousel .bg-hero-dot__fill {
    background: var(--color-secondary, #c1121f);
  }

  .bg-banner-carousel .bg-hero-toggle {
    color: var(--color-primary, #111827);
    background: rgba(17, 23, 38, 0.08);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .bg-banner-carousel {
    --bg-banner-ctl-bg: rgba(17, 23, 38, 0.92);
  }
}

/* Photo credit on a carousel slide (CC BY photos): tiny caption over the photo's top-left
   corner, above the stretched slide link so its own link stays clickable. */
.bg-banner-main__credit {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  max-width: calc(50% - 16px);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(17, 23, 38, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.bg-banner-main__credit:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .bg-banner-main__credit {
    max-width: calc(100% - 16px);
  }
}

/* Empty listing card (partials/catalog/empty-whatsapp): brand / model / category / search
   with 0 products. One calm card, icon, short text, WhatsApp first, phone second. */
.bg-empty-wa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 36rem;
  margin: 1.5rem auto 2rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--color-card, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 1rem;
}
.bg-empty-wa__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--color-surface, #f3f4f6);
  color: var(--color-primary, #111827);
}
.bg-empty-wa__title {
  margin: 0.25rem 0 0;
  font-family: var(--font-headings, inherit);
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-primary, #111827);
  overflow-wrap: anywhere;
}
.bg-empty-wa__body {
  margin: 0;
  max-width: 30rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-muted-foreground, #4b5563);
}
.bg-empty-wa__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 0.5rem;
}
.bg-empty-wa__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.bg-empty-wa__btn--wa {
  background: #1a7f45;
  color: #fff;
}
.bg-empty-wa__btn--wa:hover,
.bg-empty-wa__btn--wa:focus-visible {
  background: #146a39;
  color: #fff;
}
.bg-empty-wa__btn--ghost {
  background: var(--color-card, #fff);
  color: var(--color-primary, #111827);
  border: 1px solid var(--color-border, #e5e7eb);
}
.bg-empty-wa__btn--ghost:hover,
.bg-empty-wa__btn--ghost:focus-visible {
  border-color: var(--color-primary, #111827);
}
.bg-empty-wa__btn:focus-visible,
.bg-empty-wa__link:focus-visible {
  outline: 2px solid var(--color-secondary, #2563eb);
  outline-offset: 2px;
}
.bg-empty-wa__link {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-secondary, #2563eb);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 640px) {
  .bg-empty-wa {
    margin: 1rem 0 1.5rem;
    padding: 1.5rem 1rem;
  }
  .bg-empty-wa__actions {
    flex-direction: column;
    align-self: stretch;
  }
  .bg-empty-wa__btn {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bg-empty-wa__btn { transition: none; }
}
