/*
Theme Name: Kadence Child
Template: kadence
Version: 1.0
*/

.homepage-carousel {
  position: relative;
  padding: 16px 10px 24px;
  overflow: visible;
}

.homepage-carousel .swiper {
  overflow: visible;
}

.homepage-carousel .swiper-wrapper {
  overflow: visible;
}

.homepage-carousel .swiper-slide {
  padding: 12px;
  box-sizing: border-box;
  height: auto;
}

.carousel-card {
  position: relative;
  background: #ffffff !important;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
  border-radius: 10px;
  padding: 24px;
  padding-bottom: 88px;
  text-decoration: none;
  color: inherit;
  box-shadow: rgba(0, 0, 0, 0.2) 0 0 14px 0;
  min-height: unset;
}

.carousel-card__image {
  align-self: start;
}

.carousel-card__image img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.carousel-card__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: start;
  padding-top: 0;
  min-width: 0;
}

.carousel-card__date {
  font-size: 14px;
  margin: 0 0 4px;
  line-height: 1.2;
}

.carousel-card__title {
  font-size: 42px;
  line-height: 1.05;
  font-style: italic;
  margin: 0 0 10px !important;
  min-width: 0;
  overflow-wrap: anywhere;
}

.carousel-card__text {
  font-size: 18px;
  color: #444;
  margin: 0;
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}

.carousel-nav {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 12px;
  z-index: 2;
}

.carousel-prev,
.carousel-next {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-prev {
  background: #f3f3f3;
  color: #222;
}

.carousel-next {
  background: #d8b23f;
  color: #fff;
}

@media (max-width: 767px) {
  .homepage-carousel {
    padding: 12px 6px 20px;
  }

  .homepage-carousel .swiper-slide {
    padding: 6px;
  }

  .carousel-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
    padding-bottom: 88px;
    border-radius: 16px;
  }

  .carousel-card__image img {
    width: 100%;
    height: 220px;
    border-radius: 12px;
  }

  .carousel-card__content {
    padding: 0;
  }

  .carousel-card__date {
    font-size: 13px;
    margin: 0 0 4px;
  }

  .carousel-card__title {
    font-size: 28px;
    line-height: 1.05;
    margin: 0 0 8px !important;
  }

  .carousel-card__text {
    font-size: 16px;
    line-height: 1.4;
  }

  .carousel-nav {
    right: 16px;
    bottom: 16px;
    gap: 10px;
  }

  .carousel-prev,
  .carousel-next {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
}

.cars-list-container {
    max-width: 100%; /* Allow background to go wider if needed */
    margin: 40px auto;
    padding: 0; /* Removing padding here so background can reach edges */
}

.car-list-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 0; /* Reset margin */
    padding: 80px calc((100% - 1200px) / 2); /* Keeps content centered at 1200px */
    align-items: center;
}

/* Alternating logic */
.car-list-row.is-even .car-list-image { order: 2; }
.car-list-row.is-even .car-list-content { order: 1; }

/* Image on the LEFT for odd rows */
.car-list-row.is-odd .car-list-image { order: 1; }
.car-list-row.is-odd .car-list-content { order: 2; }

.car-list-row.is-even {
    background-color: #f9f9f9; /* A very soft gray */
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

/* Ensure the specs icons look good on the gray background */
.car-list-row.is-even .car-specs-icons li {
    background: #ffffff; /* White pills on gray background */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.car-list-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.car-list-image img:hover {
    transform: scale(1.02);
}

.car-list-date {
    color: var(--global-palette3); /* Uses Kadence color variable */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.car-list-title, 
.car-list-title a {
    font-size: 36px;
    text-decoration: none;
    color: #333;
    font-style: italic;
    line-height: 1.2;
    display: inline-block;
}

.car-list-title a:hover {
    color: #333;
}

.car-specs-icons {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
    margin: 25px 0;
}

.car-specs-icons li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    background: #f5f5f5;
    padding: 8px 15px;
    border-radius: 50px;
}

.car-view-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--global-palette1);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 15px;
}

.car-price {
    font-weight: bold;
    color: var(--global-palette1);
    margin-left: 15px;
    font-style: normal;
    font-size: 0.8em;
}

/* Responsive for Mobile */
@media (max-width: 1240px) {
    .car-list-row {
        padding: 60px 20px;
    }
}

/* Responsive for Mobile */
@media (max-width: 768px) {
    .car-list-row {
        grid-template-columns: 1fr; /* Stack columns into one */
        gap: 30px;
        padding: 40px 20px;
        margin-bottom: 0;
    }

    /* FORCE IMAGE ON TOP FOR ALL ROWS ON MOBILE */
    .car-list-row.is-even .car-list-image, 
    .car-list-row.is-odd .car-list-image {
        order: 1 !important; /* Image goes first */
    }

    .car-list-row.is-even .car-list-content, 
    .car-list-row.is-odd .car-list-content {
        order: 2 !important; /* Text goes second */
    }

    .car-list-title a {
        font-size: 28px;
    }

    /* Center text on mobile for a cleaner look */
    .car-list-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .car-specs-icons {
        justify-content: center;
        flex-wrap: wrap;
    }
}
