@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --text: #1b1f2a;
  --muted: #6a7385;
  --line: #e4e8ef;
  --brand: #0f766e;
  --brand-dark: #0b5f59;
  --accent: #ff8a00;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(18, 28, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -10%, #d6faf4 0, transparent 35%),
    radial-gradient(circle at 95% 10%, #fff0dd 0, transparent 30%),
    var(--bg);
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
  background: rgba(244, 245, 249, 0.9);
  border-bottom: 1px solid rgba(27, 31, 42, 0.08);
}

.topbar-inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f766e, #0284c7);
  box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.16);
}

.search {
  flex: 1;
  max-width: 520px;
}

.search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.hero {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff, #f7fffd);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.hero .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero .meta span {
  border: 1px solid #b8ebe2;
  background: #def8f3;
  color: #0c615a;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

.catalog-head {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.catalog-head h2 {
  margin: 0;
  font-size: 28px;
}

.catalog-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.page-badge {
  border: 1px solid #c7ebe4;
  background: #e9faf7;
  color: #0d655e;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
}

.grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(18, 28, 45, 0.06);
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e9edf3;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.badge {
  width: fit-content;
  border: 1px solid #ffd8a9;
  background: #fff5e8;
  color: #a85900;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.title {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.desc {
  margin: 0;
  min-height: 36px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.rating {
  color: #9e6000;
  font-weight: 600;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: auto;
}

.price {
  font-size: 21px;
  font-weight: 700;
}

.old-price {
  color: #8b93a1;
  text-decoration: line-through;
  font-size: 13px;
  margin-left: 6px;
}

.stock {
  color: #0f766e;
  font-weight: 600;
  font-size: 12px;
}

.btn {
  margin-top: 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), #0ea5e9);
  color: #fff;
  padding: 10px 12px;
  font: inherit;
  font-weight: 600;
}

.pagination {
  margin: 24px 0 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 44px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #273143;
  text-decoration: none;
  font-weight: 600;
  padding: 0 12px;
}

.page-btn:hover {
  border-color: #8fd2ca;
  background: #edfcf8;
}

.page-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.page-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

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

@media (max-width: 780px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 12px 0;
    height: auto;
  }

  .search {
    max-width: none;
    width: 100%;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .container {
    width: calc(100% - 24px);
  }

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