:root {
  color-scheme: light;
  --bg: #f4f4f7;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --text: #0c0d12;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.14);
  --accent: #e8890e;
  --accent-hover: #cf7608;
  --accent-muted: rgba(232, 137, 14, 0.14);
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 14px 48px rgba(15, 23, 42, 0.07);
  --shadow-soft: 0 1px 0 rgba(15, 23, 42, 0.03), 0 6px 28px rgba(15, 23, 42, 0.05);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Unbounded", "DM Sans", system-ui, sans-serif;
  --nav-active-bg: #12192c;
  --nav-active-fg: #ffffff;
  --glass: rgba(255, 255, 255, 0.82);
  --ring: rgba(232, 137, 14, 0.38);
  --hero-mesh-1: rgba(99, 102, 241, 0.09);
  --hero-mesh-2: rgba(232, 137, 14, 0.11);
}

html.theme-dark {
  color-scheme: dark;
  --bg: #060607;
  --surface: #121215;
  --surface-2: #18181d;
  --text: #f4f4f5;
  --muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #f4a020;
  --accent-hover: #ffb02e;
  --accent-muted: rgba(244, 160, 32, 0.18);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.035), 0 20px 56px rgba(0, 0, 0, 0.58);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.025), 0 8px 32px rgba(0, 0, 0, 0.42);
  --nav-active-bg: #f4a020;
  --nav-active-fg: #141210;
  --glass: rgba(18, 18, 22, 0.88);
  --ring: rgba(244, 160, 32, 0.42);
  --hero-mesh-1: rgba(99, 102, 241, 0.1);
  --hero-mesh-2: rgba(244, 160, 32, 0.09);
  --shop-pill-bg: #16161c;
  --shop-pill-active: linear-gradient(135deg, #ffe566 0%, #fbbf24 32%, #f59e0b 58%, #ea580c 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 8% -8%, rgba(15, 23, 42, 0.05), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, var(--hero-mesh-2), transparent 52%),
    radial-gradient(720px 420px at 50% 108%, rgba(15, 23, 42, 0.04), transparent 48%);
  background-attachment: fixed;
}

html.theme-dark body {
  background-image:
    radial-gradient(1000px 500px at 6% -6%, var(--hero-mesh-2), transparent 52%),
    radial-gradient(780px 440px at 100% 8%, var(--hero-mesh-1), transparent 55%),
    radial-gradient(640px 380px at 50% 102%, rgba(0, 0, 0, 0.45), transparent 42%);
}

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

.shell {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.page {
  padding-bottom: 4rem;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 40;
  margin: 12px auto 0;
  width: min(1180px, calc(100% - 24px));
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 17px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent-muted), rgba(15, 23, 42, 0.04));
  border: 1px solid var(--border-strong);
  color: var(--accent);
}

html.theme-dark .brand-ico {
  background: linear-gradient(145deg, var(--accent-muted), rgba(255, 255, 255, 0.03));
}

