/* ============================================================
   Strona Showroom — galeria zdjęć (siatka konfigurowalna N×M + lightbox).
   .lightbox / .lightbox-* pochodzą ze style.css (współdzielone ze stopką).
   ============================================================ */
.sg-section { padding: 30px 0 56px; }

.sg-head { text-align: center; max-width: 720px; margin: 0 auto 26px; }
.sg-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink, #15233b);
  margin: 0 0 8px;
  letter-spacing: -.5px;
}
.sg-intro { font-size: 15px; color: var(--muted, #667085); margin: 0; line-height: 1.6; }

/* Siatka: liczba kolumn z --sg-cols (ustawiana inline z panelu). Równa wysokość kafli. */
.sg-grid {
  display: grid;
  grid-template-columns: repeat(var(--sg-cols, 3), 1fr);
  gap: 18px;
}

.sg-item {
  margin: 0;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  box-shadow: var(--shadow, 0 6px 18px rgba(15,23,42,.08));
  background: #e9edf3;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  position: relative;
}
.sg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
/* Powiększenie po najechaniu (jak w showroomie stopki) + subtelne przyciemnienie ramki. */
.sg-item:hover .sg-img,
.sg-img:focus-visible { transform: scale(1.09); }
.sg-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0) 55%, rgba(15,23,42,.28) 100%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.sg-item:hover::after { opacity: 1; }
.sg-img:focus-visible { outline: 3px solid var(--red, #e1352b); outline-offset: 2px; }

/* Pusty stan. */
.sg-empty {
  text-align: center;
  color: var(--muted-2, #98a2b3);
  padding: 60px 20px;
  border: 1.5px dashed var(--line, #e4e7ec);
  border-radius: 16px;
}
.sg-empty p { margin: 14px 0 0; font-size: 15px; }

/* Paginacja. */
.sg-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.sg-pg {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--ink, #15233b);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: .14s;
}
.sg-pg:hover { border-color: var(--muted-2, #98a2b3); }
.sg-pg.is-active {
  background: var(--ink, #15233b);
  border-color: var(--ink, #15233b);
  color: #fff;
  cursor: default;
}
.sg-pg-arrow { padding: 0; }

/* Responsywność — zmniejszamy liczbę kolumn niezależnie od ustawienia panelu. */
@media (max-width: 900px) {
  .sg-grid { grid-template-columns: repeat(min(var(--sg-cols, 3), 2), 1fr); }
}
@media (max-width: 560px) {
  .sg-section { padding: 22px 0 40px; }
  .sg-title { font-size: 25px; }
  .sg-grid { grid-template-columns: 1fr; gap: 14px; }
  .sg-item { aspect-ratio: 16 / 11; }
}
