.cat-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 8% 0%, rgba(15, 52, 96, .1), transparent 42%),
    radial-gradient(ellipse at 92% 8%, rgba(201, 162, 39, .1), transparent 38%),
    linear-gradient(180deg, #e8eef5 0%, var(--sand) 48%, #e7dfd0 100%);
}

.cat-top {
  background: linear-gradient(135deg, #071525, var(--navy-800));
  color: #fff;
  box-shadow: 0 8px 28px rgba(7, 21, 37, .25);
}

.cat-top__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cat-brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  color: inherit;
  text-decoration: none;
}

.cat-brand img {
  width: 42px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .3));
}

.cat-brand strong {
  display: block;
  font-size: .95rem;
  line-height: 1.5;
}

.cat-brand small {
  display: block;
  opacity: .75;
  font-size: .78rem;
  margin-top: .15rem;
}

.cat-top__nav {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.cat-top__nav a {
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  transition: background .15s;
}

.cat-top__nav a:hover { background: rgba(255, 255, 255, .08); }

.cat-top__cta {
  color: var(--navy-900) !important;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold)) !important;
  border-color: transparent !important;
  font-weight: 800 !important;
}

.cat-main {
  flex: 1;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.5rem;
}

.cat-hero {
  text-align: center;
  margin-bottom: 1.75rem;
  animation: riseIn .45s ease both;
}

.cat-hero h1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  color: var(--navy-900);
}

.cat-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: .95rem;
  max-width: 36rem;
  margin-inline: auto;
}

.cat-root { animation: riseIn .5s ease .08s both; }

.cat-loading,
.cat-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
}

.cat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.05rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  box-shadow: 0 10px 28px rgba(15, 52, 96, .07);
  transition: transform .18s, box-shadow .18s;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 52, 96, .12);
}

.cat-card__visual {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .25rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border: 1px solid var(--line);
  overflow: hidden;
}

.cat-card__img {
  width: 100%;
  height: 96px;
  object-fit: contain;
  padding: .35rem;
}

.cat-card__badge {
  display: inline-flex;
  padding: .4rem .85rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  color: #fff;
  background: var(--navy-700);
}

.cat-card__badge--eco { background: #9b1c1c; }
.cat-card__badge--silver { background: #64748b; }
.cat-card__badge--gold { background: #a16207; }
.cat-card__badge--diamond { background: #6d28d9; }

.cat-card h2 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--navy-900);
}

.cat-card__price {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--navy-800);
}

.cat-card__price small {
  font-weight: 600;
  font-size: .78rem;
  color: var(--muted);
}

.cat-card__meta {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
}

.cat-card__actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: .5rem;
}

.cat-detail {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.cat-detail__back {
  margin-bottom: 1rem;
}

.cat-detail__head {
  margin-bottom: 1.15rem;
}

.cat-detail__head h1 {
  margin: 0 0 .35rem;
  font-size: 1.45rem;
  color: var(--navy-900);
}

.cat-detail__sub {
  margin: 0 0 .65rem;
  font-size: .95rem;
  color: var(--navy-700);
  font-weight: 700;
}

.cat-detail__head .cat-card__price {
  margin-bottom: .2rem;
}

.cat-detail__faces {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .85rem;
  margin-bottom: 1rem;
}

.cat-detail__fig {
  margin: 0;
  text-align: center;
}

.cat-detail__fig figcaption {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: .4rem;
}

.cat-detail__fig img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: .35rem;
}

.cat-detail__note {
  margin: .75rem 0 0;
  padding: .75rem .9rem;
  background: #f8fafc;
  border-radius: 10px;
  border-right: 3px solid var(--gold);
  font-size: .88rem;
  line-height: 1.75;
  color: var(--muted);
}

.cat-detail__html {
  margin-top: 1rem;
  line-height: 1.85;
  font-size: .95rem;
}

.cat-detail__html img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.cat-detail__cta {
  margin-top: 1.35rem;
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.cat-foot {
  text-align: center;
  padding: 1.25rem;
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid rgba(15, 52, 96, .08);
  background: rgba(255, 255, 255, .45);
}

@media (max-width: 640px) {
  .cat-top__inner { justify-content: center; text-align: center; }
  .cat-brand { flex-direction: column; }
  .cat-top__nav { justify-content: center; width: 100%; }
}
