/* ==========================================================================
   DRIVMAN — Homepage styles
   ========================================================================== */

/* ---------- Hero ---------- */
.dm-hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  padding-top: calc(var(--dm-navbar-height) + var(--dm-space-4));
  padding-bottom: var(--dm-space-6);
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 50% -10%,
      rgba(196, 0, 24, 0.18),
      transparent 60%
    ),
    var(--dm-black);
}
.dm-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.dm-hero__wing {
  position: absolute;
  top: 50%;
  width: 46vw;
  height: 70vh;
  background: linear-gradient(180deg, rgba(196, 0, 24, 0.1), transparent 70%);
  filter: blur(40px);
  transform: translateY(-50%);
}
.dm-hero__wing--left {
  left: -14vw;
  clip-path: polygon(0 30%, 100% 0, 60% 50%, 100% 100%, 0 70%);
}
.dm-hero__wing--right {
  right: -14vw;
  clip-path: polygon(100% 30%, 0 0, 40% 50%, 0 100%, 100% 70%);
}
.dm-hero__glow {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(196, 0, 24, 0.22), transparent 65%);
  transform: translate(-50%, -50%);
}

/* ---------- Hero: split banner + finder panel ---------- */
.dm-hero__split {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dm-space-3);
}
@media (min-width: 992px) {
  .dm-hero__split {
    grid-template-columns: 2.3fr 1fr;
    align-items: stretch;
    min-height: 420px;
  }
}

.dm-hero__banner-swiper {
  border-radius: var(--dm-radius-lg);
  overflow: hidden;
  /* Without an explicit width, this grid item collapses to 0px — CSS Grid's
     default stretch doesn't reliably apply to a block-level element that
     also establishes a new block-formatting context (overflow:hidden), so
     Swiper ends up initializing on a 0-width container and the whole
     carousel becomes invisible. min-width:0 lets it shrink inside the grid
     track instead of overflowing it. */
  width: 100%;
  min-width: 0;
}
.dm-hero__banner {
  position: relative;
  min-height: 320px;
  height: 100%;
  background: #0c0c0d;
}
@media (min-width: 992px) {
  .dm-hero__banner {
    min-height: 420px;
  }
}
.dm-hero__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.dm-hero__banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.15) 45%,
    transparent 70%
  );
}
.dm-hero__banner-text {
  position: absolute;
  left: 0;
  bottom: 44px;
  z-index: 2;
  padding: 0 var(--dm-space-4);
  font-family: var(--dm-font-display);
  font-size: var(--dm-fs-xl);
  line-height: 1.1;
}
.dm-hero__banner-pagination {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 3;
}
.dm-hero__banner-pagination .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.5;
}
.dm-hero__banner-pagination .swiper-pagination-bullet-active {
  background: var(--dm-red-bright);
  opacity: 1;
}

.dm-hero__finder {
  background: var(--dm-black-soft);
  border: 1px solid var(--dm-border);
  border-radius: var(--dm-radius-lg);
  padding: var(--dm-space-5) var(--dm-space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
}
.dm-hero__finder i {
  font-size: 26px;
  color: var(--dm-red-bright);
  margin-bottom: var(--dm-space-2);
  display: block;
}
.dm-hero__finder h3 {
  font-size: var(--dm-fs-md);
  margin-bottom: 8px;
}
.dm-hero__finder p {
  color: var(--dm-text-muted);
  font-size: var(--dm-fs-sm);
  margin-bottom: var(--dm-space-3);
}

/* ---------- Section alt background ---------- */
.dm-section--alt {
  background: var(--dm-black-soft);
}

/* ---------- Vehicle Finder ---------- */
.dm-vehicle-finder {
  margin-top: -48px;
  position: relative;
  z-index: 3;
}
.dm-vehicle-finder__panel {
  padding: var(--dm-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--dm-space-3);
  box-shadow: var(--dm-shadow-card);
  background-color: var(--dm-black-soft);
}
@media (min-width: 992px) {
  .dm-vehicle-finder__panel {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--dm-space-3) var(--dm-space-4);
  }
}
.dm-vehicle-finder__label {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--dm-text-primary);
}
.dm-vehicle-finder__label i {
  font-size: 28px;
  color: var(--dm-red-bright);
}
.dm-vehicle-finder__label span {
  display: block;
  font-size: var(--dm-fs-sm);
  color: var(--dm-text-muted);
}
.dm-vehicle-finder__form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  flex: 1;
}
@media (min-width: 992px) {
  .dm-vehicle-finder__form {
    grid-template-columns: repeat(3, 1fr);
    margin-left: var(--dm-space-4);
  }
}
.dm-vehicle-finder__form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(255, 255, 255, 0.06);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6z' fill='%23E8002A'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  border: 1px solid var(--dm-border-strong);
  color: var(--dm-text-primary);
  padding: 12px 34px 12px 14px;
  border-radius: var(--dm-radius-sm);
  font-size: var(--dm-fs-sm);
  cursor: pointer;
  transition: border-color var(--dm-speed-fast) var(--dm-ease);
}
.dm-vehicle-finder__form select:hover {
  border-color: var(--dm-border-strong);
}
.dm-vehicle-finder__form select:focus-visible {
  outline: none;
  border-color: var(--dm-red);
}
.dm-vehicle-finder__form select option {
  background-color: #17171a;
  color: var(--dm-text-primary);
}
.dm-vehicle-finder__form select option:disabled {
  color: var(--dm-text-muted);
}
.dm-vehicle-finder__form button {
  grid-column: 1 / -1;
}
@media (min-width: 992px) {
  .dm-vehicle-finder__form button {
    grid-column: auto;
  }
}

