.slider {
  position: relative;
  max-width: 600px;
  margin: auto;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: black;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
  color: white;
}

.slide {
  display: none;
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active, .dot:hover {
  background-color: #717171;
}

.text-centering {
  text-align: center; /* This will center the button text if the button is an inline element */
}

.text-centering button {
  display: inline-block; /* Allows block properties while keeping the element inline for centering */
  padding: 10px 20px; /* Adds space inside the button, making it larger */
  margin: 10px 0; /* Adds margin above and below the button */
  font-size: 16px; /* Sets the size of the text inside the button */
  color: #ff0000; /* Sets the text color */
  background-color: #f0f0f0; /* Sets the background color of the button */
  border: 2px solid #ff0000; /* Sets the border color, can be adjusted or removed */
  border-radius: 5px; /* Rounds the corners of the button */
  cursor: pointer; /* Changes the cursor to indicate the button is clickable */
  text-decoration: none; /* Removes underline from text, if any */
  transition: background-color 0.3s, border-color 0.3s, color 0.3s; /* Adds a transition effect for hover states */
}

.text-centering button:hover {
  background-color: #ff0000; /* Darkens the button on hover */
  border-color: #ff0101; /* Darkens the border on hover */
  color: #ffffff; /* Ensures text color remains white on hover */
}

/* Optional: if you want to add focus and active states */
.text-centering button:focus,
.text-centering button:active {
  outline: none; /* Removes the default focus outline */
  background-color: #ff0000; /* Further darkens the button when clicked or focused */
  border-color: #ff0000; /* Further darkens the border when clicked or focused */
  color: #ffffff;
}

.text-centeringg {
  text-align: center; /* This will center the button text if the button is an inline element */
}
.text-centeringg button {
  display: inline-block; /* Allows block properties while keeping the element inline for centering */
  padding: 10px 100px; /* Adds space inside the button, making it larger */
  
  margin: 10px 0; /* Adds margin above and below the button */
  font-size: 16px; /* Sets the size of the text inside the button */
  color: #ffffff; /* Sets the text color */
  background-color: #ff0000; /* Sets the background color of the button */
  border: 2px solid #ff0000; /* Sets the border color, can be adjusted or removed */
  border-radius: 5px; /* Rounds the corners of the button */
  cursor: pointer; /* Changes the cursor to indicate the button is clickable */
  text-decoration: none; /* Removes underline from text, if any */
  transition: background-color 0.3s, border-color 0.3s, color 0.3s; /* Adds a transition effect for hover states */
}

.text-centeringg button:hover {
  background-color: #700000; /* Darkens the button on hover */
  border-color: #700000; /* Darkens the border on hover */
  color: #ffffff; /* Ensures text color remains white on hover */
}



.helmet-selection {
  display: flex;
  background-color: #ffffff;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
}

.helmet-selection span{
  color: #ff0000;
  font-family: 'Inter',sans-serif;
}

.helmet {
  text-align: center;
  width: 240px; /* Adjust the width as needed */
}


.helmet img {
  width: 100%;
  height: auto;
}

.helmet h2 {
  font-size: 18px;
  color: #333333;
  margin: 10px 0;
}

.prices {
  font-size: 16px;
  color: #666666;
}

@media (max-width: 800px) {
  .helmet-selection {
      flex-direction: column;
      align-items: center;
  }
}


.image-gallery {
  display: flex;
  justify-content: space-around;
  margin-top: 30px; /* Spacing after the button */
  flex-wrap: wrap; /* Allows images to wrap into the next row on smaller screens */
}

.image-item {
  text-align: center; /* Center the image and the text */
  flex-basis: 20%; /* Adjust this to change the width of the images container */
  margin: 50px; /* Adjust space around the images */
}

.image-item img {
  width: 100%; /* This will make the image scale to the container */
  height: auto; /* Maintain aspect ratio */
  margin-bottom: 10px; /* Spacing between the image and the text */

}

.image-item p {
  margin: 0; /* Remove default paragraph margin */
}

@media (max-width: 768px) {
  .image-item {
    flex-basis: 30%; /* Have larger flex-basis on smaller screens */
  }
}

@media (max-width: 480px) {
  .image-item {
    flex-basis: 80%; /* Have each image take almost full width on very small screens */
  }
}


/* Main gallery styles */
#gallery {
  display: flex;
  flex-direction: column;
  align-items: center; /* ensure everything is centered */
}

#main-image img {
  width: 100%;
  max-width: 500px; /* limit the size on very large screens */
  height: auto;
  display: block; /* removes bottom space under the image */
  margin-bottom: 10px;
  justify-content: center;
}

#thumbnails {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* allows thumbnails to wrap on small screens */
  gap: 20px;
}

#thumbnails img {
  width: 100%;
  max-width: 200px; /* Max width for thumbnails */
  cursor: pointer;
  border: 2px solid; /* transparent border by default */
  border-color: #000000;
  transition: transform 0.2s ease-in-out; /* smooth transform effect */
}

/* Hover and Active styles */
#thumbnails img:hover,
#thumbnails img.active {
  transform: scale(1.05); /* scale effect on hover */
  border-color: #c20000; /* highlight color */
}

/* Add padding to the container for spacing */
.thumbnail-container {
  padding: 10px;
}

@media (max-width: 768px) {
  #main-image img {
      max-width: 100%; /* Use full width on smaller devices */
  }

  #thumbnails img {
      max-width: 10vw; /* Use viewport width for dynamic sizing */
  }

  #thumbnails {
      gap: 10px; /* Reduce gap on smaller screens */
  }
}

@media (max-width: 480px) {
  #gallery {
      flex-direction: column;
  }

  #thumbnails {
      justify-content: space-around; /* Adjust thumbnail alignment for very small screens */
  }

  #thumbnails img {
      max-width: 15vw; /* Adjust thumbnail size based on viewport width */
  }
}

/* High pixel density screens */
@media only screen and (-webkit-min-device-pixel-ratio: 2), 
only screen and (min--moz-device-pixel-ratio: 2), 
only screen and (-o-min-device-pixel-ratio: 2/1), 
only screen and (min-device-pixel-ratio: 2), 
only screen and (min-resolution: 192dpi), 
only screen and (min-resolution: 2dppx) {
  #thumbnails img {
      max-width: 20vw; /* Increase thumbnail size for high pixel density screens */
  }
}


/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 480px) {
  #main-image img {
      max-height: 200px; /* Limit height in landscape mode */
  }
}
