/* public/css/gallery.css — Template Gallery Styles */

.gallery-page { padding-top: 0; }

/* ── Hero ── */
.gallery-hero {
  padding: 100px 24px 48px;
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
}
.gallery-hero__title { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }
.gallery-hero__sub { font-size: 1.1rem; opacity: 0.8; margin-bottom: 32px; }

/* ── Search ── */
.gallery-search {
  display: flex;
  max-width: 600px;
  margin: 0 auto 32px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}
.gallery-search__input {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  outline: none;
}
.gallery-search__input::placeholder { color: rgba(255,255,255,0.5); }
.gallery-search__btn {
  padding: 14px 28px;
  background: linear-gradient(135deg, #7073e5, #5a5edc);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.gallery-search__btn:hover { opacity: 0.9; }

/* ── Category Pills ── */
.gallery-categories {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 24px;
}
.cat-pill {
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
}
.cat-pill:hover,
.cat-pill.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* ── Grid Wrapper ── */
.gallery-grid-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.gallery-count { font-size: 0.9rem; color: #888; }
.gallery-sort {
  padding: 8px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.85rem;
  background: #fff;
  cursor: pointer;
}

/* ── Template Card ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.tpl-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.tpl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.tpl-card__thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.tpl-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.tpl-card:hover .tpl-card__thumb img { transform: scale(1.05); }

.tpl-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,26,46,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.25s;
}
.tpl-card:hover .tpl-card__overlay { opacity: 1; }

.btn-preview,
.btn-use {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: transform 0.15s;
}
.btn-preview:hover,
.btn-use:hover { transform: translateY(-2px); }
.btn-preview { background: rgba(255,255,255,0.2); color: #fff; backdrop-filter: blur(4px); }
.btn-use { background: linear-gradient(135deg, #7073e5, #5a5edc); color: #fff; }

.tpl-card__info { padding: 16px 20px; }
.tpl-card__name { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.tpl-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 8px;
}
.tpl-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tpl-tag {
  padding: 3px 10px;
  background: #f0f0ff;
  color: #7073e5;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ── Empty State ── */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: #999;
}
.gallery-empty__icon { font-size: 3rem; margin-bottom: 16px; }
.gallery-empty h3 { font-size: 1.3rem; color: #333; margin-bottom: 8px; }

/* ── Pagination ── */
.gallery-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  color: #333;
  background: #f0f0f0;
  transition: all 0.2s;
}
.page-btn:hover,
.page-btn.active {
  background: linear-gradient(135deg, #7073e5, #5a5edc);
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .gallery-hero__title { font-size: 1.8rem; }
  .gallery-grid { grid-template-columns: 1fr; }
}