/* ---------- Generic icon-tile cards (vehicle types / categories) ---------- */
.dm-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: var(--dm-space-3);
  height: 100%;
}
.dm-tile__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--dm-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dm-grad-glass);
  border: 1px solid var(--dm-border);
  font-size: 22px;
  color: var(--dm-red-bright);
}
.dm-tile h3 {
  font-size: var(--dm-fs-md);
  font-weight: 600;
}
.dm-tile p {
  color: var(--dm-text-muted);
  font-size: var(--dm-fs-sm);
  margin: 0;
}
.dm-tile__link {
  margin-top: auto;
  font-size: var(--dm-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dm-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dm-tile__link i {
  color: var(--dm-red-bright);
  transition: transform var(--dm-speed-fast) var(--dm-ease);
}
.dm-card:hover .dm-tile__link i {
  transform: translateX(4px);
}

/* ---------- Category tile subcategory chips ---------- */
.dm-tile--category {
  padding-bottom: var(--dm-space-3);
}
.dm-tile__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 2px;
}
.dm-tile__chip {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--dm-border);
  color: var(--dm-text-muted);
  background: rgba(255, 255, 255, 0.02);
  transition:
    color var(--dm-speed-fast) var(--dm-ease),
    border-color var(--dm-speed-fast) var(--dm-ease),
    background var(--dm-speed-fast) var(--dm-ease);
}
.dm-tile__chip:hover {
  color: var(--dm-text-primary);
  border-color: var(--dm-red-bright);
  background: rgba(196, 0, 24, 0.08);
}

/* ---------- Brand swiper ---------- */
.dm-brand-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  opacity: 0.55;
  transition: opacity var(--dm-speed-base);
}
.dm-brand-swiper .swiper-slide:hover {
  opacity: 1;
}
.dm-brand-swiper .swiper-slide img {
  filter: grayscale(1) brightness(1.6);
  transition: filter var(--dm-speed-base);
  max-height: 32px;
  width: auto;
}
.dm-brand-swiper .swiper-slide:hover img {
  filter: none;
}
.dm-brand-swiper .swiper-slide span {
  font-family: var(--dm-font-display);
  font-weight: 700;
  font-size: var(--dm-fs-md);
  color: var(--dm-text-primary);
  letter-spacing: 0.04em;
}

