:root {
  --bg: #090d0f;
  --bg-2: #0d1417;
  --ink: #f4f7f5;
  --muted: #98a7a2;
  --subtle: #6f7e79;
  --line: rgba(255, 255, 255, 0.105);
  --line-strong: rgba(255, 255, 255, 0.18);
  --panel: rgba(16, 23, 26, 0.88);
  --panel-strong: #121b1f;
  --panel-soft: #0f171a;
  --teal: #29d3bd;
  --teal-dark: #0b8e80;
  --amber: #f4b95f;
  --coral: #ec694f;
  --coral-dark: #cf4d36;
  --blue: #79a8ff;
  --violet: #b798ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(41, 211, 189, 0.12), transparent 34rem),
    linear-gradient(180deg, #10181b 0, var(--bg) 24rem, #080b0d 100%);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 88px;
  padding: 18px clamp(18px, 4vw, 52px);
  background: rgba(8, 12, 14, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
}

.brand-mark span {
  display: block;
  border-radius: 999px;
  background: var(--teal);
}

.brand-mark span:nth-child(1) {
  height: 16px;
}

.brand-mark span:nth-child(2) {
  height: 28px;
  background: var(--amber);
}

.brand-mark span:nth-child(3) {
  height: 22px;
  background: var(--ink);
}

.brand-mark span:nth-child(4) {
  height: 34px;
  background: var(--coral);
}

h1 {
  font-size: clamp(26px, 3.6vw, 46px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 900;
}

h2 {
  font-size: 21px;
  letter-spacing: 0;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cart-button,
.icon-button,
.filter,
.drawer-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 14px;
  border-color: rgba(41, 211, 189, 0.26);
  background: linear-gradient(180deg, rgba(41, 211, 189, 0.15), rgba(41, 211, 189, 0.06));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  font-weight: 800;
}

.cart-button strong {
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-size: 13px;
}

main {
  padding: 28px clamp(18px, 4vw, 52px) 80px;
}

.control-band {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto minmax(150px, 210px) minmax(190px, 260px);
  align-items: end;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 27, 31, 0.96), rgba(13, 20, 23, 0.96));
  box-shadow: var(--shadow-soft);
}

.search-wrap,
.sort-wrap,
.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background-color: #0a1012;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input {
  min-height: 50px;
  padding: 12px 14px;
}

input::placeholder {
  color: #62706b;
}

select {
  min-height: 46px;
  padding: 0 42px 0 13px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 20px / 7px 7px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 20px / 7px 7px no-repeat,
    #0a1012;
  font-weight: 800;
}

input:focus,
select:focus {
  border-color: rgba(41, 211, 189, 0.72);
  box-shadow: 0 0 0 4px rgba(41, 211, 189, 0.13);
  background-color: #0d1517;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  min-height: 46px;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 850;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.filter:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

.filter.active {
  border-color: rgba(41, 211, 189, 0.62);
  background: rgba(41, 211, 189, 0.14);
  color: var(--teal);
}

.stats {
  display: grid;
  gap: 4px;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.35;
}

.stats strong {
  color: var(--ink);
}

.catalog-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 28px 0 14px;
}

.catalog-head h2 {
  font-weight: 900;
}

.catalog-head p {
  color: var(--muted);
}

.catalog {
  display: grid;
  gap: 10px;
}

.result-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, auto);
  gap: 18px;
  align-items: center;
  padding: 18px 16px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(41, 211, 189, 0.075), transparent 24rem),
    var(--panel-strong);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.result-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--teal), var(--amber), var(--coral));
}

.result-row:hover {
  border-color: rgba(41, 211, 189, 0.28);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  transform: translateY(-1px);
}

.result-main {
  min-width: 0;
}

.result-main p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}

.result-main h3 {
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 900;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.type-pill {
  border-color: rgba(244, 185, 95, 0.32);
  background: rgba(244, 185, 95, 0.11);
  color: #ffd08a;
}

.variant-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.daw-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.daw-label {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(41, 211, 189, 0.28);
  border-radius: 8px;
  background: rgba(41, 211, 189, 0.1);
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.daw-choice:hover {
  border-color: rgba(41, 211, 189, 0.52);
  transform: translateY(-1px);
}

.daw-choice.selected {
  border-color: rgba(244, 247, 245, 0.72);
  background: rgba(244, 247, 245, 0.11);
  color: var(--ink);
}

.daw-label.fl {
  border-color: rgba(236, 105, 79, 0.28);
  background: rgba(236, 105, 79, 0.1);
  color: #ffad9b;
}

.daw-label.fl.selected {
  border-color: rgba(255, 173, 155, 0.72);
  background: rgba(236, 105, 79, 0.18);
  color: #ffd3c9;
}

.daw-label.logic {
  border-color: rgba(183, 152, 255, 0.28);
  background: rgba(183, 152, 255, 0.1);
  color: #ccb8ff;
}

.daw-label.logic.selected {
  border-color: rgba(204, 184, 255, 0.72);
  background: rgba(183, 152, 255, 0.18);
  color: #eee7ff;
}

.cart-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.cart-add {
  min-width: 126px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border: 1px solid rgba(236, 105, 79, 0.86);
  border-radius: 8px;
  background: var(--coral);
  color: #fff;
  box-shadow: 0 12px 28px rgba(236, 105, 79, 0.22);
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.cart-add strong {
  color: inherit;
  font-size: 13px;
  font-weight: 900;
}

.cart-add:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
  box-shadow: 0 14px 32px rgba(236, 105, 79, 0.28);
  transform: translateY(-1px);
}

.cart-add.added {
  border-color: rgba(41, 211, 189, 0.72);
  background: var(--teal-dark);
  box-shadow: 0 12px 28px rgba(41, 211, 189, 0.18);
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: end;
  background: rgba(0, 0, 0, 0.58);
  z-index: 10;
  backdrop-filter: blur(8px);
}

.drawer.open {
  display: flex;
}

.drawer-panel {
  width: min(540px, 100%);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto auto;
  gap: 16px;
  padding: 22px;
  border-left: 1px solid var(--line);
  background: #0d1417;
  box-shadow: var(--shadow);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.icon-button {
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.selection-summary {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(41, 211, 189, 0.2);
  border-radius: 8px;
  background: rgba(41, 211, 189, 0.09);
}

.selection-summary span {
  color: var(--teal);
  font-size: 20px;
  font-weight: 900;
}

.selection-summary small,
.cart-item span {
  color: var(--muted);
}

.cart-list {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.cart-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.cart-item span {
  font-size: 12px;
}

.cart-item button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a1012;
  color: var(--ink);
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
}

.drawer-actions button {
  min-height: 42px;
  font-weight: 850;
}

.drawer-actions .primary {
  border-color: rgba(41, 211, 189, 0.62);
  background: var(--teal-dark);
  color: #fff;
}

.drawer-actions .danger {
  border-color: rgba(236, 105, 79, 0.32);
  color: #ffad9b;
}

.submit-note {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 1020px) {
  .control-band {
    grid-template-columns: 1fr 1fr;
  }

  .search-wrap,
  .stats {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .result-row {
    grid-template-columns: 1fr;
  }

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

  .daw-list,
  .cart-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: center;
    min-height: 78px;
  }

  .brand-mark {
    display: none;
  }

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

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

  .cart-add {
    width: 100%;
  }
}
