@font-face {
  font-family: "Alexandria";
  src: url("/admin/fonts/Alexandria-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root,
[data-theme="dark"] {
  --bg: #161513;
  --surface: #1c1a18;
  --surface-2: #262421;
  --border: rgba(239, 233, 222, 0.09);
  --border-strong: rgba(239, 233, 222, 0.18);
  --text: #efe9de;
  --muted: #b0a89b;
  --accent: #e03e47;
  --accent-hover: #f0515a;
  --accent-soft: rgba(224, 62, 71, 0.14);
  --ok: #4cc38a;
  --ok-soft: rgba(76, 195, 138, 0.14);
  --warn: #e5a94e;
  --warn-soft: rgba(229, 169, 78, 0.15);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

[data-theme="light"] {
  --bg: #f7f4ee;
  --surface: #fdfbf7;
  --surface-2: #efe9df;
  --border: rgba(31, 27, 22, 0.1);
  --border-strong: rgba(31, 27, 22, 0.2);
  --text: #1f1b16;
  --muted: #6d655b;
  --accent: #b91c26;
  --accent-hover: #991b23;
  --accent-soft: rgba(185, 28, 38, 0.1);
  --ok: #167a4c;
  --ok-soft: rgba(22, 122, 76, 0.12);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.12);
  --shadow: 0 14px 36px rgba(31, 27, 22, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 12% 0%, var(--accent-soft), transparent 42%), var(--bg);
  color: var(--text);
  font-family: "Alexandria", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
}

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

.brand-text strong {
  font-size: 1rem;
  font-weight: 700;
}

.brand-text span {
  font-size: 0.76rem;
  color: var(--muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--muted);
  transition: color 0.16s ease, background 0.16s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease;
}

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

.btn-sm {
  padding: 8px 14px;
  font-size: 0.84rem;
}

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

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

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.icon-btn {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
}

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

.maintenance-banner {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 42%, transparent);
  color: var(--text);
  font-size: 0.9rem;
}

.hero {
  padding: 40px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.25;
  font-weight: 800;
}

.accent-text {
  color: var(--accent);
}

.hero-desc {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 56ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.trust-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.trust-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-size: 1.1rem;
}

.trust-row h2 {
  margin: 0 0 2px;
  font-size: 0.94rem;
  font-weight: 700;
}

.trust-row p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.catalog-section {
  padding: 18px 0 42px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 750;
}

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

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 8px 12px;
  min-width: 240px;
}

.search-box input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 0.88rem;
}

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

.pill-btn,
.cat-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pill-btn.active,
.cat-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.categories {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

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

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.product-card.is-unavailable {
  opacity: 0.72;
}

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

.product-badge {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  padding: 8px;
  font-size: 1.35rem;
}

.product-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-flags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cat-chip,
.flag-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
}

.flag-chip.featured {
  background: var(--accent-soft);
  color: var(--accent);
}

.flag-chip.offer {
  background: var(--ok-soft);
  color: var(--ok);
}

.product-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.product-desc-snippet {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

.product-tag {
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--surface-2);
}

.card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-stack {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.price-now {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
}

.price-old {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: line-through;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}

.status-badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-badge.out {
  background: var(--accent-soft);
  color: var(--accent);
}

.catalog-state {
  padding: 36px 20px;
  border-radius: 18px;
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  text-align: center;
  color: var(--muted);
}

.steps-section {
  padding: 18px 0 54px;
}

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

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.step-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}

.footer-brand img {
  border-radius: 8px;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-wrap h2 {
  margin: 4px 0 0;
  font-size: 1.12rem;
}

.modal-price-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.meta-item {
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-label {
  font-size: 0.74rem;
  color: var(--muted);
}

.meta-item strong {
  font-size: 0.84rem;
}

.modal-email-note {
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--warn-soft);
  font-size: 0.82rem;
}

.modal-desc-wrap h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.modal-desc {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 0.84rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-desc p {
  margin: 0;
}

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

.modal-actions .btn {
  flex: 1 1 200px;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

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

  .nav-link {
    display: none;
  }
}

@media (max-width: 520px) {
  .hero-copy {
    padding: 22px 18px;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }

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