:root {
  color-scheme: light;
  --bg: #f4f7ff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-soft: rgba(247, 249, 255, 0.78);
  --surface-cool: #edf4ff;
  --text: #0b1020;
  --muted: #5f6b84;
  --muted-2: #92a0b8;
  --line: rgba(116, 135, 172, 0.22);
  --line-strong: rgba(75, 91, 132, 0.34);
  --accent: #5f7cff;
  --accent-strong: #284bff;
  --accent-soft: rgba(95, 124, 255, 0.14);
  --violet: #7c3cff;
  --cyan: #00bde8;
  --blue: #246bfe;
  --green: #12a66a;
  --red: #ef4444;
  --orange: #f59e0b;
  --shadow: 0 18px 55px rgba(23, 35, 68, 0.12);
  --shadow-soft: 0 8px 28px rgba(37, 74, 160, 0.1);
  --header-height: 78px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fbfcff 0%, #f3f7ff 38%, #f9fbff 100%);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

body::before,
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(1200px 560px at 50% -120px, rgba(108, 139, 255, 0.28), transparent 68%),
    radial-gradient(820px 420px at 96% 12%, rgba(0, 189, 232, 0.18), transparent 72%),
    radial-gradient(900px 520px at 4% 38%, rgba(124, 60, 255, 0.12), transparent 72%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(238, 245, 255, 0.72));
}

body::after {
  opacity: 0.46;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255, 255, 255, 0.58) 28%, transparent 42%),
    linear-gradient(rgba(39, 78, 170, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 78, 170, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 76px 76px, 76px 76px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.84) 58%, transparent 100%);
}

body[data-telegram-mini-app="true"] {
  min-height: var(--tg-viewport-stable-height, 100vh);
  padding-bottom: env(safe-area-inset-bottom);
}

