/* === Gallery Intro === */
.gallery-intro {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.2rem;
  line-height: 1.6;
  text-align: center;
}

.gallery-intro img,
.gallery-intro p {
  all: unset;
  display: block;
  margin: 0 auto;
  max-width: 100%;
  font-size: inherit;
  line-height: inherit;
}

/* === Back to Top === */
.back-to-top {
  text-align: center;
  margin: 2rem 0;
}

.back-to-top a {
  font-size: 1rem;
  text-decoration: none;
  color: #333;
  border: 1px solid #ccc;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.back-to-top a:hover {
  background: #f0f0f0;
}

/* === Featured Image Section === */
.blanket-featured,
.tote-featured {
  text-align: center;
}

/* === Unified Grid Layout for All Galleries === */
.wb-mini-gallery,
.item-grid,
.blanket-grid,
.tote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  justify-content: start;
  padding: 0 15px;
}

/* === Gallery Items === */
.wb-mini-item,
.item {
  min-width: 180px;
  box-sizing: border-box;
  text-align: left;
}

.wb-mini-item img,
.gallery-thumb {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-thumb:hover,
.blanket-featured-img:hover,
.zoom-on-hover:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.zoom-on-hover {
  transition: transform 0.3s ease;
}

/* === Titles and Labels === */
.wb-mini-title {
  font-size: 0.9em;
  margin-top: 5px;
}

.item-id {
  font-size: 1.9rem;
  color: #666;
  text-align: center;
}

.wb-mini-item a {
  text-decoration: none;
}

/* === Modal Style === */
/* === Modal Container === */
#generic-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto; /* Allows scroll if needed */
}

/* === Modal Content === */
#generic-modal .modal-content {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
  max-width: 98%;
  max-height: 98%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* === Modal Image === */
#modal-img {
  max-width: 100%;
  max-height: 75vh; /* Prevents vertical overflow */
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

/* === Button Row === */
.modal-button-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* 10px space between buttons */
  margin-top: 20px;
}

#enquire-btn, #close-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 16px;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 1rem;
}


#enquire-btn, 
#close-btn {
  background: #ccc;
  color: #333;
  border: none;
}

#close-btn2 {
  background: #ccc;
  color: #333;
  border: none;
}

/* === Blur Background (Optional) === */
.blur {
  filter: blur(4px);
  transition: filter 0.3s ease;
}


/* === Responsive Scaling === */
@media screen and (max-width: 768px) {
  .wb-mini-gallery,
  .item-grid,
  .blanket-grid,
  .tote-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px; /* Slightly reduced gap for tablets */
  }
}

@media screen and (max-width: 480px) {
  .wb-mini-gallery,
  .item-grid,
  .blanket-grid,
  .tote-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px; /* Tighter spacing for phones */
	padding-left: 2px;
    padding-right: 5px;
  }

  .wb-mini-item img,
  .gallery-thumb {
    width: 90%;
    margin: 0 auto;
  }
}

