/* ArmorXElite Category Grid - grid.css */

/* ── Grid container ── */
.axe-cat-grid {
  display: grid;
  gap: 18px;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── Column presets ── */
.axe-cat-cols-2 { grid-template-columns: repeat(2, 1fr); }
.axe-cat-cols-3 { grid-template-columns: repeat(3, 1fr); }
.axe-cat-cols-4 { grid-template-columns: repeat(4, 1fr); }
.axe-cat-cols-5 { grid-template-columns: repeat(5, 1fr); }
.axe-cat-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ── Category card ── */
.axe-cat-item {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
  background: #fff;
  border: 1px solid #e8e4de;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
}

.axe-cat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(224, 120, 32, 0.14);
  border-color: #e07820;
  text-decoration: none !important;
}
.axe-cat-item:focus-visible {
  outline: 2px solid #e07820;
  outline-offset: 2px;
}

/* ── Image wrapper ── */
.axe-cat-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0ede8;
}

.axe-cat-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 12px;
  transition: transform 0.35s ease;
}

.axe-cat-item:hover .axe-cat-img {
  transform: scale(1.05);
}

/* Subtle orange overlay on hover */
.axe-cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(224, 120, 32, 0.18) 100%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}
.axe-cat-item:hover .axe-cat-overlay {
  opacity: 1;
}

/* Orange bottom border accent on hover */
.axe-cat-img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #e07820;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.axe-cat-item:hover .axe-cat-img-wrap::after {
  transform: scaleX(1);
}

/* ── No image placeholder ── */
.axe-cat-item--no-img .axe-cat-img-wrap {
  background: #f5f3ef;
  display: flex;
  align-items: center;
  justify-content: center;
}
.axe-cat-item--no-img .axe-cat-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.3;
}

/* ── Info bar ── */
.axe-cat-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  gap: 8px;
  background: #fff;
  border-top: 1px solid #f0ece6;
}

.axe-cat-name {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  transition: color 0.2s;
}
.axe-cat-item:hover .axe-cat-name {
  color: #e07820;
}

.axe-cat-count {
  font-size: 11px;
  color: #aaa;
  white-space: nowrap;
  flex-shrink: 0;
  background: #f5f3ef;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #e8e4de;
}

/* ── Empty state ── */
.axe-cat-empty {
  color: #aaa;
  font-size: 14px;
  padding: 24px 0;
}

/* ── Responsive breakpoints ── */
@media (max-width: 1024px) {
  .axe-cat-cols-5,
  .axe-cat-cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .axe-cat-cols-4,
  .axe-cat-cols-5,
  .axe-cat-cols-6 { grid-template-columns: repeat(2, 1fr); }
  .axe-cat-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .axe-cat-grid { gap: 12px; }
}
@media (max-width: 480px) {
  .axe-cat-cols-2,
  .axe-cat-cols-3,
  .axe-cat-cols-4,
  .axe-cat-cols-5,
  .axe-cat-cols-6 { grid-template-columns: repeat(2, 1fr); }
  .axe-cat-info { padding: 10px 12px; }
  .axe-cat-name { font-size: 13px; }
}
