:root {
  --fly-accent: #5b4cff;
  --fly-accent-text: #ffffff;
  --fly-radius: 16px;
  --fly-font: Manrope, Inter, system-ui, sans-serif;
  --fly-overlay: rgba(8, 10, 24, 0.58);
  --fly-bg: #ffffff;
  --fly-ink: #10121c;
  --fly-muted: #667085;
  --fly-line: #eceef5;
  --fly-soft: #f5f6fb;
}

.fly-hidden { display: none !important; }

.fly-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: var(--fly-overlay);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 16px 24px;
  font-family: var(--fly-font);
  color: var(--fly-ink);
  box-sizing: border-box;
}

.fly-modal {
  width: min(1120px, 100%);
  max-height: 92vh;
  background: var(--fly-bg);
  border-radius: calc(var(--fly-radius) + 4px);
  box-shadow: 0 30px 80px rgba(16, 18, 28, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fly-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--fly-line);
}

.fly-searchwrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--fly-soft);
  border-radius: 999px;
  padding: 0 8px 0 16px;
  border: 1px solid transparent;
}
.fly-searchwrap:focus-within {
  border-color: var(--fly-accent);
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--fly-accent) 18%, transparent);
}

.fly-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: 500 16px/1.4 var(--fly-font);
  padding: 14px 8px;
  color: var(--fly-ink);
  min-width: 0;
}

.fly-iconbtn {
  border: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--fly-muted);
  display: grid;
  place-items: center;
}
.fly-iconbtn:hover { background: #eceef5; color: var(--fly-ink); }
.fly-close { width: 42px; height: 42px; }

.fly-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 0;
  flex: 1;
}

.fly-aside {
  border-right: 1px solid var(--fly-line);
  overflow: auto;
  padding: 16px;
}
.fly-main {
  overflow: auto;
  padding: 16px 18px 28px;
}

.fly-k {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fly-muted);
  font-weight: 700;
  margin: 0 0 8px;
}

.fly-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--fly-line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  margin: 0 6px 8px 0;
  cursor: pointer;
  font: 500 13px var(--fly-font);
}
.fly-chip:hover, .fly-chip.is-on {
  border-color: var(--fly-accent);
  color: var(--fly-accent);
  background: color-mix(in srgb, var(--fly-accent) 8%, #fff);
}

.fly-cat {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 8px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font: 500 13px var(--fly-font);
  color: var(--fly-ink);
}
.fly-cat:hover, .fly-cat.is-on { background: var(--fly-soft); color: var(--fly-accent); }

.fly-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.fly-count { color: var(--fly-muted); font-size: 13px; }
.fly-corrected { font-size: 13px; margin: 0 0 10px; }
.fly-corrected b { color: var(--fly-accent); }

.fly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.fly-grid.is-list {
  grid-template-columns: 1fr;
}
.fly-card {
  border: 1px solid var(--fly-line);
  border-radius: var(--fly-radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}
.fly-grid.is-list .fly-card {
  flex-direction: row;
  min-height: 0;
}
.fly-card:hover { box-shadow: 0 10px 28px rgba(16,18,28,.08); }
.fly-photo {
  aspect-ratio: 1;
  background: var(--fly-soft);
  position: relative;
  overflow: hidden;
}
.fly-grid.is-list .fly-photo { width: 120px; aspect-ratio: 1; flex: 0 0 120px; }
.fly-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fly-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.fly-name { font-weight: 650; font-size: 13.5px; line-height: 1.35; }
.fly-name mark { background: #fff3a3; padding: 0 2px; border-radius: 3px; }
.fly-sku, .fly-stock { font-size: 12px; color: var(--fly-muted); }
.fly-stock.is-yes { color: #0f9f6e; }
.fly-stock.is-no { color: #d92d20; }
.fly-price { font-weight: 800; font-size: 16px; margin-top: auto; }
.fly-old { color: var(--fly-muted); text-decoration: line-through; font-weight: 500; font-size: 12px; margin-left: 6px; }
.fly-stickers { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.fly-sticker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--fly-accent);
  color: var(--fly-accent-text);
  border-radius: 6px;
  padding: 3px 6px;
}
.fly-sticker.sale { background: #e11d48; }
.fly-sticker.new { background: #0f9f6e; }
.fly-sticker.hit { background: #f59e0b; color: #111; }

.fly-empty { text-align: center; padding: 48px 16px; color: var(--fly-muted); }
.fly-loader, .fly-more { text-align: center; padding: 16px; color: var(--fly-muted); font-size: 13px; }
.fly-loader { padding: 56px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fly-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--fly-line);
  border-top-color: var(--fly-accent);
  border-radius: 50%;
  display: inline-block;
  animation: fly-spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes fly-spin { to { transform: rotate(360deg); } }
.fly-searchwrap.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 2px solid var(--fly-line);
  border-top-color: var(--fly-accent);
  border-radius: 50%;
  animation: fly-spin .7s linear infinite;
  flex: 0 0 auto;
}
.fly-main.is-loading { position: relative; }
.fly-main.is-loading .fly-grid { opacity: .45; pointer-events: none; }

.fly-select, .fly-check {
  font: 500 13px var(--fly-font);
  border: 1px solid var(--fly-line);
  border-radius: 10px;
  padding: 7px 10px;
  background: #fff;
}
.fly-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.fly-start { padding: 8px 0 20px; }
.fly-popular { display: flex; flex-wrap: wrap; }

@media (max-width: 760px) {
  .fly-body { grid-template-columns: 1fr; }
  .fly-aside { border-right: 0; border-bottom: 1px solid var(--fly-line); max-height: 180px; }
  .fly-overlay { padding: 0; }
  .fly-modal { max-height: 100vh; height: 100vh; border-radius: 0; width: 100%; }
}

.fly-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(640px, 100%);
  background: #fff;
  border: 1px solid #e4e7f1;
  border-radius: 999px;
  padding: 10px 12px 10px 16px;
  box-shadow: 0 10px 30px rgba(16,18,28,.08);
  cursor: text;
  font-family: var(--fly-font);
}
.fly-launcher span { color: #98a2b3; font-size: 15px; }
.fly-launcher b { margin-left: auto; background: var(--fly-accent); color: var(--fly-accent-text); border-radius: 999px; padding: 8px 14px; font-size: 13px; }
