.market-page {
  padding: 42px 15px 92px;
  background: radial-gradient(circle at 100% 3%, #edf5ff 0, transparent 26%), #f8faff;
}

.market-head {
  position: relative;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.market-head h1 { margin: 0; font-size: 20px; }
.market-head .mini { top: 3px; right: 0; }

.market-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin: 7px 0 14px; }
.market-search {
  height: 48px; display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 0 13px; border: 1px solid #dce5f1; border-radius: 15px; background: #fff;
}
.market-search img { width: 20px; }
.market-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: #334155; background: none; font-size: 12px; }
.market-search button { width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; color: #728198; background: #eef3f9; font-size: 17px; line-height: 25px; }
.order-entry { height: 48px; padding: 0 14px; border: 1px solid #dce5f1; border-radius: 15px; color: #172033; background: #fff; font-weight: 700; }
.order-entry span { margin-right: 4px; color: #64748b; font-size: 18px; vertical-align: -2px; }

.market-cats { display: flex; flex-wrap: wrap; gap: 9px; overflow: visible; margin: 0 -1px 14px; padding: 0 1px 2px; }
.market-cats::-webkit-scrollbar { display: none; }
.market-cats button, .market-cats a { flex: 0 0 auto; max-width: 100%; min-height: 36px; padding: 8px 14px; border: 1px solid #e0e7f0; border-radius: 18px; color: #20293a; background: #fff; white-space: normal; line-height: 1.3; font-size: 11px; text-decoration: none; }
.market-cats button.active, .market-cats a.active { border-color: #1673f9; color: #fff; background: linear-gradient(135deg, #2380ff, #0865ee); box-shadow: 0 7px 15px #1673f92c; font-weight: 700; }

.market-banner { position: relative; min-height: 180px; overflow: hidden; padding: 22px 19px; border-radius: 16px; color: #fff; background: linear-gradient(130deg, #1775f6 0%, #3691ff 55%, #9bc9ff 100%); box-shadow: 0 12px 30px #146cf129; }
.market-banner-copy { position: relative; z-index: 3; }
.market-banner-copy > small { display: inline-block; padding: 6px 10px; border-radius: 13px; background: #ffffff17; }
.market-banner h2 { margin: 13px 0 3px; font-size: 25px; letter-spacing: .5px; }
.market-banner h3 { margin: 0; font-size: 18px; }
.market-banner footer { display: flex; gap: 8px; margin-top: 17px; }
.market-banner footer span { padding: 5px 8px; border-radius: 12px; background: #ffffff18; font-size: 9px; }
.banner-telegram { position: absolute; z-index: 2; right: 24px; top: 37px; width: 94px; height: 94px; display: grid; place-items: center; border: 1px solid #ffffff8c; border-radius: 50%; background: linear-gradient(145deg, #59c4ff, #0873ef 68%, #0b5bd3); box-shadow: 0 18px 20px #0752bd55, inset 8px 8px 18px #ffffff30; }
.banner-telegram img { width: 69px; filter: brightness(0) invert(1); transform: rotate(-5deg); }
.banner-cloud { position: absolute; border-radius: 50%; background: #ffffff1d; }
.cloud-a { width: 140px; height: 140px; right: -58px; top: -50px; }
.cloud-b { width: 180px; height: 70px; right: -25px; bottom: -31px; border-radius: 50% 50% 0 0; }

.market-section-title { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 10px; }
.market-section-title h2 { margin: 0; font-size: 16px; }
.market-section-title button { border: 0; color: #7a879a; background: none; font-size: 10px; }
.market-section-title > span { color: #7a879a; font-size: 10px; }
.market-products { display: grid; gap: 7px; }
.market-product { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 15px; }
.market-product > img { width: 54px; height: 54px; }
.market-product-info { min-width: 0; }
.market-product-info > b, .market-product-info > small, .market-product-info > span { display: block; }
.market-product-info > b { margin-bottom: 4px; font-size: 14px; }
.market-product-info > small { margin-top: 5px; color: #8490a3; font-size: 10px; }
.market-product-info .tag { width: fit-content; max-width: 100%; overflow: hidden; padding: 3px 6px; border-radius: 4px; color: #1471f5; background: #edf4ff; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.market-product-info .tag-1002 { color: #13a763; background: #e9faf1; }
.market-product-info .tag-1003, .market-product-info .tag-1004 { color: #684ee9; background: #f0edff; }
.market-product-info .tag-1005 { color: #f07713; background: #fff2e5; }
.market-buy { text-align: right; }
.market-buy strong { display: block; margin-bottom: 8px; color: #1374f5; font-size: 15px; }
.market-buy strong small { font-size: 9px; }
.market-buy button, .market-buy a { display: inline-block; padding: 8px 12px; border: 0; border-radius: 17px; color: #fff; background: linear-gradient(135deg, #2380ff, #0865ee); box-shadow: 0 7px 14px #1673f933; font-size: 10px; text-decoration: none; }
.product-row { color: inherit; text-decoration: none; }
.market-empty { padding: 32px; color: #8995a6; text-align: center; }
.market-empty b { display: block; color: #445269; font-size: 14px; }.market-empty p { margin: 8px 0 16px; font-size: 11px; }.market-empty button { padding: 8px 18px; border: 0; border-radius: 16px; color: #1268f4; background: #e9f3ff; font-size: 11px; }

.market-assurance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 12px; padding: 12px 9px; border-radius: 15px; }
.market-assurance > div { min-width: 0; display: flex; align-items: center; gap: 6px; }
.market-assurance img { width: 27px; height: 27px; flex: 0 0 auto; }
.market-assurance span { min-width: 0; }
.market-assurance b, .market-assurance small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-assurance b { font-size: 9px; }
.market-assurance small { margin-top: 2px; color: #8b96a7; font-size: 6px; }

@media (max-width: 390px) {
  .market-banner { min-height: 172px; padding-left: 16px; }
  .market-banner h2 { font-size: 22px; }
  .banner-telegram { right: 13px; width: 82px; height: 82px; }
  .banner-telegram img { width: 60px; }
  .market-product { grid-template-columns: 49px minmax(0, 1fr) auto; gap: 8px; padding-left: 9px; padding-right: 9px; }
  .market-product > img { width: 49px; height: 49px; }
  .market-buy button { padding-left: 10px; padding-right: 10px; }
  .market-assurance { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
