
.custom-carousel-item {
  width: 250px !important;
  height: 200px !important;
  margin: 0 auto; /* center horizontally */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.custom-carousel-item .card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 767px) {
  .custom-carousel-item {
    width: 90% !important;
    height: auto !important;
    margin-left: auto;
    margin-right: auto;
     padding: 5px; /* smaller padding on mobile */
  }

  .custom-carousel-item .card {
    height: auto;
    padding: 1rem;
    text-align: center; /* center text on mobile */
  }
}

/* Zoom CSS for main image */
.main-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.2s ease;
  cursor: zoom-in;
}

/* Zoom Icon */
.zoom-icon {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 20px;
  padding: 5px 10px;
  border-radius: 50%;
  pointer-events: none;
}

/* Main image container */
.main-image-container {
  margin-top: -15px !important;
  overflow: hidden;
  height: 500px;        /* default for desktop */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main image */
#mainDisplay {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  transition: transform 0.2s ease;
  cursor: zoom-in;
}

/* Owl carousel thumbnails */
.owl-carousel .item img {
  border: 2px solid transparent;
  cursor: pointer;
  transition: border 0.3s ease;
}

.owl-carousel .item img:hover {
  border: 2px solid #007bff;
}

/* Thumbnail spacing */
#img-carousel .item {
  padding: 5px;
}

/* ===== Responsive Styles ===== */

/* Tablets */
@media (max-width: 992px) {
  .main-image-container {
    height: 400px;
  }
  #mainDisplay {
    max-height: 400px;
  }
}

/* Mobile devices */
@media (max-width: 768px) {
  #subheader h1 {
    font-size: 1.8rem;
  }
  #subheader h2 {
    font-size: 1.4rem;
  }

  .main-image-container {
    margin-top: -20px !important;
    height: 300px;
  }

  #mainDisplay {
    max-height: 300px;
    padding: 10px;
  }

  #img-carousel .item {
    padding: 3px;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .main-image-container {
    height: 220px;
  }
  #mainDisplay {
    max-height: 220px;
  }
  #subheader h1 {
    font-size: 1.5rem;
  }
}