.brand-name {
  font-size: 1.05rem;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.nav-links {
  display: none;
  flex: 1;
  justify-content: center;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(18, 25, 44, 0.05);
}

html.theme-dark .nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.admin-link {
  font-size: 0.88rem;
  color: var(--muted);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

html.theme-dark .icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.icon-btn--theme {
  position: relative;
}

.theme-ico {
  display: flex;
  align-items: center;
  justify-content: center;
}

html.theme-light .theme-ico-moon,
html:not(.theme-dark) .theme-ico-moon {
  display: none;
}

html.theme-dark .theme-ico-sun {
  display: none;
}

html[data-theme-pref="system"] .icon-btn--theme::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), var(--surface));
  cursor: pointer;
  font: inherit;
  box-shadow: 0 2px 12px rgba(18, 25, 44, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.cart-btn:hover {
  border-color: rgba(232, 137, 14, 0.5);
  box-shadow: 0 6px 22px var(--accent-muted);
}

html.theme-dark .cart-btn {
  background: linear-gradient(180deg, rgba(40, 40, 46, 0.98), var(--surface));
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

html.theme-dark .cart-btn:hover {
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.cart-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.cart-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.cart-sum {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Hero */
.hero {
  position: relative;
  margin: 20px auto 28px;
  width: min(1180px, calc(100% - 24px));
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(30, 20, 60, 0.75), rgba(180, 80, 120, 0.45));
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 48px 32px 40px;
  color: #fff;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-family: var(--font-display);
  line-height: 1.1;
}

.hero-sub {
  margin: 10px 0 24px;
  opacity: 0.95;
  font-size: 1.05rem;
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ca3af;
}

.dot.on {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.dot.off {
  background: #ef4444;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1rem;
}

/* Layout shop */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto 48px;
}

@media (min-width: 960px) {
  .layout {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
}

.main-col {
  background: rgba(255, 255, 255, 0.58);
  border-radius: calc(var(--radius) + 2px);
  padding: 22px 20px 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.theme-dark .main-col {
  background: rgba(14, 14, 18, 0.82);
  border-color: rgba(255, 255, 255, 0.065);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 48px rgba(0, 0, 0, 0.5);
}

@media (min-width: 960px) {
  html.theme-dark .sidebar {
    gap: 14px;
  }
}

.toolbar-titles {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 960px) {
  .sidebar {
    flex-direction: column;
    position: sticky;
    top: 88px;
    overflow: visible;
    scroll-snap-type: none;
  }
}

.cat-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 200px;
  flex-shrink: 0;
  width: 100%;
  scroll-snap-align: start;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s, color 0.2s;
}

@media (min-width: 960px) {
  .cat-pill {
    min-width: unset;
  }
}

.cat-pill:hover {
  border-color: #cfd6df;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(18, 25, 44, 0.1);
}

.cat-pill.active {
  background: linear-gradient(145deg, #1a2340 0%, var(--nav-active-bg) 55%, #0e1424 100%);
  color: var(--nav-active-fg);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 14px 40px rgba(18, 25, 44, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cat-pill.active .cat-meta {
  color: rgba(255, 255, 255, 0.78);
}

.cat-ico {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(18, 25, 44, 0.06), rgba(18, 25, 44, 0.02));
  border: 1px solid rgba(228, 232, 237, 0.95);
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cat-pill:hover .cat-ico {
  border-color: rgba(207, 214, 223, 0.95);
  box-shadow: 0 4px 14px rgba(18, 25, 44, 0.06);
}

.cat-pill.active .cat-ico {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--nav-active-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html.theme-dark .cat-ico {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f4f4f5;
}

.cat-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cat-name {
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.cat-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.toolbar {
  margin-bottom: 20px;
}

.toolbar-head {
  margin-bottom: 14px;
}

.shop-heading {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.shop-hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 42rem;
}

@media (max-width: 640px) {
  .shop-hint {
    font-size: 0.82rem;
  }
}

.toolbar-field {
  margin-top: 4px;
}

.toolbar-err {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  font-size: 0.9rem;
}

html.theme-dark .toolbar-err {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.select-wrap {
  max-width: 280px;
}

.select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(18, 25, 44, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select:focus {
  outline: none;
  border-color: rgba(232, 148, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.16);
}

html.theme-dark .select {
  background: rgba(26, 30, 42, 0.96);
}

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 22px;
}

.card-product {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.2s ease;
}

.card-product:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 56px rgba(18, 25, 44, 0.14);
  border-color: rgba(232, 148, 22, 0.35);
}

html.theme-dark .card-product:hover {
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.5);
  border-color: rgba(244, 160, 32, 0.25);
}

.card-hit {
  display: block;
  width: 100%;
  padding: 0 0 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.card-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 12px 12px;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-product:hover .card-img-wrap img {
  transform: scale(1.06);
}

.card-title {
  margin: 12px 14px 4px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.card-price {
  margin: 4px 14px 14px;
  margin-top: auto;
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-muted);
  color: #9a5a05;
}

html.theme-dark .card-price {
  color: #fcd34d;
}

/* Sections */
.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 16px;
  width: min(1180px, calc(100% - 24px));
  margin-inline: auto;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

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

.server-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.server-card-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.server-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(232, 148, 22, 0.18), rgba(18, 25, 44, 0.06));
  border: 1px solid rgba(228, 232, 237, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.server-card-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.server-card-sub {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ip-row {
  margin-top: 16px;
}

.ip-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.recent-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.recent-item {
  flex: 0 0 168px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(228, 232, 237, 0.95);
  padding: 12px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.2s ease;
}

.recent-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(18, 25, 44, 0.1);
  border-color: rgba(232, 148, 22, 0.25);
}

.recent-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  box-shadow: 0 0 0 1px rgba(18, 25, 44, 0.06);
}

.recent-body {
  margin-top: 8px;
}

.recent-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-user {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.muted {
  color: var(--muted);
}

/* Modal */
.modal-root[hidden] {
  display: none;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.45);
  backdrop-filter: blur(2px);
}

.modal {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:hover {
  border-color: #cfd6df;
}

.input:focus {
  outline: none;
  border-color: rgba(232, 148, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.16);
}

html.theme-dark .input {
  background: rgba(26, 30, 42, 0.85);
}

.form-error {
  color: #b91c1c;
  font-size: 0.88rem;
  margin: 0;
}

/* Footer */
.site-footer {
  background: #111318;
  color: #e5e7eb;
  padding: 48px 0 24px;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 0.85rem;
}

.footer-h {
  color: #9ca3af;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links.cols {
  columns: 2;
}

.footer-links a {
  color: #93c5fd;
  font-size: 0.92rem;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-powered {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #272b36;
  text-align: center;
  font-size: 0.88rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ed-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #111;
  font-weight: 800;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

html.theme-dark .card-product,
html.theme-dark .server-card,
html.theme-dark .recent-item,
html.theme-dark .cart-drawer {
  background: var(--surface);
}

/* Категории в тёмной теме: «карточки», активный градиент, светлая обводка при hover */
html.theme-dark .cat-pill:not(.active) {
  background: var(--shop-pill-bg);
  border-color: rgba(255, 255, 255, 0.065);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035),
    0 10px 32px rgba(0, 0, 0, 0.45);
}

html.theme-dark .cat-pill:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.52);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 14px 40px rgba(0, 0, 0, 0.55);
}

html.theme-dark .cat-pill:hover:not(.active) .cat-ico {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

html.theme-dark .cat-pill.active {
  background: var(--shop-pill-active);
  color: #14100c;
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow:
    0 12px 36px rgba(245, 158, 11, 0.32),
    0 6px 20px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

html.theme-dark .cat-pill.active .cat-meta {
  color: rgba(35, 28, 18, 0.62);
}

html.theme-dark .cat-pill.active .cat-ico {
  background: rgba(0, 0, 0, 0.16);
  border-color: rgba(0, 0, 0, 0.12);
  color: #2a2418;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

html.theme-dark .cat-pill.active:hover {
  border-color: rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  box-shadow:
    0 14px 42px rgba(245, 158, 11, 0.38),
    0 8px 24px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* --- корзина, оплата, кнопка в карточке --- */
.card-img-wrap {
  position: relative;
}

.btn-add-cart {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 0 11px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(180deg, #ffa726 0%, #fb8c00 45%, #f57c00 100%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 22px rgba(245, 124, 0, 0.48);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  transition:
    max-width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    gap 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.32s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.btn-add-cart__ico {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.btn-add-cart .ico-svg,
.btn-add-cart__svg {
  color: #fff;
}

.btn-add-cart__label {
  display: block;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    opacity 0.26s ease 0.05s,
    max-width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .btn-add-cart:hover,
  .btn-add-cart:focus-visible {
    max-width: 200px;
    gap: 8px;
    padding: 0 14px 0 11px;
    justify-content: flex-start;
    box-shadow: 0 10px 30px rgba(245, 124, 0, 0.58);
    transform: translateY(-1px);
  }

  .btn-add-cart:hover .btn-add-cart__label,
  .btn-add-cart:focus-visible .btn-add-cart__label {
    max-width: 120px;
    opacity: 1;
  }
}

/* Сенсор: подпись всегда видна */
@media (hover: none) {
  .btn-add-cart {
    max-width: 200px;
    gap: 8px;
    padding: 0 14px 0 11px;
    justify-content: flex-start;
  }

  .btn-add-cart__label {
    max-width: 120px;
    opacity: 1;
  }
}

#product-grid.is-loading,
#product-grid[aria-busy="true"] {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 26, 0.45);
  z-index: 120;
  backdrop-filter: blur(3px);
}

html.theme-dark .cart-backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  max-height: 100dvh;
  background: var(--surface);
  z-index: 130;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.18);
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  min-height: 0;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top, 0)) 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-head-text {
  min-width: 0;
}

.cart-kicker {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.cart-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(18, 25, 44, 0.02);
  flex-shrink: 0;
}

html.theme-dark .cart-steps {
  background: rgba(0, 0, 0, 0.2);
}

.cart-step-pill {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  border: 2px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.cart-step-pill.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 148, 22, 0.12);
  transform: scale(1.05);
}

.cart-steps-line {
  flex: 1;
  max-width: 72px;
  height: 2px;
  border-radius: 2px;
  background: var(--border);
}

.cart-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 20px 8px;
  -webkit-overflow-scrolling: touch;
}

.cart-drawer-panel {
  flex-shrink: 0;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), var(--surface));
  box-shadow: 0 -10px 40px rgba(18, 25, 44, 0.08);
}

html.theme-dark .cart-drawer-panel {
  background: linear-gradient(180deg, rgba(26, 30, 42, 0.9), var(--surface));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}

.cart-title {
  margin: 0;
  font-size: 1.2rem;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.cart-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cart-close:hover {
  background: var(--bg);
  color: var(--text);
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}

.cart-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
}

.cart-line img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

.cart-line-mid {
  flex: 1;
  min-width: 0;
}

.cart-line-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.cart-line-price {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
}

.cart-line-qty {
  margin-top: 8px;
}

.cart-qty-label {
  display: block;
}

.cart-qty-input {
  max-width: 140px;
  margin-top: 4px;
  padding: 8px 10px;
}

.cart-qty-hint {
  margin-top: 6px;
  margin-bottom: 0;
}

.cart-line-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
  align-self: center;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(18, 25, 44, 0.04);
  border: 1px solid rgba(228, 232, 237, 0.9);
}

.cart-total-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

.cart-total-sum {
  font-size: 1.25rem;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  color: var(--text);
}

html.theme-dark .cart-total-row {
  background: rgba(0, 0, 0, 0.25);
  border-color: var(--border);
}

.cart-step .field {
  display: block;
  margin-bottom: 6px;
}

.field-hint {
  margin: 0 0 14px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.req {
  color: var(--accent);
  font-weight: 700;
}

.cart-pay-lead {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.cart-step .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.cart-step .check input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.cart-step .check a {
  color: var(--accent);
  text-decoration: underline;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pay-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 22px rgba(245, 166, 35, 0.2);
}

.pay-ico {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(18, 25, 44, 0.05), rgba(18, 25, 44, 0.02));
  border: 1px solid var(--border);
  color: var(--accent);
}

.pay-ico-svg {
  color: inherit;
}

.pay-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-txt small {
  color: var(--muted);
  font-weight: 400;
}

.small {
  font-size: 0.88rem;
}

.cart-empty {
  text-align: center;
  padding: 1rem 0;
}

/* SVG-иконки (Lucide-подобные) */
.ico-svg {
  display: block;
  flex-shrink: 0;
}

.ico-svg--brand {
  color: var(--accent);
}

.ico-svg--muted {
  opacity: 0.55;
}

.ico-svg--on-accent {
  color: #141210;
}

.user-ico {
  display: inline-flex;
  align-items: center;
  opacity: 0.55;
}

.copy-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  color: var(--muted);
}

.ip-pill:hover .copy-ico {
  opacity: 1;
  color: var(--accent);
}

/* Доступность и полировка */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.skip-link:focus {
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.35), var(--shadow);
}

.btn-add-cart:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.65),
    0 0 0 4px rgba(245, 124, 0, 0.45),
    0 10px 30px rgba(245, 124, 0, 0.5);
}

.btn:focus-visible,
.select:focus-visible,
.input:focus-visible,
.cat-pill:focus-visible,
.pay-card:focus-visible,
.cart-close:focus-visible,
.icon-btn:focus-visible,
.cart-btn:focus-visible,
.ip-pill:focus-visible,
.skip-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 148, 22, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .cart-drawer,
  .btn-add-cart,
  .btn-add-cart__label,
  .card-product,
  .cat-pill,
  .pay-card,
  .card-img-wrap img {
    transition: none !important;
  }

  .card-product:hover {
    transform: none;
  }

  .card-product:hover .card-img-wrap img {
    transform: none;
  }

  .btn-add-cart:hover {
    transform: none;
  }
}