/* ---------- Offer band ---------- */
.dm-offer-band {
  background: linear-gradient(120deg, #150505, #090909 60%);
  border-top: 1px solid var(--dm-border);
  border-bottom: 1px solid var(--dm-border);
}
.dm-offer-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--dm-space-4);
}
.dm-offer-band__inner h2 {
  font-size: var(--dm-fs-lg);
  max-width: 480px;
}
.dm-offer-band__timer {
  display: flex;
  gap: 12px;
}
.dm-offer-band__timer div {
  background: var(--dm-surface);
  border: 1px solid var(--dm-border-strong);
  border-radius: var(--dm-radius-sm);
  padding: 10px 14px;
  text-align: center;
  min-width: 64px;
}
.dm-offer-band__timer span {
  display: block;
  font-family: var(--dm-font-display);
  font-size: var(--dm-fs-md);
  color: var(--dm-text-primary);
}
.dm-offer-band__timer label {
  font-size: 10px;
  color: var(--dm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (max-width: 420px) {
  .dm-offer-band__timer {
    gap: 6px;
  }
  .dm-offer-band__timer div {
    padding: 8px 8px;
    min-width: 50px;
  }
  .dm-offer-band__timer span {
    font-size: var(--dm-fs-base);
  }
}

/* ---------- Feature blocks ---------- */
.dm-feature {
  padding: var(--dm-space-3);
  text-align: left;
}
.dm-feature i {
  font-size: 28px;
  color: var(--dm-red-bright);
  margin-bottom: var(--dm-space-2);
  display: block;
}
.dm-feature h3 {
  font-size: var(--dm-fs-base);
  font-weight: 600;
  margin-bottom: 6px;
}
.dm-feature p {
  color: var(--dm-text-muted);
  font-size: var(--dm-fs-sm);
  margin: 0;
}

/* ---------- Process steps ---------- */
.dm-process {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dm-space-4);
  position: relative;
}
@media (min-width: 992px) {
  .dm-process {
    grid-template-columns: repeat(4, 1fr);
  }
}
.dm-process__step {
  position: relative;
  padding-top: var(--dm-space-3);
  border-top: 2px solid var(--dm-border-strong);
}
.dm-process__num {
  font-family: var(--dm-font-display);
  font-size: var(--dm-fs-lg);
  font-weight: 700;
  background: var(--dm-grad-silver);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin-bottom: var(--dm-space-2);
}
.dm-process__step h3 {
  font-size: var(--dm-fs-base);
  margin-bottom: 8px;
}
.dm-process__step p {
  color: var(--dm-text-muted);
  font-size: var(--dm-fs-sm);
  margin: 0;
}

/* ---------- Reviews ---------- */
.dm-review-card {
  background: var(--dm-surface);
  border: 1px solid var(--dm-border);
  border-radius: var(--dm-radius-md);
  padding: var(--dm-space-4);
  height: 100%;
}
.dm-review-card .stars {
  color: var(--dm-red-bright);
  margin-bottom: var(--dm-space-2);
  font-size: 13px;
}
.dm-review-card p.quote {
  color: var(--dm-text-secondary);
  font-size: var(--dm-fs-base);
  margin-bottom: var(--dm-space-3);
}
.dm-review-card .author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dm-review-card .author .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dm-grad-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-family: var(--dm-font-display);
}
.dm-review-card .author strong {
  display: block;
  font-size: var(--dm-fs-sm);
  color: var(--dm-text-primary);
}
.dm-review-card .author span {
  font-size: var(--dm-fs-xs);
  color: var(--dm-text-muted);
}
.dm-review-swiper {
  padding-bottom: 48px;
}
.dm-review-swiper .swiper-pagination-bullet {
  background: var(--dm-text-muted);
  opacity: 0.5;
}
.dm-review-swiper .swiper-pagination-bullet-active {
  background: var(--dm-red-bright);
  opacity: 1;
}

/* ---------- Insta grid ---------- */
.dm-insta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 768px) {
  .dm-insta-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}
