:root {
  --bg: #f8f7ff;
  --surface: #ffffff;
  --surface-soft: #f3efff;
  --text: #111322;
  --muted: #6d7285;
  --line: #e7e2fb;
  --primary: #5b21e8;
  --primary-2: #7c3aed;
  --green: #dff8e7;
  --green-text: #178348;
  --dark: #101729;
  --shadow: 0 22px 55px rgba(51, 34, 116, .10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 36%, #fff 100%);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 82px;
  display: grid;
  grid-template-columns: 250px 1fr auto;
  gap: 24px;
  align-items: center;
}

.logo {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 28px rgba(91, 33, 232, .24);
}

.logo strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.logo small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  font-weight: 700;
}

.main-nav a {
  color: #202234;
}

.main-nav .active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.search-button {
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  box-shadow: 0 14px 28px rgba(91, 33, 232, .22);
}

.btn-outline {
  border-color: #bca9ff;
  color: var(--primary);
  background: #fff;
}

.btn-soft {
  color: var(--primary);
  background: #f1edff;
}

.btn-wide {
  width: 100%;
}

.page {
  padding: 24px 0 0;
}

.layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 24px;
  align-items: start;
}

.sidebar {
  display: grid;
  gap: 24px;
  position: sticky;
  top: 106px;
}

.panel,
.seller-mini,
.hero,
.stats,
.product-card,
.benefits,
.how,
.footer {
  border: 1px solid var(--line);
}

.panel,
.seller-mini {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.panel-head h2 {
  margin: 0;
  font-size: 26px;
}

.panel-head a {
  color: var(--primary);
  font-weight: 800;
}

.filters {
  display: grid;
  gap: 24px;
}

.field span,
.filter-group h3 {
  display: block;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 900;
}

.input-with-icon {
  display: flex;
  overflow: hidden;
  border: 1px solid #dcd5fb;
  border-radius: 12px;
  background: #fff;
}

.input-with-icon input {
  flex: 1;
  border: 0;
}

.input-with-icon button {
  width: 46px;
  border: 0;
  background: #fff;
  color: var(--primary);
  font-size: 24px;
  cursor: pointer;
}

input,
select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #dcd5fb;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.check-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  margin-bottom: 10px;
  font-weight: 700;
}

