/* ── Ace Honda Gallery Page CSS ── */

/* Filter bar */
.g-filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 36px;
  padding: 20px 24px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ace-border);
}
.g-filter-btn {
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ace-border);
  background: transparent;
  font-size: 0.82rem; font-weight: 600;
  color: var(--ace-gray-dark);
  transition: var(--transition);
}
.g-filter-btn:hover { border-color: var(--ace-red); color: var(--ace-red); }
.g-filter-btn.active { background: var(--ace-red); border-color: var(--ace-red); color: white; }

/* Gallery grid */
.g-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.g-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--ace-off-white);
  box-shadow: var(--shadow-sm);
}
.g-item img {
  width: 100%; height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.g-item:hover img { transform: scale(1.05); }
.g-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12,31,63,0.7) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 16px;
}
.g-item:hover .g-overlay { opacity: 1; }
.g-item-title { font-size: 0.8rem; font-weight: 600; color: white; }
.g-zoom {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.85rem;
}

/* Lightbox */
#lightbox {
  position: fixed; inset: 0;
  background: rgb(0 0 0 / 83%);
  z-index: 5000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
#lightbox.lb-open { display: flex; }
.lb-inner { position: relative; max-width: 960px; width: 100%; }
#lbImg {
  width: 100%; max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  transition: opacity 0.3s;
}
.lb-caption {
  text-align: center; color: rgba(255,255,255,0.7);
  font-size: 0.85rem; margin-top: 12px;
}
.lb-counter {
  text-align: center; color: rgba(255,255,255,0.4);
  font-size: 0.75rem; margin-top: 4px;
}
.lb-close {
  position: absolute; top: -48px; right: 0;
  background: none; border: none; color: white;
  font-size: 1.5rem; cursor: pointer; opacity: 0.7;
  transition: opacity 0.2s; padding: 8px;
}
.lb-close:hover { opacity: 1; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.25);
  color: white; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.lb-nav:hover { background: var(--ace-red); border-color: var(--ace-red); }
.lb-nav.lb-prev { left: -60px; }
.lb-nav.lb-next { right: -60px; }

/* Video grid */
.vid-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.vid-card {
  position: relative; border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.vid-card img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform 0.3s; }
.vid-card:hover img { transform: scale(1.04); }
.vid-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,31,63,0.35);
}
.vid-play i {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  color: var(--ace-red); font-size: 1.2rem;
  transition: var(--transition);
}
.vid-card:hover .vid-play i { background: var(--ace-red); color: white; transform: scale(1.1); }
.vid-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px; font-size: 0.82rem; font-weight: 600; color: white;
  background: linear-gradient(transparent, rgba(5,10,30,0.85));
}

@media (max-width: 1024px) { .g-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .g-grid { grid-template-columns: repeat(2, 1fr); }
  .vid-grid { grid-template-columns: 1fr 1fr; }
  .lb-nav.lb-prev { left: 0; bottom: -60px; top: auto; transform: none; }
  .lb-nav.lb-next { right: 0; bottom: -60px; top: auto; transform: none; }
}
@media (max-width: 480px) {
  .g-grid { grid-template-columns: 1fr; }
  .vid-grid { grid-template-columns: 1fr; }
}
