:root {
  --fire-red: #ed2024;
  --dark-gray: #3a3a3b;
  --bg-dark: #1a1a1a;
  --bg-darker: #0f0f0f;
  --bg-card: #252525;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --border-color: #525252;
  --radius: 0.625rem;
}

.truck-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 3rem;
}

.truck-section:last-child {
    border-bottom: none;
    margin-bottom: 0px;
}

.truck-section h2 {
    color: var(--fire-red);
    font-size: 2rem;
    text-align: center;
}

.truck-section p{
    margin:0 auto;
    margin-bottom: 2rem;
}

.truck-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin:2rem 0 3rem !important;
}

.truck-features li {
  list-style: none;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
  border-right: 1px solid var(--border-color);
}

.truck-features li:nth-child(4n) {
  border-right: none;
}

.truck-features li::before {
  content: "•";
  color: var(--fire-red);
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -0.25rem;
}


.slideshow-container {
    max-width: 900px;
    margin: 0 auto;
}

.slideshow-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    margin:0 !important;
}

.slide-prev,
.slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(237, 32, 36, 0.8);
    color: white;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
    z-index: 10;
}

.slide-prev:hover,
.slide-next:hover {
    background: var(--fire-red);
}

.slide-prev {
    left: 0;
}

.slide-next {
    right: 0;
}

.slideshow-thumbnails {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    width: 120px;
    height: 90px !important;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    border: 3px solid transparent;
    transition: border-color 0.3s;
    flex-shrink: 0;
    margin:0 !important;
}

.thumbnail:hover {
    border-color: var(--fire-red);
}

.thumbnail.active {
    border-color: var(--fire-red);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--fire-red);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(237, 32, 36, 0.8);
    color: white;
    border: none;
    padding: 1.5rem 2rem;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
    z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--fire-red);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.25rem;
    text-align: center;
}

/*CUSTOM SCROLL BAR FOR TRUCK GALLERY*/

.slideshow-thumbnails {
    overflow-x: auto;
    white-space: nowrap; 
    /* Firefox scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--fire-red) var(--bg-darker);
}

/* WebKit Browsers: Chrome, Safari, Edge */
.slideshow-thumbnails::-webkit-scrollbar {
    height: 10px; 
}

.slideshow-thumbnails::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 8px;
}

.slideshow-thumbnails::-webkit-scrollbar-thumb {
    background: var(--fire-red);
    border-radius: 8px;
    border: 2px solid var(--bg-darker);
}

.slideshow-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #ff3b3f; 
}

@media (max-width: 1024px) {
  .truck-features {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Reset 4n rule and remove border from every 3rd item */
  .truck-features li:nth-child(4n) {
    border-right: 1px solid var(--border-color);
  }

  .truck-features li:nth-child(3n) {
    border-right: none;
  }
}


@media (max-width: 768px) {
    .slide-prev,
    .slide-next {
        padding: 0.75rem 1rem;
        font-size: 1.25rem;
    }
    
    .thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        padding: 1rem 1.25rem;
        font-size: 1.5rem;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
    }

    .truck-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem;
      }

      /* Reset 3n rule and remove border from every 2nd item */
      .truck-features li:nth-child(3n) {
        border-right: 1px solid var(--border-color);
      }

      .truck-features li:nth-child(2n) {
        border-right: none;
  }
}

@media (max-width: 480px) {
  .truck-features {
    grid-template-columns: 1fr;
  }

  .truck-features li {
    border-right: none;
  }

  .truck-features li:nth-child(3n) {
    border-right: none;
  }
}