.dm-insta-grid__item {
  aspect-ratio: 1/1;
  border-radius: var(--dm-radius-sm);
  overflow: hidden;
  background: linear-gradient(160deg, #1c1c1e, #0c0c0d);
  border: 1px solid var(--dm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dm-text-muted);
  font-size: 22px;
  position: relative;
  transition:
    transform var(--dm-speed-base) var(--dm-ease),
    border-color var(--dm-speed-base) var(--dm-ease);
}
.dm-insta-grid__item:hover {
  transform: translateY(-4px);
  border-color: var(--dm-border-strong);
}
.dm-insta-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dm-insta-grid__item i {
  font-size: 26px;
  color: var(--dm-text-muted);
}
.dm-insta-grid__item::after {
  content: "\f16d";
  font-family: "Font Awesome 6 Brands";
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* ---------- Newsletter CTA ---------- */
.dm-newsletter-cta {
  text-align: center;
  padding: var(--dm-space-6) var(--dm-space-3);
}
.dm-newsletter-cta h2 {
  font-size: var(--dm-fs-lg);
  margin-bottom: 10px;
}
.dm-newsletter-cta p {
  color: var(--dm-text-muted);
  margin-bottom: var(--dm-space-3);
}

/* ==========================================================================
   Reusable product carousel (Swiper) — used on Homepage (Best Sellers, New
   Arrivals), Product Details (Related, Recently Viewed) and Cart (Suggestions)
   ========================================================================== */
.dm-product-swiper {
  padding-bottom: 8px;
  overflow: hidden;
}
@media (min-width: 1200px) {
  .dm-product-swiper {
    overflow: visible;
  }
}
.dm-product-swiper .swiper-slide {
  height: auto;
}
.dm-product-swiper-nav {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.dm-product-swiper-nav button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dm-border-strong);
  color: var(--dm-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition:
    background var(--dm-speed-fast) var(--dm-ease),
    border-color var(--dm-speed-fast) var(--dm-ease);
}
.dm-product-swiper-nav button:hover {
  background: var(--dm-grad-red);
  border-color: transparent;
}
.dm-product-swiper-nav button.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}
@media (max-width: 767px) {
  .dm-product-swiper-nav {
    display: none;
  }
}

/* ==========================================================================
   DRIVMAN — Additional responsive fixes (append to home.css)
   ========================================================================== */

/* ---------- Hero: small phones ---------- */
@media (max-width: 575px) {
  .dm-hero {
    min-height: auto;
    padding-bottom: var(--dm-space-5);
  }
}

/* ---------- Vehicle finder: avoid hero overlap on short mobile screens ---------- */
@media (max-width: 575px) {
  .dm-vehicle-finder {
    margin-top: -24px;
  }
  .dm-vehicle-finder__panel {
    padding: var(--dm-space-3);
  }
  .dm-vehicle-finder__form select {
    padding: 12px 30px 12px 12px;
    font-size: 13px;
  }
}

/* ---------- Insta grid: tablet step ---------- */
@media (min-width: 576px) and (max-width: 991px) {
  .dm-insta-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Footer: tablet step ---------- */
@media (min-width: 576px) and (max-width: 767px) {
  .dm-footer__top {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Container: tighter on very small phones ---------- */
@media (max-width: 380px) {
  .dm-container {
    padding: 0 16px;
  }
}

/* ---------- Tile carousel (vehicle types / categories) ---------- */
.dm-tile-swiper {
  padding-bottom: 36px;
}
.dm-tile-swiper .swiper-slide {
  height: auto;
}
.dm-tile-swiper .swiper-pagination-bullet {
  background: var(--dm-text-muted);
  opacity: 0.5;
}
.dm-tile-swiper .swiper-pagination-bullet-active {
  background: var(--dm-red-bright);
  opacity: 1;
}
@media (min-width: 992px) {
  .dm-tile-swiper .swiper-pagination {
    display: none;
  }
}

/* ---------- Blog swiper pagination ---------- */
#blogSwiper.dm-product-swiper {
  padding-bottom: 36px;
}
@media (min-width: 768px) {
  #blogSwiper .swiper-pagination {
    display: none;
  }
}

/* ---------- Newsletter form: fix button overflow on mobile ---------- */
@media (max-width: 575px) {
  .dm-newsletter-cta .dm-footer__newsletter {
    flex-direction: column;
  }
  .dm-newsletter-cta .dm-footer__newsletter input,
  .dm-newsletter-cta .dm-footer__newsletter button {
    width: 100%;
  }
}
/* ---------- Best Seller / New Arrival pagination dots ---------- */
#bestSellerSwiper,
#newArrivalSwiper {
  padding-bottom: 36px;
}
#bestSellerSwiper .swiper-pagination-bullet,
#newArrivalSwiper .swiper-pagination-bullet {
  background: var(--dm-text-muted);
  opacity: 0.5;
}
#bestSellerSwiper .swiper-pagination-bullet-active,
#newArrivalSwiper .swiper-pagination-bullet-active {
  background: var(--dm-red-bright);
  opacity: 1;
}
@media (min-width: 768px) {
  #bestSellerSwiper .swiper-pagination,
  #newArrivalSwiper .swiper-pagination {
    display: none;
  }
}
