
.gallery {
  width: 100%;
}

.js-main-gallery .gallery-cell
{
  width: 100%;
  height: 540px;
  overflow: hidden;
}

/* Main image slider */
.gallery-cell img {
  width: auto;
  height: 100%;
  object-fit: contain;
  /* border-radius: 10px; */
  padding: 5px;
  padding-top: 0px;
}

/* Thumbnail slider */
.js-thumb-gallery {
  margin-top: 15px;
}

.js-thumb-gallery .gallery-cell {
  width: 20% !important;  /* ALWAYS show 5 thumbnails in a row */
  margin-right: 0;        /* Remove gaps so layout is clean */
  opacity: 0.5;
  cursor: pointer;
  padding: 5px;           /* Optional spacing inside */
}

.js-thumb-gallery .gallery-cell img {
  width: 100%;
  border-radius: 8px;
}

.js-thumb-gallery .is-selected {
  opacity: 1;
  border: 1px solid #dad7d7;
  border-radius: 8px;
}


.js-thumb-gallery .flickity-viewport
{
    height: 120px !important;
}

.js-thumb-gallery .is-selected
{
    width: 20% !important;
}
.js-thumb-gallery .is-selected img
{
    width: 100% !important;
}


/* --------------------------
   RESPONSIVE BREAKPOINTS
---------------------------*/

/* Tablet & Large Phones (max 600px) */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }

  .js-thumb-gallery .flickity-viewport
  {
    height: auto !important;
  }

  .js-main-gallery .gallery-cell
  {
    width: 100%;
    height: 400px;
    overflow: hidden;
  }

  .js-thumb-gallery .gallery-cell {
    width: 60px;   /* Smaller thumbnails */
    margin-right: 8px;
  }
}

/* Very Small Phones (max 400px) */
@media (max-width: 400px) {
  .js-thumb-gallery .gallery-cell {
    width: 50px;
    margin-right: 6px;
  }

  .js-thumb-gallery .flickity-viewport
  {
    height: 72px !important;
  }

  .js-main-gallery .gallery-cell
  {
    width: 100%;
    height: 350px;
    overflow: hidden;
  }

  h2 {
    font-size: 18px;
  }
}
