/* ── GALLERY PAGE ── */

.gallery-filters {
  padding: 16px 2.5rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: var(--off-white);
  align-items: center;
}
.filter-btn {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-mid);
  cursor: pointer;
  min-height: 40px;
  transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.15s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.filter-btn:hover {
  background: var(--steel-mid);
  border-color: var(--steel-mid);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.filter-btn.active { background: var(--steel); border-color: var(--steel); color: #fff; }
.filter-btn:active { transform: translateY(0); }

/* Uniform grid — all cells the same fixed height */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;   /* fixed height — every cell identical */
  gap: 2px;
  background: #ccc;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--steel-mid);
  /* never span rows — uniform size */
  grid-row: span 1 !important;
}
.gallery-item.hidden { display: none; }

.gi-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
}
.gallery-item:hover .gi-bg { transform: scale(1.06); }

/* Category gradients */
.automotive-bg  { background: linear-gradient(135deg, #2c3340, #1a1e24); }
.motorcycle-bg  { background: linear-gradient(135deg, #252d38, #1a1e24); }
.decorative-bg  { background: linear-gradient(135deg, #2e2820, #1a1810); }
.marine-bg      { background: linear-gradient(135deg, #1e2d30, #121c20); }
.industrial-bg  { background: linear-gradient(135deg, #282c32, #1a1e24); }
.automotive2-bg { background: linear-gradient(135deg, #20282e, #1a1e24); }
.decorative2-bg { background: linear-gradient(135deg, #2a2218, #1a1810); }
.motorcycle2-bg { background: linear-gradient(135deg, #1e2634, #161c26); }
.marine2-bg     { background: linear-gradient(135deg, #162028, #10181e); }

.gi-bg-icon { font-size: 56px; color: rgba(196,154,60,0.2); position: relative; z-index: 1; }

.gi-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 30, 36, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 16px;
  text-align: center;
  z-index: 2;
}
.gallery-item:hover .gi-overlay { opacity: 1; }
.gi-tag {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.gi-overlay h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 1.5px;
  color: #fff;
  margin-bottom: 6px;
}
.gi-overlay p { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.5; }

.gallery-cta {
  padding: 36px 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--border);
  background: var(--off-white);
}
.gallery-cta p { font-size: 15px; color: var(--text-mid); font-family: 'Inter', sans-serif; }

@media (max-width: 768px) {
  .gallery-filters { padding: 14px 1.25rem; gap: 6px; }
  .filter-btn { font-size: 10px; padding: 7px 12px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  /* Always show labels on touch devices */
  .gi-overlay { opacity: 1; background: rgba(26,30,36,0.72); }
  .gallery-cta { padding: 24px 1.25rem; }
  .gallery-cta .btn-dark { width: auto; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .gi-bg-icon { font-size: 44px; }
}
