/* ============================================
   STOREROOM RACK — Installation Gallery
   Matches storeroomrack.com design language
   Font: Raleway | Brand: #02AED6 | Text: #333
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&display=swap');

:root {
  --brand-cyan: #02AED6;
  --text: #333333;
  --text-light: #5f5f5f;
  --bg: #ffffff;
  --img-border: #ffffff;
  --img-shadow: 0 1px 14px rgba(0, 0, 0, 0.13), 0 0 0 1px rgba(0, 0, 0, 0.12);
  --img-shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
.srg-gallery-wrapper *,
.srg-gallery-wrapper *::before,
.srg-gallery-wrapper *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.srg-gallery-wrapper {
  font-family: 'Raleway', sans-serif;
  color: var(--text);
  background: var(--bg);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0 30px;
}

/* ---- Grid ---- */
.srg-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
}

/* ---- Thumbnail Card ---- */
.srg-card {
  display: block;
  width: 25%;
  padding: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(12px);
  animation: srg-cardIn 0.4s ease-out forwards;
}

.srg-card:nth-child(1)  { animation-delay: 0.02s; }
.srg-card:nth-child(2)  { animation-delay: 0.04s; }
.srg-card:nth-child(3)  { animation-delay: 0.06s; }
.srg-card:nth-child(4)  { animation-delay: 0.08s; }
.srg-card:nth-child(5)  { animation-delay: 0.10s; }
.srg-card:nth-child(6)  { animation-delay: 0.12s; }
.srg-card:nth-child(7)  { animation-delay: 0.14s; }
.srg-card:nth-child(8)  { animation-delay: 0.16s; }
.srg-card:nth-child(9)  { animation-delay: 0.18s; }
.srg-card:nth-child(10) { animation-delay: 0.20s; }
.srg-card:nth-child(11) { animation-delay: 0.22s; }
.srg-card:nth-child(12) { animation-delay: 0.24s; }
.srg-card:nth-child(n+13) { animation-delay: 0.26s; }

.srg-card:hover {
  text-decoration: none;
  color: inherit;
}

.srg-card-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--img-border);
  border-radius: 0;
  box-shadow: var(--img-shadow);
  transition: box-shadow var(--transition);
  background: #f5f5f5;
}

.srg-card:hover .srg-card-image-wrap {
  box-shadow: var(--img-shadow-hover);
}

.srg-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.srg-card:hover .srg-card-image-wrap img {
  transform: scale(1.04);
}

/* Overlay on hover */
.srg-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.srg-card:hover .srg-card-overlay {
  opacity: 1;
}

.srg-card-overlay-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.7);
  opacity: 0;
  transition: all var(--transition);
}

.srg-card:hover .srg-card-overlay-icon {
  opacity: 1;
  transform: scale(1);
}

.srg-card-overlay-icon svg {
  width: 16px;
  height: 16px;
  color: var(--text);
}

/* No captions below thumbnails - matches original site */
.srg-card-caption {
  display: none;
}

/* ---- Empty state ---- */
.srg-empty {
  width: 100%;
  text-align: center;
  padding: 60px 24px;
  color: var(--text-light);
  font-family: 'Raleway', sans-serif;
}

.srg-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  opacity: 0.3;
}

.srg-empty p {
  font-size: 16px;
  font-weight: 400;
}

/* ---- Animations ---- */
@keyframes srg-cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- lightGallery Overrides ---- */
.lg-backdrop {
  background-color: rgba(0, 0, 0, 0.93) !important;
}

.lg-toolbar .lg-icon {
  color: rgba(255, 255, 255, 0.75) !important;
}

.lg-toolbar .lg-icon:hover {
  color: #ffffff !important;
}

.lg-prev, .lg-next {
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: background 0.2s !important;
}

.lg-prev:hover, .lg-next:hover {
  background: rgba(2, 174, 214, 0.25) !important;
}

.lg-sub-html {
  font-family: 'Raleway', sans-serif !important;
  padding: 14px 20px !important;
}

.lg-sub-html .srg-lg-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.lg-sub-html .srg-lg-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.lg-counter {
  font-family: 'Raleway', sans-serif !important;
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.45) !important;
  font-weight: 500 !important;
}

.lg-thumb-item {
  border-radius: 0 !important;
  border: 2px solid transparent !important;
  transition: border-color 0.2s !important;
}

.lg-thumb-item.active,
.lg-thumb-item:hover {
  border-color: var(--brand-cyan) !important;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .srg-card {
    width: 50%;
  }
}

@media (max-width: 480px) {
  .srg-card {
    width: 100%;
    padding: 6px;
  }
}