body.drawer-open,
body.cart-open,
body.detail-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto auto minmax(420px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: var(--header-height);
  padding: 12px clamp(14px, 3.4vw, 36px);
  background: rgba(250, 252, 255, 0.82);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(24, 39, 75, 0.08);
  backdrop-filter: blur(22px) saturate(150%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 52px;
  padding: 4px 8px 4px 6px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(95, 124, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(24, 39, 75, 0.06);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(138px, 13vw, 166px);
  height: 38px;
  max-width: none;
  padding: 3px 7px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(12, 18, 34, 0.06);
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
  filter: contrast(1.08) saturate(0.92);
  mix-blend-mode: normal;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 13px;
  line-height: 1.1;
}

.brand small {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-trigger,
.primary-button,
.secondary-button,
.ghost-button,
.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.catalog-trigger {
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line-strong);
}

.catalog-trigger:hover,
.catalog-trigger:focus-visible {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: 0;
}

.search-hub {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.search-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-width: 164px;
  padding: 4px;
  background: rgba(236, 243, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-tabs button {
  min-height: 38px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.search-tabs button[aria-selected="true"] {
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: 0 5px 18px rgba(37, 74, 160, 0.12);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 2px solid rgba(95, 124, 255, 0.7);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(37, 74, 160, 0.08);
}

.header-search:focus-within {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 12px 32px rgba(37, 74, 160, 0.14);
}

.header-search svg,
.circle-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.header-search svg {
  color: var(--muted);
  flex: 0 0 auto;
}

.header-search input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.circle-action {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}

.circle-action.compact {
  width: 38px;
  height: 38px;
  min-height: 38px;
}

.circle-action:hover,
.circle-action:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  border-color: transparent;
  outline: 0;
}

.circle-action span {
  position: absolute;
  right: -3px;
  top: -4px;
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  color: #111;
  background: linear-gradient(135deg, #9bf0ff, #7c8cff);
  border: 1px solid #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.mega-menu {
  position: fixed;
  top: calc(var(--header-height) + 8px);
  right: clamp(12px, 3vw, 36px);
  left: clamp(12px, 3vw, 36px);
  z-index: 45;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background: rgba(250, 252, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(145%);
}

.mega-menu[hidden] {
  display: none;
}

.mega-menu span,
.section-heading span,
.catalog-toolbar span,
.filter-head span,
.panel-head span,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.mega-menu strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.05;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.mega-grid a {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.mega-grid a:hover {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

main {
  display: grid;
  gap: 28px;
  width: min(1280px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 24px clamp(12px, 4vw, 36px) 96px;
}

main > * {
  min-width: 0;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 18px;
}

.hero-copy,
.hero-stack div,
.audience-panel,
.top-filter-section,
.quick-views-section,
.category-tile,
.ai-search-section,
.product-card,
.filter-panel,
.detail-view,
.support-section,
.profile-section,
.agents-section,
.benefit-grid article,
.faq-section details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(130%);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 270px;
  padding: clamp(22px, 5vw, 44px);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.78)),
    radial-gradient(720px 320px at 82% 0%, rgba(95, 124, 255, 0.18), transparent 70%),
    radial-gradient(580px 300px at 6% 100%, rgba(0, 189, 232, 0.12), transparent 72%);
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: clamp(12px, 5vw, 42px);
  bottom: clamp(10px, 4vw, 34px);
  width: min(280px, 42vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(95, 124, 255, 0.7), transparent);
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.hero-actions,
.detail-actions,
.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-stack {
  display: grid;
  gap: 10px;
}

.hero-stack div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 82px;
  padding: 18px;
}

.hero-stack strong {
  font-size: 28px;
  line-height: 1;
}

.hero-stack span {
  color: var(--muted);
  font-size: 13px;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--violet));
  border: 1px solid rgba(40, 75, 255, 0.26);
  box-shadow: 0 12px 28px rgba(40, 75, 255, 0.22);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: linear-gradient(135deg, #183fff, #6827e8);
  border-color: rgba(104, 39, 232, 0.42);
  box-shadow: 0 16px 34px rgba(40, 75, 255, 0.28);
  outline: 0;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.secondary-button,
.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-strong);
}

.secondary-button:hover,
.secondary-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: 0;
}

.full {
  width: 100%;
}

.audience-panel {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: rgba(236, 243, 255, 0.74);
  border-radius: 8px;
}

.segmented-control button {
  min-height: 38px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
}

.segmented-control button[aria-selected="true"] {
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: 0 5px 18px rgba(37, 74, 160, 0.12);
}

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

.top-filter-section {
  display: grid;
  gap: 12px;
  padding: 12px;
  scroll-margin-top: calc(var(--header-height) + 14px);
}

.filter-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.filter-heading h2 {
  margin: 3px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.filter-heading p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.top-filter-panel {
  grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(180px, 1.15fr) repeat(2, minmax(120px, 0.8fr));
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

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

.quick-views-section {
  padding: 16px;
}

.quick-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.quick-view-grid a {
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 12px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.quick-view-grid a:hover,
.quick-view-grid a:focus-visible {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: 0;
}

body[data-page="support"] main > section:not(#support),
body[data-page="profile"] main > section:not(#profile) {
  display: none;
}

body[data-page="home"] #support,
body[data-page="home"] #profile {
  display: none;
}

body[data-page="support"] #support,
body[data-page="profile"] #profile {
  min-height: calc(100vh - var(--header-height) - 140px);
}

.section-heading,
.catalog-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading h2,
.catalog-toolbar h2,
.filter-head h2,
.panel-head h2 {
  margin: 3px 0 0;
  font-size: 26px;
  line-height: 1.1;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 102px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.category-tile:hover,
.category-tile:focus-visible,
.category-tile[data-active="true"] {
  border-color: var(--accent-strong);
  box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft);
  outline: 0;
  transform: translateY(-2px);
}

.category-tile span:first-child {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 189, 232, 0.18);
  font-size: 11px;
  font-weight: 800;
}

.category-tile strong {
  display: block;
  min-height: 34px;
  font-size: 15px;
  line-height: 1.15;
}

.category-tile small {
  color: var(--muted);
  font-size: 12px;
}

.ai-search-section,
.support-section,
.profile-section,
.agents-section {
  padding: 16px;
}

.ai-layout,
.support-layout,
.profile-layout,
.seller-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.ai-form,
.order-form,
.chat-form,
.seller-form {
  display: grid;
  gap: 12px;
}

.ai-form label,
.filter-panel label,
.catalog-toolbar label,
.order-form label,
.payment-methods legend,
.chat-form label,
.seller-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-row,
.price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
}

textarea {
  min-height: 96px;
  padding-top: 10px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.ai-results {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ai-loading,
.empty-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.progress-line {
  overflow: hidden;
  height: 8px;
  background: #e7eeff;
  border-radius: 999px;
}

.progress-line i {
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: inherit;
  animation: scan 1s ease-in-out infinite alternate;
}

.ai-result-grid,
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.source-card,
.agent-card,
.cart-item,
.profile-card,
.support-faq article {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-card[data-best="true"] {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.source-meta,
.source-price-row,
.cart-line,
.agent-meta,
.profile-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.source-price-row strong,
.cart-summary strong {
  color: var(--text);
  font-size: 20px;
}

.source-breakdown {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.source-breakdown span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.rail-grid,
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.product-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.product-card:hover,
.product-card:focus-within {
  border-color: rgba(95, 124, 255, 0.46);
  box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft);
  transform: translateY(-2px);
}

.product-visual {
  position: relative;
  display: block;
  aspect-ratio: 1.22 / 1;
  overflow: hidden;
  border-radius: 12px;
}

.visual-tile {
  --visual-a: #5f7cff;
  --visual-b: #00bde8;
  --visual-c: #f7fbff;
  --visual-ink: #ffffff;
  isolation: isolate;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(237, 243, 255, 0.46)),
    radial-gradient(180px 130px at 18% 18%, color-mix(in srgb, var(--visual-a), transparent 52%), transparent 72%),
    radial-gradient(220px 160px at 96% 10%, color-mix(in srgb, var(--visual-b), transparent 42%), transparent 74%),
    linear-gradient(135deg, color-mix(in srgb, var(--visual-c), #fff 66%), #edf3ff 58%, color-mix(in srgb, var(--visual-a), #fff 88%));
  border: 1px solid rgba(111, 130, 174, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 30px rgba(37, 74, 160, 0.08);
}

.visual-tile::before,
.visual-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.visual-tile::before {
  z-index: 0;
  background:
    linear-gradient(115deg, transparent 0 24%, rgba(255, 255, 255, 0.7) 42%, transparent 58%),
    repeating-linear-gradient(90deg, rgba(11, 16, 32, 0.08) 0 1px, transparent 1px 14px),
    linear-gradient(rgba(11, 16, 32, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 16, 32, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
  opacity: 0.42;
}

.visual-tile::after {
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: inherit;
  box-shadow: inset 0 -28px 54px rgba(12, 18, 34, 0.05);
}

.visual-rim,
.visual-sheen {
  pointer-events: none;
  position: absolute;
  z-index: 1;
  display: block;
}

.visual-rim {
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 16px;
  opacity: 0.66;
  transform: rotate(-2deg);
}

.visual-sheen {
  right: -22%;
  bottom: -52%;
  width: 72%;
  height: 80%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.64), transparent 62%);
  border-radius: 999px;
  transform: rotate(-24deg);
}

.visual-mark {
  position: absolute;
  right: 16px;
  top: 18px;
  z-index: 2;
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  color: var(--visual-ink);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.28), transparent 38%),
    linear-gradient(145deg, color-mix(in srgb, var(--visual-a), #0b1020 10%), color-mix(in srgb, var(--visual-b), #0b1020 28%));
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 24px;
  box-shadow: 0 20px 42px color-mix(in srgb, var(--visual-a), transparent 72%), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transform: rotate(-2deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.visual-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
}

.product-card:hover .visual-mark,
.product-card:focus-within .visual-mark {
  box-shadow: 0 24px 48px color-mix(in srgb, var(--visual-a), transparent 64%), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: translateY(-4px) rotate(-2deg) scale(1.04);
}

.visual-mark img {
  position: relative;
  z-index: 1;
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.18));
}

.visual-initials {
  position: relative;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.visual-bg-word {
  position: absolute;
  right: 8px;
  bottom: -14px;
  z-index: 1;
  max-width: 72%;
  overflow: hidden;
  color: rgba(11, 16, 32, 0.055);
  font-size: clamp(58px, 7vw, 86px);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: 0;
  white-space: nowrap;
}

.visual-copy {
  position: absolute;
  right: 84px;
  bottom: 14px;
  left: 14px;
  z-index: 3;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.visual-copy span {
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  overflow: hidden;
  color: rgba(11, 16, 32, 0.64);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(37, 74, 160, 0.08);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.visual-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(11, 16, 32, 0.88);
  font-size: 19px;
  font-weight: 900;
  line-height: 0.98;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-visual small {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 104px);
  padding: 5px 8px;
  overflow: hidden;
  color: rgba(11, 16, 32, 0.7);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(37, 74, 160, 0.08);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tone-audio {
  --visual-a: #19c56f;
  --visual-b: #0f7a4e;
  --visual-c: #eafff3;
}

.tone-apple {
  --visual-a: #ff315d;
  --visual-b: #7c3cff;
  --visual-c: #fff0f6;
}

.tone-sound {
  --visual-a: #ff6a00;
  --visual-b: #ffb000;
  --visual-c: #fff3e8;
}

.tone-gift {
  --visual-a: #111827;
  --visual-b: #ff4465;
  --visual-c: #f3f5f9;
}

.tone-cinema {
  --visual-a: #ef233c;
  --visual-b: #151924;
  --visual-c: #fff1f3;
}

.tone-ai {
  --visual-a: #10b981;
  --visual-b: #5f7cff;
  --visual-c: #ecfdf8;
}

.tone-telegram {
  --visual-a: #2da8ff;
  --visual-b: #7467ff;
  --visual-c: #eff8ff;
}

.tone-game {
  --visual-a: #8b5cf6;
  --visual-b: #00bde8;
  --visual-c: #f4f1ff;
}

.tone-service,
.tone-studio {
  --visual-a: #284bff;
  --visual-b: #00bde8;
  --visual-c: #eef4ff;
}

.tone-fashion {
  --visual-a: #111827;
  --visual-b: #b99b5d;
  --visual-c: #f8f6f1;
}

.tone-perfume {
  --visual-a: #b56cff;
  --visual-b: #ff8dc7;
  --visual-c: #fff4fb;
}

.tone-auto {
  --visual-a: #263244;
  --visual-b: #00bde8;
  --visual-c: #edf4f7;
}

.tone-accessory,
.tone-plug,
.tone-market {
  --visual-a: #5f7cff;
  --visual-b: #111827;
  --visual-c: #f5f7ff;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  color: var(--muted);
  background: rgba(237, 244, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
}

.badge.plug,
.badge.best {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--violet));
  border-color: rgba(40, 75, 255, 0.18);
  font-weight: 800;
}

.badge.green {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}

.badge.blue {
  color: #175cd3;
  background: #eff8ff;
  border-color: #b2ddff;
}

.product-card h3 {
  min-height: 42px;
  margin: 0;
  font-size: 17px;
  line-height: 1.22;
}

.product-description {
  display: -webkit-box;
  min-height: 40px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-meta,
.seller-row,
.stock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.product-meta span:first-child {
  display: none;
}

.seller-row span:first-child {
  color: var(--text);
  font-weight: 700;
}

.stock-row span:first-child {
  color: var(--green);
}

.price-line {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
}

.price-line strong {
  font-size: 22px;
  line-height: 1;
}

.price-line span {
  color: var(--muted);
  font-size: 12px;
}

.card-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-action {
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line-strong);
  font-size: 13px;
}

.card-action.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--violet));
  border-color: rgba(40, 75, 255, 0.18);
}

.card-action:hover,
.card-action:focus-visible {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: 0;
}

.card-action.primary:hover,
.card-action.primary:focus-visible {
  background: linear-gradient(135deg, #183fff, #6827e8);
  border-color: rgba(104, 39, 232, 0.38);
}

.catalog-layout {
  display: block;
  scroll-margin-top: calc(var(--header-height) + 14px);
}

.catalog-section {
  min-width: 0;
}

.catalog-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.catalog-toolbar label {
  min-width: 200px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 126px repeat(5, minmax(130px, 1fr)) auto auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
}

.filter-head {
  align-self: center;
}

.toggle-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 10px;
  color: var(--text) !important;
  background: rgba(237, 244, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toggle-line input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent-strong);
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  padding: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
}

.empty-state strong {
  color: var(--text);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.detail-view {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: start;
  overflow-y: auto;
  padding: clamp(12px, 3vw, 30px);
  background: rgba(9, 16, 32, 0.42);
  backdrop-filter: blur(16px) saturate(140%);
}

.detail-view[hidden] {
  display: none;
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(0, 1.24fr);
  gap: 18px;
  width: min(1180px, 100%);
  margin: 24px auto 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.detail-visual {
  position: relative;
  display: grid;
  min-height: 340px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
}

.detail-visual .visual-rim {
  inset: 24px;
  border-radius: 30px;
}

.detail-visual .visual-mark {
  position: relative;
  inset: auto;
  width: 132px;
  height: 132px;
  border-radius: 38px;
  transform: none;
}

.detail-visual .visual-mark img,
.detail-visual .visual-initials {
  width: 82px;
  height: 82px;
}

.detail-visual .visual-initials {
  display: grid;
  place-items: center;
  font-size: 36px;
  font-weight: 800;
}

.detail-content {
  display: grid;
  gap: 14px;
  align-content: start;
}

.detail-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

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

.detail-grid,
.supplier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-spec {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.plan-options {
  display: grid;
  gap: 8px;
}

.plan-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  min-height: 50px;
  padding: 10px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.plan-button small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.plan-button:hover,
.plan-button:focus-visible,
.plan-button[data-active="true"] {
  border-color: var(--accent-strong);
  outline: 0;
}

.seller-layout {
  align-items: start;
}

.seller-form,
.seller-result {
  padding: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.seller-result {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  display: grid;
  gap: 10px;
  min-height: 220px;
  align-content: start;
}

.seller-result strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
}

.seller-result span {
  color: var(--muted);
  line-height: 1.55;
}

.support-chat {
  display: grid;
  gap: 10px;
  align-content: start;
}

.chat-feed {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow-y: auto;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chat-message {
  display: grid;
  gap: 4px;
  max-width: 92%;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chat-message[data-role="user"] {
  justify-self: end;
  background: rgba(237, 244, 255, 0.92);
  border-color: rgba(95, 124, 255, 0.3);
}

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

.chat-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.support-faq {
  display: grid;
  gap: 10px;
  align-content: start;
}

.profile-layout {
  grid-template-columns: 220px minmax(0, 1fr);
}

.profile-menu {
  display: grid;
  gap: 6px;
  align-content: start;
}

.profile-menu button {
  min-height: 40px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  font-weight: 700;
}

.profile-menu button[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--violet));
  border-color: rgba(40, 75, 255, 0.18);
}

.profile-content {
  display: grid;
  gap: 10px;
}

.profile-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  border-radius: 50%;
  font-weight: 800;
}

.profile-card h3,
.source-card h3,
.agent-card h3,
.cart-item h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.profile-card p,
.source-card p,
.agent-card p,
.cart-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.status-row {
  display: grid;
  gap: 8px;
}

.status-row span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.agent-card strong {
  color: var(--green);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 24px clamp(12px, 4vw, 36px) 96px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer strong {
  color: var(--text);
  font-size: 22px;
}

.site-footer a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.cart-drawer,
.checkout-drawer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  justify-items: end;
  opacity: 0;
  transition: opacity 160ms ease;
}

.cart-drawer[aria-hidden="false"],
.checkout-drawer[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.48);
}

.drawer-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(450px, 100%);
  height: 100%;
  max-height: 100vh;
  overflow-y: auto;
  padding: 18px;
  color: var(--text);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -14px 0 42px rgba(16, 24, 40, 0.16);
  transform: translateX(18px);
  transition: transform 160ms ease;
}

.cart-drawer[aria-hidden="false"] .drawer-panel,
.checkout-drawer[aria-hidden="false"] .drawer-panel {
  transform: translateX(0);
}

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

.selected-service,
.requirement-box,
.notice,
.order-result,
.cart-summary {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.selected-service {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
}

.selected-service .placeholder {
  grid-column: 1 / -1;
  color: var(--muted);
}

.selected-visual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fff;
  border-radius: 15px;
  font-weight: 800;
}

.selected-visual .visual-rim,
.selected-visual .visual-sheen {
  display: none;
}

.selected-visual .visual-mark {
  position: relative;
  inset: auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  box-shadow: 0 10px 18px color-mix(in srgb, var(--visual-a), transparent 76%);
  transform: none;
}

.selected-visual .visual-mark::after {
  inset: 5px;
  border-radius: 10px;
}

.selected-visual .visual-mark img,
.selected-visual .visual-initials {
  width: 26px;
  height: 26px;
  font-size: 14px;
}

.selected-service strong,
.selected-service span {
  display: block;
}

.selected-service span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.requirement-box,
.notice,
.order-result,
.cart-summary {
  padding: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.payment-methods {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.payment-methods legend {
  margin-bottom: 2px;
}

.payment-methods label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-methods input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-strong);
}

.order-result {
  display: grid;
  gap: 7px;
  color: var(--text);
  border-color: var(--line-strong);
}

.order-result span {
  color: var(--muted);
}

.order-result code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 4px;
  overflow-wrap: anywhere;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.pay-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--violet));
  border: 1px solid rgba(40, 75, 255, 0.18);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.cart-list {
  display: grid;
  gap: 10px;
}

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

.qty-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-weight: 800;
}

.danger-button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--red);
  background: var(--surface);
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 55;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.bottom-nav a,
.bottom-nav button {
  display: grid;
  min-height: 40px;
  place-items: center;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.bottom-nav a:hover,
.bottom-nav button:hover {
  background: var(--bg);
}

.success-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  color: var(--text);
  background: var(--bg);
}

.success-box {
  display: grid;
  gap: 14px;
  width: min(460px, 100%);
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.success-box h1,
.success-box p {
  margin: 0;
}

.success-box p {
  color: var(--muted);
  line-height: 1.5;
}

@keyframes scan {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(125%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: auto auto minmax(240px, 1fr) auto;
  }

  .brand-copy {
    display: none;
  }

  .filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-head {
    grid-column: 1 / -1;
  }

  .mega-menu {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 154px;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .brand-logo {
    width: 142px;
    height: 34px;
    max-width: 48vw;
    padding: 2px 6px;
  }

  .catalog-trigger {
    display: none;
  }

  .search-hub {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    order: 3;
  }

  .search-tabs {
    min-width: 0;
  }

  .header-actions {
    justify-self: end;
  }

  .circle-action {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .mega-menu {
    top: calc(var(--header-height) + 8px);
    max-height: calc(100vh - var(--header-height) - 24px);
    overflow-y: auto;
  }

  main {
    gap: 22px;
    padding: 14px 12px 96px;
  }

  .hero-section,
  .ai-layout,
  .support-layout,
  .profile-layout,
  .seller-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
    padding: 24px 20px 20px;
  }

  .hero-copy h1 {
    font-size: 32px;
    line-height: 1.08;
  }

  .hero-copy p {
    font-size: 15px;
  }

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

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

  .hero-stack div {
    min-height: 74px;
    padding: 12px 8px;
  }

  .hero-stack strong {
    font-size: 18px;
  }

  .hero-stack span {
    font-size: 11px;
  }

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

  .filter-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .section-heading,
  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading h2,
  .catalog-toolbar h2,
  .filter-head h2,
  .panel-head h2 {
    font-size: 23px;
  }

  .catalog-toolbar label {
    min-width: 0;
  }

  .category-grid {
    display: flex;
    gap: 8px;
    margin: 0 -12px;
    padding: 0 12px 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .category-tile {
    flex: 0 0 142px;
    scroll-snap-align: start;
  }

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

  .product-card {
    padding: 9px;
  }

  .product-card h3 {
    min-height: 40px;
    font-size: 14px;
  }

  .product-visual img {
    width: 46px;
    height: 46px;
  }

  .badge {
    font-size: 10px;
  }

  .seller-row,
  .stock-row {
    display: none;
  }

  .price-line strong {
    font-size: 17px;
  }

  .price-line span {
    display: none;
  }

  .card-buttons {
    grid-template-columns: 1fr;
  }

  .card-action {
    min-height: 38px;
    font-size: 12px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .top-filter-panel {
    padding: 0;
  }

  .filter-head {
    display: none;
  }

  .detail-layout,
  .detail-grid,
  .supplier-grid,
  .form-row,
  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    width: 100%;
    margin: 0;
    padding: 12px;
    border-radius: 16px 16px 0 0;
  }

  .detail-visual {
    min-height: 210px;
  }

  .detail-view {
    align-items: end;
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  }

  .detail-content h2 {
    font-size: 26px;
  }

  .seller-result {
    position: static;
    min-height: auto;
  }

  .profile-menu {
    display: flex;
    gap: 8px;
    margin: 0 -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
  }

  .profile-menu button {
    flex: 0 0 auto;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: start;
    flex-direction: column;
    padding: 22px 12px 96px;
  }

  .drawer-panel {
    width: 100%;
    border-left: 0;
  }

  .bottom-nav {
    display: grid;
  }
}

@media (max-width: 460px) {
  .site-header {
    gap: 8px;
    padding: 9px 10px;
  }

  .brand {
    min-height: 44px;
    padding: 3px 5px;
    border-radius: 13px;
  }

  .brand-logo {
    width: 124px;
    height: 31px;
    max-width: 40vw;
    padding: 2px 5px;
    border-radius: 9px;
  }

  .header-actions {
    gap: 6px;
  }

  .circle-action {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .product-visual {
    aspect-ratio: 1.78 / 1;
  }

  .product-visual .visual-rim {
    inset: 10px;
    border-radius: 16px;
  }

  .product-visual .visual-mark {
    width: 64px;
    height: 64px;
    border-radius: 21px;
  }

  .product-visual .visual-mark img,
  .product-visual .visual-initials {
    width: 39px;
    height: 39px;
  }

  .rail-grid,
  .catalog-grid,
  .ai-result-grid,
  .agent-grid {
    grid-template-columns: 1fr;
  }

  .empty-actions,
  .detail-actions,
  .source-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
}
