.ts-shingle-gallery {
  --gap: 12px;
  --band-bg: #b99a5a;
}

.ts-gallery-top {
  display: grid;
  gap: var(--gap);
}

.ts-gallery-item {
  margin: 0;
  overflow: hidden;
}

.ts-gallery-link {
  display: block;
  width: 100%;
  height: 100%;
}

.ts-gallery-item img {
  display: block;
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.ts-gallery-link {
  cursor: zoom-in;
}

.ts-gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

.ts-gallery-top .ts-gallery-item img {
  height: 100%;
}

.ts-gallery-bottom .ts-gallery-item img {
  height: auto;
}

/* =========================
   TOP 10 IMAGE ART-DIRECTED GRID
   ========================= */

.ts-gallery-top {
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 70px;
}

.ts-gallery-top .tile-1  { grid-column: 1 / span 4;  grid-row: 1 / span 4; }
.ts-gallery-top .tile-2  { grid-column: 5 / span 2;  grid-row: 1 / span 2; }
.ts-gallery-top .tile-3  { grid-column: 7 / span 2;  grid-row: 1 / span 2; }
.ts-gallery-top .tile-4  { grid-column: 9 / span 3; grid-row: 1 / span 2; }
.ts-gallery-top .tile-5  { grid-column: 12 / span 8; grid-row: 1 / span 3; }

.ts-gallery-top .tile-6  { grid-column: 1 / span 2;  grid-row: 5 / span 2; }
.ts-gallery-top .tile-7  { grid-column: 3 / span 2;  grid-row: 5 / span 2; }
.ts-gallery-top .tile-8  { grid-column: 5 / span 2;  grid-row: 3 / span 4; }
.ts-gallery-top .tile-9  { grid-column: 7 / span 5;  grid-row: 3 / span 4; }
.ts-gallery-top .tile-10 { grid-column: 12 / span 8; grid-row: 4 / span 3; }

/* =========================
   GOLD BAND
   ========================= */

.ts-gallery-band {
  background: var(--band-bg);
  margin-top: var(--gap);
  margin-bottom: var(--gap);
  padding: 18px 20px;
}

.ts-gallery-band-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.ts-gallery-btn {
  appearance: none;
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 12px 24px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.ts-gallery-lightbox-trigger {
  border: 0;
  color: #ff4df0;
  padding: 0;
}

/* =========================
   BOTTOM MASONRY GRID
   ========================= */

.ts-gallery-bottom .ts-gallery-item {
  width: calc(25% - (var(--gap) * 3 / 4));
  margin-bottom: var(--gap);
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 991.98px) {
  .ts-gallery-top {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 80px;
  }

  .ts-gallery-top .tile-1  { grid-column: span 3; grid-row: span 3; }
  .ts-gallery-top .tile-2  { grid-column: span 3; grid-row: span 2; }
  .ts-gallery-top .tile-3  { grid-column: span 3; grid-row: span 2; }
  .ts-gallery-top .tile-4  { grid-column: span 3; grid-row: span 2; }
  .ts-gallery-top .tile-5  { grid-column: span 3; grid-row: span 3; }
  .ts-gallery-top .tile-6  { grid-column: span 2; grid-row: span 2; }
  .ts-gallery-top .tile-7  { grid-column: span 2; grid-row: span 2; }
  .ts-gallery-top .tile-8  { grid-column: span 2; grid-row: span 3; }
  .ts-gallery-top .tile-9  { grid-column: span 4; grid-row: span 3; }
  .ts-gallery-top .tile-10 { grid-column: span 2; grid-row: span 3; }

  .ts-gallery-bottom .ts-gallery-item {
    width: calc(33.3333% - (var(--gap) * 2 / 3));
  }
}

@media (max-width: 575.98px) {
  .ts-gallery-top {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 120px;
  }

  .ts-gallery-top .ts-gallery-item {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .ts-gallery-top .tile-1,
  .ts-gallery-top .tile-5,
  .ts-gallery-top .tile-9 {
    grid-column: span 2 !important;
  }

  .ts-gallery-bottom .ts-gallery-item {
    width: calc(50% - (var(--gap) / 2));
  }
}

/* =========================
   SIMPLE 3-COLUMN GRID (less_than_10_images)
   Uniform tiles for shingles with fewer than the recommended 10 images.
   Reuses .ts-gallery-item hover/cover + the same Fancybox lightbox.
   ========================= */

.ts-gallery-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.ts-gallery-grid3 .ts-gallery-item {
  aspect-ratio: 4 / 3;
}

.ts-gallery-grid3 .ts-gallery-item img {
  height: 100%;
}

/* =========================
   ALL TANDOSTONE STYLES — filterable swatch carousel
   ========================= */

/* Filter tabs */
#ts-tandostone-styles .ts-styles-tab {
    background: none;
    border: 0;
    padding: 0;
    font-size: 1.125rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.25s ease;
}

#ts-tandostone-styles .ts-styles-tab:hover {
    color: var(--ts-cyan);
}

/* Swatch cards */
#ts-tandostone-styles .ts-styles-card-img img {
    transition: transform 0.6s ease;
}

#ts-tandostone-styles .swiper-slide:hover .ts-styles-card-img img {
    transform: scale(1.05);
}

/* Prev/next arrows, vertically centered on the swatch image row */
#ts-tandostone-styles .ts-styles-panel {
    padding-left: 48px;
    padding-right: 48px;
}

#ts-tandostone-styles .ts-styles-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    background: none;
    border: 0;
    color: var(--ts-dark);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s ease, opacity 0.25s ease;
}

#ts-tandostone-styles .ts-styles-arrow:hover {
    color: var(--ts-cyan);
}

#ts-tandostone-styles .ts-styles-prev { left: 0; }
#ts-tandostone-styles .ts-styles-next { right: 0; }

/* Faded at the ends of a scrollable carousel */
#ts-tandostone-styles .ts-styles-arrow.swiper-button-disabled {
    opacity: 0.25;
    cursor: default;
}

/* When the whole collection fits (nothing to scroll), Swiper "locks" the
   controls — hide them so we don't show inert arrows/dots. They reappear
   automatically for any carousel that overflows (e.g. narrow viewports). */
#ts-tandostone-styles .ts-styles-arrow.swiper-button-lock,
#ts-tandostone-styles .swiper-pagination-lock {
    display: none;
}

/* The card caption sits mid-image; keep the arrows aligned to the imagery */
#ts-tandostone-styles .ts-styles-arrow {
    top: 42%;
}

/* Pagination bullets (matches the gold reviews bullets) */
#ts-tandostone-styles .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: transparent;
    border: 2px solid var(--ts-gold);
    opacity: 1;
    margin: 0 6px !important;
}

#ts-tandostone-styles .swiper-pagination-bullet-active {
    background: var(--ts-gold);
}

@media (max-width: 767.98px) {
    #ts-tandostone-styles .ts-styles-panel {
        padding-left: 28px;
        padding-right: 28px;
    }
    #ts-tandostone-styles .ts-styles-arrow {
        width: 28px;
        font-size: 1.25rem;
    }
}

@media (max-width: 991.98px) {
  .ts-gallery-grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .ts-gallery-grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
