/* ===== New Search Sidebar Additions ===== */
.w3-sidebar-search {
  position: fixed;
  width: 300px;
  /*background: #f5f5f5*/;
  background: rgba(255,255,255,1.00);
  height: 100%;
  padding: 14px;
  box-sizing: border-box;
  z-index: 2;
  overflow-y: auto;
  top: 0;
  left: 0;
  margin-top: 73px; /* Adjust based on your header height */
}

.w3-main-with-sidebar {
  margin-left: 300px !important;
}

@media (max-width: 992px) {
  .w3-sidebar-search {
    position: relative;
    width: 100%;
    height: auto;
    margin-top: 0;
  }
  .w3-main-with-sidebar {
    margin-left: 0 !important;
  }
}

/* Search Components */
.w3-search-container {
  margin-bottom: 20px;
}

.w3-search-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
}

.w3-search-button {
  width: 100%;
}

/* Filter Options */
.w3-filter-option {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: #000;
}

.w3-filter-option:hover, .w3-filter-option.w3-active {
  background-color: #ccc;
}
/*Details images*/
#wrapperrr {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#first-div {
    padding: 22px;
    width: 65%;
    box-sizing: border-box;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    background: #fff;
}

#second-div {
    padding: 10px;
    width: 30%;
    box-sizing: border-box;
    background: #fff;
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
    position: sticky;
    top: 20px;
}

/* Main image styling with hover expansion */
.main-image-container {
    position: relative;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    padding: 5px;
    display: inline-block; /* Contain the expanding image */
}

.main-image {
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, z-index 0.3s;
    z-index: 1;
    position: relative;
}

.main-image:hover {
    transform: scale(1.5); /* Adjust scale factor as needed */
    z-index: 10;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Gallery styling with hover expansion */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.gallery-item {
    position: relative;
    display: inline-block;
}

.gallery img {
    max-width: 200px;
    max-height: 150px;
    width: auto;
    height: auto;
    border: 1px solid #ddd;
    padding: 5px;
    transition: transform 0.3s ease, z-index 0.3s;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.gallery img:hover {
    transform: scale(2.3); /* Adjust scale factor as needed */
    z-index: 10;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #wrapperrr {
        flex-direction: column;
        padding: 10px;
    }
    
    #first-div, #second-div {
        width: 100%;
        position: static;
        max-height: none;
    }
    
    .gallery img {
        max-width: 150px;
    }
    
    .main-image:hover {
        transform: scale(1.3); /* Smaller expansion on mobile */
    }
    
    .gallery img:hover {
        transform: scale(1.8); /* Smaller expansion on mobile */
    }
}