:root {
  --bg: #ffffff;
  --text: #1f1f1f;
  --muted: #777;
  --line: #ececf1;
  --blue: #009cf0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

.top-header {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: #6b7280;
}

.top-header-inner {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-nav,
.user-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.top-nav a:hover,
.user-nav a:hover {
  color: #111827;
}

.post-btn {
  color: #111827;
  font-weight: 600;
}

.brand-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dot-blue {
  background: #009cf0;
}

.dot-green {
  background: #70c05a;
}

.dot-red {
  background: #ff4053;
}

.dot-cyan {
  background: #8ad9ff;
}

.logo-text {
  margin-left: 4px;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

a.all-cats-btn {
  text-decoration: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.all-cats-btn {
  border: none;
  background: #009cf0;
  color: #fff;
  height: 44px;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

a.region-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.region-btn {
  border: none;
  background: transparent;
  color: #111827;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}

.search-box {
  border: 2px solid #009cf0;
  border-radius: 12px;
  height: 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
}

.search-box input {
  border: none;
  padding: 0 16px;
  font-size: 15px;
  color: #4b5563;
  outline: none;
}

.search-box button {
  width: 94px;
  border: none;
  background: #009cf0;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.category {
  position: relative;
  display: block;
  border-radius: 12px;
  background: #f2f1f0;
  overflow: hidden;
  padding: 10px 14px;
  min-height: 86px;
  border: none;
  color: #000;
  transition: background 0.15s ease;
}

.category:hover {
  background: #ebeae8;
}

.category img {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 1;
  height: 100%;
  width: auto;
  max-width: 58%;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
}

.category span {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 64%;
  padding: 0;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 600;
}

.recommendations {
  margin-top: 26px;
}

.recommendations h2 {
  margin: 0 0 16px;
  font-size: 40px;
  line-height: 1.1;
}

.recommendations-heading-link {
  color: inherit;
  text-decoration: none;
}

.recommendations-heading-link:hover {
  opacity: 0.88;
}

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

.card {
  position: relative;
  border-radius: 16px;
  transition: box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.card-media-wrap {
  display: block;
  color: inherit;
}

.card-media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f2f2f2;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.card-badge-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.95;
}

.card-badge-icon--sm {
  width: 12px;
  height: 12px;
}

.card-badge-num {
  font-variant-numeric: tabular-nums;
}

.card-badge--photos {
  top: 8px;
  left: 8px;
}

.card-badge--delivery {
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
}

.card-body {
  padding-top: 10px;
  padding-right: 2px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.28;
  color: #000;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.56em;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.card-title:hover {
  color: #009cf0;
}

.card-price {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.02em;
}

a.card-price {
  text-decoration: none;
}

a.card-price:hover {
  opacity: 0.9;
}

.card-price--empty {
  font-size: 16px;
  font-weight: 600;
  color: #737373;
  letter-spacing: 0;
}

.card-footer {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
}

.card-location {
  flex: 1;
  color: #8a8a8a;
  font-size: 13px;
  line-height: 1.35;
  min-width: 0;
  text-decoration: none;
}

.card-location:hover {
  color: #666;
}

.card-location:empty {
  display: none;
}

.card-location--placeholder {
  display: none;
}

.card-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.card-action-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #1f1f1f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease;
}

a.card-action-btn {
  text-decoration: none;
  color: inherit;
}

.card-action-btn:hover {
  background: #f0f0f0;
}

.card-action-btn svg {
  width: 20px;
  height: 20px;
}

.right-column {
  padding-top: 2px;
}

.biz-card {
  background: #f7f7f7;
  border-radius: 20px;
  padding: 16px 14px 14px;
  border: none;
}

.biz-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.biz-card-lead {
  margin: 8px 0 14px;
  color: #5c5c5c;
  font-size: 14px;
  line-height: 1.4;
}

.biz-card-brand {
  font-weight: 700;
  color: #1f1f1f;
}

.biz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 8px;
}

.biz-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
}

.biz-item:hover .biz-item-icon {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.biz-item-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  background: #fff;
}

.biz-item-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

.biz-item-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #1f1f1f;
  max-width: 88px;
}

.biz-cta {
  display: block;
  margin-top: 14px;
  width: 100%;
  text-align: center;
  padding: 12px 16px;
  background: #fff;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid #ebebeb;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.biz-cta:hover {
  background: #fafafa;
  border-color: #e0e0e0;
}

.services {
  margin-top: 14px;
  background: #fff;
  border-radius: 0;
  padding: 4px 0 0;
}

.services-title {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #000;
}

.services-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.services-list li {
  border-bottom: 1px solid #ebebeb;
}

.services-list li:last-child {
  border-bottom: none;
}

.service-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  color: inherit;
  transition: opacity 0.12s ease;
  border-radius: 0;
}

.service-row:hover {
  background: transparent;
  opacity: 0.92;
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.service-glyph {
  display: block;
  flex-shrink: 0;
}

.service-icon--delivery {
  background: #ffe14a;
}

.service-icon--autoteka {
  background: #ffd494;
}

.service-icon--travel {
  background: #ddd5ff;
}

.service-icon--help {
  background: #c8f5c5;
}

.service-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 1px;
}

.service-name {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.service-desc {
  font-size: 14px;
  line-height: 1.38;
  color: #757575;
}

.sidebar-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e8e8e8;
}

.sidebar-legal {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.45;
  color: #757575;
}

.sidebar-legal a {
  color: #757575;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar-legal a:hover {
  color: #000;
}

.sidebar-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-footer-links a {
  font-size: 14px;
  font-weight: 400;
  color: #000;
  line-height: 1.25;
}

.sidebar-footer-links a:hover {
  color: #009cf0;
}

@media (max-width: 1270px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .right-column {
    order: -1;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1060px) {
  .categories-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .top-header-inner {
    height: auto;
    padding: 8px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .brand-row {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .right-column {
    grid-template-columns: 1fr;
  }

  .recommendations h2 {
    font-size: 31px;
  }
}

/* --- Страница входа (только телефон) --- */
.auth-page {
  min-height: 100vh;
  background: #f5f5f5;
}

.auth-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.auth-top-inner {
  height: 56px;
  display: flex;
  align-items: center;
}

.auth-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.auth-main {
  display: flex;
  justify-content: center;
  padding: 48px 20px 40px;
}

.auth-panel {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.auth-heading {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #000;
}

.auth-sub {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.45;
  color: #757575;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-label {
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
}

.auth-field {
  width: 100%;
  height: 52px;
  border: 2px solid #e0e0e0;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 17px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.auth-field:focus {
  border-color: var(--blue);
}

.auth-field::placeholder {
  color: #b0b0b0;
}

.auth-submit {
  margin-top: 16px;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.auth-submit:hover {
  filter: brightness(1.05);
}

.auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

.auth-to-main {
  display: block;
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.auth-to-main:hover {
  text-decoration: underline;
}

/* --- Шаги SMS / 2FA (тот же визуальный язык, что и страница телефона) --- */
.auth-panel--flow {
  position: relative;
  padding-top: 44px;
}

.auth-back {
  position: absolute;
  top: 18px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: #f3f3f3;
  color: var(--blue);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-back:hover {
  background: #e9f7fd;
}

.auth-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #c62828;
  text-align: center;
}

.auth-flow-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.auth-secondary-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 2px solid #e0e0e0;
  background: #fff;
  color: #1f1f1f;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.auth-secondary-btn:hover {
  border-color: #c8c8c8;
  background: #fafafa;
}

.auth-timer {
  margin: 0;
  font-size: 14px;
  color: #757575;
  text-align: center;
}

.auth-inline-link {
  margin-top: 16px;
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.auth-inline-link:hover {
  text-decoration: underline;
}

.auth-field--monospace {
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
