:root {
  --bg: #f6f8fb;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --text: #152033;
  --muted: #60708a;
  --line: rgba(21, 32, 51, 0.09);
  --primary: #2b5cff;
  --primary-soft: rgba(43, 92, 255, 0.10);
  --accent: #12b886;
  --danger: #e5484d;
  --warning: #d97706;
  --shadow: 0 20px 50px rgba(25, 38, 68, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max: 1220px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(43, 92, 255, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(18, 184, 134, 0.10), transparent 20%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(246, 248, 251, 0.72);
  border-bottom: 1px solid rgba(21, 32, 51, 0.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #7b61ff);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(43, 92, 255, 0.26);
  font-size: 18px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.brand-text span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 600;
}

.top-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  transition: 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.75);
}

.hero {
  padding: 42px 0 22px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.76) 100%);
  box-shadow: var(--shadow);
  border-radius: 32px;
  padding: 42px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 92, 255, 0.22), transparent 65%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.72;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  border: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.97rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6a5cff);
  color: white;
  box-shadow: 0 14px 28px rgba(43, 92, 255, 0.22);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-warning {
    background: rgba(217, 119, 6, 0.10);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.18);
}

.btn:hover {
  transform: translateY(-1px);
}

.hero-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.mini-card {
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(21, 32, 51, 0.05);
}

.mini-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.mini-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  text-align: left;
}

.stat strong {
  display: block;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.section {
  padding: 28px 0;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}

.section-header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 65ch;
}

.search-shell {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.search-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(120px, 0.33fr) repeat(4, 42px);
  gap: 14px;
  margin-bottom: 18px;
  align-items: center;
}

.field {
  position: relative;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus,
.field select:focus {
  border-color: rgba(43, 92, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(43, 92, 255, 0.10);
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.results-meta p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

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

.chip {
  padding: 9px 12px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(21, 32, 51, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card-media {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(43, 92, 255, 0.12), rgba(18, 184, 134, 0.10));
  display: grid;
  place-items: center;
  font-size: 4rem;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.badge {
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  background: rgba(18, 184, 134, 0.10);
  padding: 8px 10px;
  border-radius: 999px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.name-list {
  display: grid;
  gap: 10px;
}

.name-item {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8faff;
  border: 1px solid rgba(43, 92, 255, 0.08);
}

.name-item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.name-item span {
  color: var(--muted);
  font-size: 0.85rem;
}

.name-item b {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
}

.empty-state {
  display: none;
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed rgba(21, 32, 51, 0.16);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255,255,255,0.66);
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.about-card {
  background: rgba(255,255,255,0.84);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(21, 32, 51, 0.05);
}

.about-card h3 {
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

footer {
  padding: 34px 0 48px;
  color: var(--muted);
  text-align: center;
}


.topbar-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  position: relative;
}

.topbar-login {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.user-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(21, 32, 51, 0.14);
  box-shadow: 0 8px 18px rgba(21, 32, 51, 0.08);
  font-size: 1.1rem;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  list-style: none;
  cursor: pointer;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(21, 32, 51, 0.12);
  box-shadow: 0 16px 36px rgba(21, 32, 51, 0.16);
  display: none;
  z-index: 60;
}

.user-menu[open] .user-menu-panel {
  display: block;
}

.user-menu-name {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.user-menu-divider {
  border: none;
  border-top: 1px solid rgba(21, 32, 51, 0.12);
  margin: 10px 0;
}

.user-menu-logout {
  width: 100%;
  border: 1px solid rgba(229, 72, 77, 0.2);
  background: rgba(229, 72, 77, 0.08);
  color: var(--danger);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.user-menu-logout:hover {
  background: rgba(229, 72, 77, 0.14);
}

.user-avatar-slot {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-menu-link {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  text-align: left;
  margin-bottom: 8px;
  border: 1px solid rgba(21, 32, 51, 0.12);
  background: white;
}

.user-menu-link:hover {
  background: rgba(43, 92, 255, 0.10);
  border-color: rgba(43, 92, 255, 0.25);
}


@media (max-width: 720px) {
  .top-nav {
    display: none;
  }
  
  .topbar-auth {
    width: 100%;
    justify-content: flex-end;
  } 

  .user-menu-panel {
    right: 0;
    min-width: 200px;
  }
}