:root {
  --bg: #050508;
  --text: #f2f2f2;
  --muted: #a6a8b3;
  --gold: #e8b931;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "PT Sans", sans-serif;
  background:
    radial-gradient(1000px 700px at 0% 0%, rgba(91, 158, 255, 0.1), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(232, 185, 49, 0.08), transparent 58%),
    var(--bg);
}

.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 5%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding: 1.1rem 0 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 0 0 auto;
}

.topbar-breadcrumb {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
  flex: 1;
  text-align: right;
}

.topbar-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.topbar-breadcrumb a:hover {
  color: var(--gold);
}

.topbar-breadcrumb span {
  margin: 0 0.45rem;
  color: rgba(255, 255, 255, 0.24);
}

.topbar-breadcrumb strong {
  color: #dfe3ee;
  font-weight: 700;
}

.brand,
.topbar-actions,
.cart-link,
.cart-link-label,
.cart-count {
  display: none !important;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.68rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #b7bbca;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.9rem;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.back-link::before {
  content: "←";
  font-size: 0.92rem;
}

.back-link:hover {
  color: var(--gold);
  border-color: rgba(232, 185, 49, 0.28);
  background: rgba(232, 185, 49, 0.08);
}

.title {
  margin: 0 0 0.35rem;
  font-size: 2rem;
  font-family: "Poppins", sans-serif;
}

.subtitle {
  margin: 0 0 1.8rem;
  color: var(--muted);
}

.products-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: start;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.empty {
  color: var(--muted);
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.category-toast {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  max-width: min(320px, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(232, 185, 49, 0.28);
  background: rgba(17, 17, 24, 0.95);
  color: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 50;
}

.category-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.category-toast.error {
  border-color: rgba(255, 108, 108, 0.45);
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-breadcrumb {
    width: 100%;
    text-align: left;
    white-space: normal;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}

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

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

@media (max-width: 720px) {
  .topbar {
    gap: 0.8rem;
  }

  .back-link {
    width: 100%;
    justify-content: center;
    min-height: 46px;
  }

  .topbar-breadcrumb {
    line-height: 1.5;
  }

  .wrap {
    padding: 1.15rem 4% 2rem;
  }

  .title {
    font-size: 1.8rem;
    line-height: 1.15;
  }

  .subtitle {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .products-grid {
    gap: 1rem;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 1rem 1rem 2rem;
  }

  .topbar {
    margin-bottom: 1rem;
    padding: 0.9rem 0 1rem;
  }

  .topbar-breadcrumb {
    font-size: 0.8rem;
  }

  .back-link {
    font-size: 0.85rem;
    padding: 0.72rem 0.9rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .category-toast {
    right: 0.8rem;
    left: 0.8rem;
    bottom: 0.8rem;
    max-width: none;
  }
}
