:root {
  --tile-light-text: #ffffff;
  --tile-dark-text: #333333;
  --tile-light-background: rgba(255, 255, 255, 0.8);
  --tile-dark-background: rgba(0, 0, 0, 0.8);
}


/* Add these classes to the existing CSS file */
.tile-light-mode {
  color: var(--tile-dark-text);
}

.tile-light-mode .tile-slide-content {
  background-color: var(--tile-light-background);
}

.tile-dark-mode {
  color: var(--tile-light-text);
}

.tile-dark-mode .tile-slide-content {
  background-color: var(--tile-dark-background);
}

.tile-dark-mode .tile-shop-now {
  background-color: white;
  color: #000d2f;
}


.tile-vehicle-slideshow-wrapper {
  width: 100%;
  background-color: #FFFFFF;
  overflow: hidden;
}

.tile-vehicle-slideshow {
  max-width: 1410px;
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  padding: 0 5px;
  box-sizing: border-box;
}

.tile-slideshow-container {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.tile-slide {
  flex: 0 0 calc(33.33% - 20px);
  max-width: 475px;
  height: 350px;
  position: relative;
  background-size: cover;
  background-position: center;
  margin: 0 10px;
  
}

.tile-slide-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.tile-slide-header {
  flex-shrink: 0;
  margin-bottom: 1px;
}

.tile-slide-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.2;
  max-height: 65px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tile-slide-title.multiline {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tile-slide-body {
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2px 0;
  overflow: hidden;
  position: relative;
  top: -20px; 
}

.tile-vehicle-image {
  max-width: 60%;
  max-height: 220px;
  object-fit: contain;
}

.tile-slide-body.tile-high-payment .tile-vehicle-image {
  max-width: 60%;
}

.tile-slide-body.tile-high-payment .tile-offers-container {
  width: 50%;
}

.tile-slide-body.tile-high-payment .tile-lease-info,
.tile-slide-body.tile-high-payment .tile-finance-info {
  font-size: 20px;
  word-break: break-word;
}

.tile-offers-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 45%;
  position: relative;
  gap: 6px;
}

.tile-lease-info-container,
.tile-finance-info-container {
  text-align: center;
  width: 100%;
  padding: 3px 0;
}

.tile-lease-for,
.tile-finance-for {
  font-size: 14px;
}

.tile-lease-info,
.tile-finance-info {
  font-size: 26px;
  font-weight: 600;
}

.tile-lease-terms,
.tile-finance-terms {
  font-size: 12px;
}

.tile-offers-container.tile-has-both-offers::before {
  content: '';
  display: block;
  width: 80%;
  height: 1px;
  background-color: #FFFFFFF;
  position: absolute;
  top: 50%;
  left: 10%;
}

.tile-slide-footer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.tile-logo-disclaimer-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

a {
  text-decoration: none !important;
}

.tile-event-logo {
  max-width: 250px;
  max-height: 70px;
  margin-bottom: 5px;
}

.tile-disclaimer {
  cursor: pointer;
  text-decoration: none;
  font-size: 12px;
}

.tile-slide-actions {
  text-align: right;
}

.tile-shop-now {
  display: inline-block;
  background-color: #0064cd;
  color: white;
  padding: 8px 15px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.tile-shop-now:hover {
  background-color: #004893;
  color: white;
}

.tile-slideshow-dots {
  text-align: center;
  margin-top: 10px;
}

.tile-dot {
  height: 8px;
  width: 8px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  margin: 0 5px;
  cursor: pointer;
}

.tile-dot.active {
  background-color: #717171;
}

/* Modal styles */
.tile-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.tile-modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
}

.tile-modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}


@media screen and (max-width: 1200px) {
  .tile-vehicle-slideshow {
    max-width: 940px;
  }
  .tile-slide {
    flex: 0 0 calc(50% - 20px);
    max-width: 450px;
  }
  .tile-slideshow-container {
    justify-content: center;
  }
  .tile-vehicle-image {
    max-width: 55% !important;
  }
}

@media screen and (max-width: 600px) {
  .tile-vehicle-slideshow-wrapper {
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
  }
  
  .tile-vehicle-slideshow {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }
  
  .tile-slideshow-container {
    display: flex;
    width: 100%;
    transform: translateX(0);
    -webkit-transform: translateX(0);
    transition: transform 0.5s ease;
    -webkit-transition: -webkit-transform 0.5s ease;
  }
  
  .tile-slide {
    flex: 0 0 100vw;
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    height: 350px;
    margin: 0;
    box-sizing: border-box;
  }

  .tile-slide-content {
    margin: 0;
    padding: 10px;
    height: 100%;
    box-sizing: border-box;
    width: 100%;
  }

  .tile-slide-title {
    font-size: calc(16px * 0.9);
  }
  
  .tile-vehicle-image {
    max-width: 55% !important;
    height: auto;
    -webkit-transform: translateZ(0);
  }

  .tile-offers-container {
    width: 40%;
  }
  
  .tile-lease-for,
  .tile-finance-for {
    font-size: calc(14px * 0.9);
  }

  .tile-lease-info,
  .tile-finance-info {
    font-size: calc(28px * 0.9);
  }

  .tile-slide-body.tile-high-payment .tile-lease-info,
  .tile-slide-body.tile-high-payment .tile-finance-info {
    font-size: calc(26px * 0.9);
  }

  .tile-lease-terms,
  .tile-finance-terms {
    font-size: calc(12px * 0.9);
  }

  .tile-event-logo {
    max-width: calc(200px * 0.9);
    max-height: calc(50px * 0.9);
  }

  .tile-shop-now {
    font-size: calc(14px * 0.9);
    padding: 7px 13px;
  }

  .tile-disclaimer {
    font-size: calc(12px * 0.9);
  }
  
  .tile-slideshow-dots {
    padding: 15px 0;
    touch-action: manipulation;
  }

  .tile-dot {
    width: 10px;
    height: 10px;
    margin: 0 8px;
  }
  
  /* Ensure proper touch handling area */
  .tile-slideshow-dots {
    padding: 15px 0;
    touch-action: manipulation;
  }
}