/* Custom styles for product view page */
#product-content {
  max-width: 1200px;
  margin: 0 auto;
}
.carousel-item img {
  max-height: 500px;
  object-fit: cover;
}
.tab-content {
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 8px 8px;
}
.nav-tabs .nav-link {
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 12px 24px;
  color: #4b5563;
}
.nav-tabs .nav-link.active {
  background-color: #fff;
  border-color: #e5e7eb;
  border-bottom-color: transparent;
  color: #1e40af;
}
#error-message {
  max-width: 600px;
  margin: 0 auto;
}
/* Add these styles */
#product-content .cover-image {
  height: 500px;
  object-fit: cover;
}
#galleryCarousel {
  border-radius: 8px;
  overflow: hidden;
}
#galleryCarousel .carousel-item {
  max-height: 400px;
  position: relative; /* Ensure the caption is positioned relative to the carousel item */
}
#galleryCarousel .carousel-image-container {
  position: relative;
  width: 100%;
  height: 800px;
}
#galleryCarousel .carousel-caption {
  position: static; /* Change position to static to place it below the image */
  background: none; /* Remove background to avoid overlay */
  padding: 0;
  color: #333; /* Change text color to be more readable */
  margin-top: 10px; /* Add some space between image and caption */
  text-align: center; /* Center the text */
}
#galleryCarousel .carousel-control-prev,
#galleryCarousel .carousel-control-next {
  background: rgba(0, 0, 0, 0.3);
  width: 40px;
  height: 40px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
}

/* ========================
   ENHANCED MOBILE STYLING
   ======================== */
@media (max-width: 768px) {
  body {
    padding-top: 80px; /* Space for fixed navbar */
  }

  nav .h-20 {
    height: 64px !important;
  }

  nav img {
    height: 48px;
  }

  .nav-tabs .nav-link {
    padding: 10px 16px;
    font-size: 14px;
  }

  #product-content {
    padding: 0 1rem;
  }

  .carousel-item img {
    width: 100%;
    max-height: 300px;
    height: auto;
  }

  .desktop-specs {
    display: none; /* Hide desktop specs on mobile */
  }

  .tab-content {
    padding: 1rem;
  }

  .carousel-caption p {
    font-size: 14px;
    line-height: 1.4;
    margin: 0.5rem 0;
  }

  .col-md-6 {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .text-3xl {
    font-size: 1.5rem !important;
  }

  .text-lg {
    font-size: 1rem !important;
  }

  .p-6 {
    padding: 1rem !important;
  }

  .p-4 {
    padding: 1rem !important;
  }

  .my-20 {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
  }

  /* Inquire Button full width */
  .text-end.p-4 {
    text-align: center !important;
  }

  .text-end.p-4 a {
    display: inline-block;
    width: 100%;
    max-width: 320px;
  }

  /* Fix carousel controls size */
  #galleryCarousel .carousel-control-prev,
  #galleryCarousel .carousel-control-next {
    width: 36px;
    height: 36px;
  }

  /* Mobile Dropdown Arrow fix */
  #productCenterButtonMobile i,
  #productCenterButton i {
    margin-left: 0.4rem;
    font-size: 0.75rem;
  }

  /* Reduce padding for mobile links */
  #mobileMenu a,
  #mobileMenu button {
    padding: 10px 12px;
    font-size: 14px;
  }

  /* Search Input Adjustment */
  #mobileMenu input[type="text"] {
    padding: 10px 40px 10px 40px;
    font-size: 14px;
  }

  #mobileMenu .fa-search {
    left: 1.25rem;
  }
}

@media (max-width: 768px) {
  #galleryCarousel {
    max-height: 300px;
    overflow: hidden;
  }

  .carousel-item {
    max-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .carousel-item img {
    max-height: 280px;
    object-fit: contain;
    width: auto;
    margin: 0 auto;
  }

  .carousel-caption p {
    margin-bottom: 0;
    padding: 0;
  }

  .tab-pane#desc {
    padding-bottom: 1rem !important;
  }

  .text-end.p-4 {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}
