.products-main {
  max-width: 1300px;
  margin: 70px auto;
  padding: 40px 5% 80px;
}

.products-header {
  text-align: center;
  margin-bottom: 12px;
}

.products-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--ab-dark, #000d26);
}

.products-header p {
  font-size: 14px;
  color: #777;
  margin-top: 4px;
}

/* ── Filter container (categories + badges) ── */
.products-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.products-filters > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ── Badge Filters (special/popular) ── */
.products-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.products-badges .badge-btn {
  padding: 8px 22px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #fff;
  color: var(--ab-dark, #000d26);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.products-badges .badge-btn:hover {
  border-color: var(--ab-blue, #3293e3);
  color: var(--ab-blue, #3293e3);
  background: #f0f6ff;
}

.products-badges .badge-btn.active {
  background: #ff6b6b;
  border-color: #ff6b6b;
  color: #fff;
}

.products-badges .badge-btn.active[data-filter="popular"] {
  background: #f59e0b;
  border-color: #f59e0b;
}

@media (max-width: 767px) {
  .products-filters { gap: 6px; }
  .products-badges .badge-btn { font-size: 12px; padding: 5px 12px; }
}

/* ── Categories ── */
.products-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.products-categories .cat-btn {
  padding: 8px 22px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #fff;
  color: var(--ab-dark, #000d26);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.products-categories .cat-btn:hover {
  border-color: var(--ab-blue, #3293e3);
  color: var(--ab-blue, #3293e3);
  background: #f0f6ff;
}

.products-categories .cat-btn.active {
  background: var(--ab-blue, #3293e3);
  border-color: var(--ab-blue, #3293e3);
  color: #fff;
}

@media (max-width: 767px) {
  .products-categories { gap: 6px; }
  .products-categories .cat-btn { font-size: 12px; padding: 5px 12px; }
}

.products-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.products-count {
  font-size: 14px;
  color: #777;
}

/* ── Grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  background: #c6ddff;
  border-radius: 30px;
  padding: 28px 32px 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.products-grid .product-card {
  width: 100%;
}

.products-grid .product-loading,
.products-grid .product-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: #999;
  font-size: 15px;
}

.products-grid .product-error {
  color: #e74c3c;
}

/* ── Pagination ── */
.products-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  direction: ltr;
}

.products-pagination .page-btn {
  min-width: 40px;
  height: 40px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  color: var(--ab-dark, #000d26);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0 10px;
  user-select: none;
}

.products-pagination .page-btn:hover:not(.active):not(.disabled) {
  border-color: var(--ab-blue, #3293e3);
  color: var(--ab-blue, #3293e3);
  background: #f0f6ff;
}

.products-pagination .page-btn.active {
  background: var(--ab-blue, #3293e3);
  border-color: var(--ab-blue, #3293e3);
  color: #fff;
}

.products-pagination .page-btn.disabled {
  opacity: 0.35;
  cursor: default;
}

.products-pagination .page-btn.ellipsis {
  border: none;
  cursor: default;
  min-width: auto;
  padding: 0 4px;
  color: #999;
  font-weight: 400;
}

.products-pagination .page-btn.ellipsis:hover {
  background: transparent;
  border-color: transparent;
}

.products-pagination .page-btn svg {
  width: 16px;
  height: 16px;
}

.products-pagination .page-info {
  font-size: 13px;
  color: #999;
  margin-right: 12px;
  direction: rtl;
}

/* ── Empty state ── */
.products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: #999;
  font-size: 16px;
}

/* ═══ Responsive ═══ */
@media (max-width: 1399px) {
  .products-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1199px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); padding: 24px 20px 28px; }
}

@media (max-width: 991px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 20px 16px 24px; }
  .products-main { padding: 24px 4% 60px; }
  .products-header h1 { font-size: 22px; }
  .products-pagination { gap: 4px; }
  .products-pagination .page-btn { min-width: 34px; height: 34px; font-size: 13px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
