/* ========================
   GENERAL RESET
======================== */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #f4f6f9;
  margin: 0;
  padding: 0;
}

/* ========================
   NAVIGATION LINKS
======================== */
.nav-link {
  font-size: 1.1rem;
  color: #000000;
  cursor: pointer;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #000000;
  background-color: #b1afaf;
  border-radius: 4px;
}

.nav-link.active {
  font-weight: bold;
  color: #ffffff;
  background-color: #000000;
  border: 1px solid #000000;
  border-radius: 4px;
  padding: 6px 10px;
}

/* Sidebar scroll */
.sidebar-list {
  overflow-y: auto;
  max-height: 100%;  /* Allow it to scroll if content exceeds height */
}

/* ========================
   CATALOG IMAGE
======================== */
.catalog-image {
  width: 100%;
  height: 80vh;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.catalog-image img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  user-select: none;
  transition: transform 0.6s ease;
}

/* ========================
   ZOOM CONTAINER
======================== */
#zoomContainer {
  width: 100%;
  height: auto;
  border: 1px solid #ddd;
  background: #fff;
  overflow: hidden;
  position: relative;
  max-height: 400px;
}

#zoomContainer img {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: auto;
  pointer-events: none;
  user-select: none;
  transition: left 0.1s ease, top 0.1s ease;
}

/* ========================
   NAVIGATION ARROWS
======================== */
.catalog-header {
  font-size: 2rem; /* Adjust the size of the header */
  font-weight: bold;
  margin-bottom: 20px;
}

.catalog-img {
  width: 100%; /* Ensure the image is large and responsive */
  max-width: 90%; /* Optional: restrict the max size of the image */
  height: auto;
  border-radius: 8px; /* Optional: Rounded corners for the image */
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 1rem;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 2;
  border-radius: 10%;
}

.nav-arrow:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.left-arrow {
  left: 10px;
}

.right-arrow {
  right: 10px;
}

/* ========================
   THUMBNAILS (DESKTOP)
======================== */#thumbnailContainer {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-left: 15px; /* Increased padding for a bit more space */
  padding-right: 15px;
  max-height: 85vh; /* Increased max height to take up more screen space */
}

.thumb-gallery-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px; /* Increased gap for a bit more space between thumbnails */
  height: 100%;
  max-height: 100%;
  scrollbar-width: thin;
  scrollbar-color: #000000 #ddd;
}

.thumb-gallery-vertical img {
  display: block;
  max-height: 150px; /* Increased size of thumbnails */
  width: 100%; /* Ensures the images take full width of their container */
  object-fit: contain;
  border: 2px solid #ccc;
  border-radius: 8px; /* More rounded corners for a smoother look */
  margin: 0 auto;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.2s ease-in-out;
}

.thumb-gallery-vertical img:hover {
  transform: scale(1.1); /* Slightly more pronounced hover effect */
}

.thumb-gallery-vertical img.active {
  border-color: #000000;
}

/* Webkit Scrollbar for Chrome, Safari */
.thumb-gallery-vertical::-webkit-scrollbar {
  width: 10px; /* Wider scrollbar */
}

.thumb-gallery-vertical::-webkit-scrollbar-thumb {
  background-color: #000000;
  border-radius: 5px;
}

.thumb-gallery-vertical::-webkit-scrollbar-track {
  background: #ddd;
}


/* ========================
   RESPONSIVE: TABLETS (769px–992px)
======================== */
@media (max-width: 992px) and (min-width: 769px) {
  .main-wrapper {
    flex-direction: column;
    height: auto !important;
  }

  .catalog-image {
    height: 60vh;
  }

  #zoomContainer {
    display: none;
  }

  aside.col-md-2:first-child {
    width: 100% !important;
    border-bottom: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
  }

  #thumbnailContainer {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }

  #thumbnailContainer img {
    max-height: 70px;
  }
.sidebar-list {
  overflow-y: auto;
  max-height: 100vh;  /* Ensure sidebar has scroll */
}

.sidebar-list li {
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.sidebar-list li.active {
  background-color: #ddd;  /* Highlight active li */
}

}

/* ========================
   RESPONSIVE: MOBILE ≤768px
======================== */
@media (max-width: 768px) {

  .main-wrapper {
    flex-direction: column !important;
    height: auto !important;
  }

  header {
    padding: 0.5rem 1rem !important;
  }

  header img {
    height: 40px !important;
  }

  header h1 {
    font-size: 1.2rem;
    margin: 0;
    padding-left: 1rem;
    white-space: normal;
    overflow-wrap: break-word;
    flex: 1;
    text-align: center;
  }

  aside.col-md-2:first-child {
    width: 100% !important;
    max-height: 200px;
    border-bottom: 1px solid #ccc;
    background: #f8f9fa;
    overflow-y: auto; /* Make sidebar scrollable */
    position: relative;
    padding: 0.5rem;
    height: 100vh; /* Allow the sidebar to take full height */
  }

  .catalog-image {
    height: 50vh;
    padding: 0.5rem;
  }

  #zoomContainer {
    display: none !important;
  }

  #thumbnailContainer {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding: 0.5rem 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  #thumbnailContainer img {
    max-height: 60px;
    width: auto;
    flex-shrink: 0;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
  }

  #thumbnailContainer img.active {
    border-color: #000000;
    transform: scale(1.05);
  }

  #thumbnailContainer::-webkit-scrollbar {
    height: 6px; /* For horizontal scrolling */
  }

  #thumbnailContainer::-webkit-scrollbar-thumb {
    background-color: #000000;
    border-radius: 3px;
  }

  #thumbnailContainer::-webkit-scrollbar-track {
    background: #ddd;
  }

  .nav-arrow {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
  }
}

/* ========================
   SMALL DEVICES ≤480px
======================== */
@media (max-width: 480px) {
  .catalog-image {
    height: 40vh;
  }

  header h1 {
    font-size: 1rem;
    text-align: center;
  }

  #thumbnailContainer img {
    max-height: 50px;
  }

  .nav-arrow {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }
}