.check-row.plain {
  grid-template-columns: 22px 1fr;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.mp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 7px;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.mp-wb {
  background: linear-gradient(135deg, #9d1aa5, #7422ce);
}

.mp-ozon {
  background: linear-gradient(135deg, #0074ff, #0050d9);
}

.mp-ym {
  background: linear-gradient(135deg, #ffbf00, #ff6500);
  color: #111;
}

.mp-mm {
  background: linear-gradient(135deg, #6e36e8, #9d4edd);
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.seller-mini {
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(124,58,237,.20), transparent 38%),
    #fff;
}

.seller-mini h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.seller-mini ul {
  padding: 0;
  margin: 0 0 20px;
  list-style: none;
  display: grid;
  gap: 12px;
  color: #34364b;
}

.seller-mini li::before {
  content: "✓";
  margin-right: 10px;
  color: var(--primary);
  font-weight: 900;
}

.mini-screen {
  height: 116px;
  margin: 24px -24px -24px;
  background:
    linear-gradient(135deg, rgba(91,33,232,.20), rgba(255,255,255,.6)),
    repeating-linear-gradient(0deg, rgba(91,33,232,.12) 0 2px, transparent 2px 28px);
}

.content {
  display: grid;
  gap: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  min-height: 390px;
  padding: 48px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 20%, rgba(124,58,237,.24), transparent 30%),
    linear-gradient(135deg, #fff 0%, #f3efff 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 22px;
  max-width: 720px;
  font-size: clamp(38px, 4.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.hero h1 span {
  display: block;
  color: var(--primary);
}

.hero p {
  margin: 0;
  max-width: 620px;
  color: #35394d;
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-visual {
  position: relative;
  min-height: 290px;
}

.tablet {
  position: absolute;
  right: 60px;
  top: 28px;
  width: 420px;
  height: 245px;
  padding: 24px;
  transform: rotate(-4deg);
  border-radius: 24px;
  background: #fff;
  border-top: 18px solid var(--primary);
  box-shadow: 0 30px 70px rgba(49, 22, 134, .24);
}

.tablet-top {
  height: 42px;
  border-radius: 12px;
  background: #f1edff;
  margin-bottom: 20px;
}

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

.tablet-card {
  height: 108px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(124,58,237,.11), rgba(124,58,237,.02)),
    #fff;
  border: 1px solid #eadfff;
}

.market-badges {
  position: absolute;
  right: 0;
  top: 32px;
  display: grid;
  gap: 16px;
  z-index: 3;
}

.bag {
  position: absolute;
  right: 30px;
  bottom: 12px;
  width: 120px;
  height: 120px;
  border-radius: 28px 28px 18px 18px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  box-shadow: 0 20px 42px rgba(91, 33, 232, .28);
}

.bag::before {
  content: "";
  position: absolute;
  left: 33px;
  top: -34px;
  width: 54px;
  height: 54px;
  border: 10px solid #6d28d9;
  border-bottom: 0;
  border-radius: 40px 40px 0 0;
}

.plant {
  position: absolute;
  right: 0;
  bottom: 4px;
  width: 44px;
  height: 100px;
  background: linear-gradient(180deg, #2fb56f, #157245);
  clip-path: polygon(50% 0, 72% 26%, 55% 31%, 88% 60%, 60% 58%, 72% 100%, 50% 75%, 28% 100%, 40% 58%, 12% 60%, 45% 31%, 28% 26%);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.stat {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 14px;
  padding: 26px;
  align-items: center;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: var(--primary);
  background: #f0ebff;
  font-size: 24px;
}

.stat b {
  font-size: 28px;
  line-height: 1;
}

.stat small {
  color: var(--muted);
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
}

.section-head h2,
.how h2 {
  margin: 0;
  font-size: 30px;
}

.sort {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.sort select {
  width: 180px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.product-card {
  position: relative;
  min-height: 398px;
  padding: 18px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.product-mp {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
}

.favorite {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #8e87b6;
  font-size: 26px;
  cursor: pointer;
}

.product-img {
  height: 188px;
  margin: -2px 0 16px;
  border-radius: 16px;
  background:
    radial-gradient(circle at center, rgba(124,58,237,.08), transparent 58%),
    #fbfbff;
  position: relative;
}

.product-img::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 84px;
  border-radius: 22px;
  background: #ddd;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
}

.product-img-1::after {
  width: 148px;
  height: 64px;
  border-radius: 50px;
  background: linear-gradient(135deg, #ececf2, #aeb1bf);
}

.product-img-2::after {
  width: 86px;
  height: 128px;
  border-radius: 34px 34px 18px 18px;
  background: linear-gradient(135deg, #ffe0d7, #f1a5a5);
}

.product-img-3::after {
  width: 118px;
  height: 118px;
  border-radius: 60px;
  border: 20px solid #1c2130;
  background: transparent;
}

.product-img-4::after {
  width: 130px;
  height: 132px;
  border-radius: 34px;
  background: linear-gradient(135deg, #ead8c7, #d2ac8d);
}

.product-img-5::after {
  width: 98px;
  height: 124px;
  border-radius: 26px;
  background: linear-gradient(135deg, #161b2d, #4f566b);
}

.product-img-6::after {
  width: 138px;
  height: 96px;
  border-radius: 10px;
  background: linear-gradient(135deg, #161b2d, #ff7a18);
}

.product-img-7::after {
  width: 140px;
  height: 112px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f7c9c2, #f5eee9);
}

.product-img-8::after {
  width: 128px;
  height: 32px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fafafa, #b6b6bd);
}

.product-card h3 {
  min-height: 46px;
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.35;
}

.old-price {
  color: #8990a6;
  text-decoration: line-through;
  margin-bottom: 4px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.price-row b {
  font-size: 22px;
}

.price-row span {
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--green-text);
  background: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.btn-card {
  width: 100%;
  min-height: 44px;
  color: var(--primary);
  background: #fff;
  border-color: #c7b7ff;
}

.btn-all-products {
  width: 100%;
  min-height: 58px;
  margin-top: 20px;
  font-size: 18px;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.benefit {
  display: grid;
  grid-template-columns: 58px 1fr;
  column-gap: 16px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.benefit:last-child {
  border-right: 0;
}

.benefit span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: var(--primary);
  background: #f0ebff;
  font-size: 26px;
}

.benefit h3 {
  margin: 0 0 6px;
}

.benefit p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.how {
  padding: 34px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.step {
  position: relative;
  padding: 28px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #faf8ff);
  border: 1px solid var(--line);
}

.step b {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
}

.step h3 {
  margin: 18px 0 10px;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.footer {
  margin-top: 40px;
  background: var(--dark);
  color: #fff;
  border: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 42px;
  padding: 46px 0;
}

.footer-logo small {
  color: #aeb8cf;
}

.footer p {
  max-width: 360px;
  color: #b7c0d5;
  line-height: 1.6;
}

.footer h3 {
  margin: 0 0 18px;
}

.footer a:not(.logo) {
  display: block;
  color: #c9d1e3;
  margin-bottom: 12px;
}

.page-simple {
  padding-top: 34px;
}

.page-simple h1 {
  margin: 0 0 24px;
  font-size: 38px;
}

.messages {
  margin: 18px 0;
}

.message {
  padding: 14px 16px;
  border: 1px solid #9be7b3;
  border-radius: var(--radius-sm);
  background: #ecfdf3;
  color: #145c32;
  font-weight: 700;
}

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #fbfbff;
}

.card-body {
  padding: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #fff;
  border-radius: 8px;
  background: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.product-img.has-image::after {
  content: none;
}

.product-img img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.product-card .product-mp {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.empty-state {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed #c7b7ff;
  border-radius: var(--radius-md);
  background: #fff;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.detail {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 32px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-img {
  width: 100%;
  border-radius: var(--radius-md);
}

.form-card {
  max-width: 760px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow);
}

.form-card p {
  margin: 0 0 16px;
}

.form-card label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1px solid #dcd5fb;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow);
}

.table th,
.table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.table th {
  background: #f3efff;
}

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

.actions a,
.link-danger {
  color: var(--primary);
  font-weight: 900;
}

.link-danger {
  color: #dc2626;
}

@media (max-width: 1200px) {
  .header-inner {
    grid-template-columns: 1fr;
  }

  .main-nav,
  .header-actions {
    justify-content: flex-start;
  }

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

  .sidebar {
    position: static;
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .hero-visual {
    display: none;
  }
}

@media (max-width: 820px) {
  .container {
    width: min(100% - 28px, 1500px);
  }

  .main-nav {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 18px;
    padding-bottom: 4px;
  }

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

  .search-button {
    display: none;
  }

  .filters,
  .stats,
  .products-grid,
  .benefits,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .detail {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 28px;
    min-height: auto;
  }

  .hero h1 {
    font-size: 36px;
  }

  .stat,
  .benefit {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child,
  .benefit:last-child {
    border-bottom: 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .sort,
  .sort select {
    width: 100%;
  }
}
