/* Reset & base */
body {
  font-family: Arial, sans-serif;
  background: #111 url(./images/dark-bg.jpg) no-repeat center center fixed;
  background-size: cover;
  color: #ccc;
  padding-top: 60px; /* space for fixed menu */
}

/* Top navigation */
.top-menu {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  padding: 10px 0;
}
.top-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.top-menu li {
  display: inline-block;
  margin: 0 15px;
}
.top-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 15px;
}
.top-menu a i {
  margin-right: 6px;
}
.top-menu a:hover {
  color: #ffd700;
}

/* Frosted card boxes */
.frosted-box {
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  max-width: 1200px; /* wide enough for 6 columns */
  text-align: center;
}
.frosted-box h2, .frosted-box h3 {
  margin-top: 0;
  color: #fff;
}

/* Buttons */
button {
  margin: 8px;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  background: #666;
  color: #fff;
  transition: background 0.2s ease;
}
button:hover {
  background: #555;
}

/* Catalog grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* 6 across */
  gap: 20px;
  padding: 20px;
}
.catalog-card {
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  position: relative;
}
.catalog-card img {
  width: 100%;
  aspect-ratio: 6 / 9;   /* consistent cover ratio */
  object-fit: cover;
  border-radius: 6px;
}
.catalog-card h4 {
  margin: 10px 0 5px;
  font-size: 14px;
  color: #fff;
}
.catalog-card p {
  font-size: 12px;
  color: #ccc;
}

/* "NEW" badge */
.new-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e74c3c;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Search + filter form */
.catalog-search input[type="text"],
.catalog-search select {
  padding: 10px;
  margin: 5px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  backdrop-filter: blur(6px);
}
.catalog-search input[type="text"]::placeholder {
  color: #ddd;
}
.catalog-search select option {
  background: #333;
  color: #fff;
}
.catalog-search button {
  margin: 8px;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  background: #666;
  color: #fff;
  transition: background 0.2s ease;
}
.catalog-search button:hover {
  background: #555;
}

<!-- Pagination controls -->
<div class="pagination">
  <?php for ($i = 1; $i <= ceil($total / $perPage); $i++): ?>
    <?php $query = http_build_query(array_merge($_GET, ['page'=>$i])); ?>
    <?php if ($i == $page): ?>
      <strong><?php echo $i; ?></strong>
    <?php else: ?>
      <a href="?<?php echo $query; ?>"><?php echo $i; ?></a>
    <?php endif; ?>
  <?php endfor; ?>
</div>

/* Footer */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 0;
  width: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}
footer p {
  margin: 0;
}
footer i {
  color: #e74c3c;
}