* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: #f3f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;   /* центрируем по горизонтали */
  min-height: 100vh;
  padding: 20px;
  margin: 0;
  box-sizing: border-box;
}

.container {
  max-width: 1100px;
  width: 100%;
  background: white;
  border-radius: 0 0 28px 28px; /* скруглены только снизу */
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
  display: flex;
  padding: 40px;
  gap: 40px;
  box-sizing: border-box;
}

h2 {
  font-size: 24px;
  color: #0f172a;
  margin-bottom: 30px;
}

/* Левая панель */
.left-panel {
  flex: 0 0 240px;
  border-right: 1px solid #eaeef5;
  padding-right: 30px;
}

.left-panel h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.city-selector {
  margin-bottom: 24px;
}

.city-selector label, .type-selector label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 8px;
}

#citySelect, #typeSelect {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-size: 15px;
  background: white;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

#citySelect:focus, #typeSelect:focus {
  border-color: #2962ef;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.radio-item {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.radio-item input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  accent-color: #2962ef;
  cursor: pointer;
}

.radio-item label {
  font-size: 16px;
  color: #334155;
  cursor: pointer;
  font-weight: 500;
}

/* Правая панель */
.right-panel {
  flex: 1;
}

.search-area {
  margin-bottom: 32px;
}

.search-box {
  display: flex;
  gap: 12px;
  align-items: center;
}

#searchInput {
  flex: 1;
  height: 56px;
  padding: 0 24px;
  border: 2px solid #e2e8f0;
  border-radius: 40px;
  font-size: 16px;
  transition: all 0.2s;
  outline: none;
  background: white;
  color: #0f172a;
}

#searchInput:focus {
  border-color: #2962ef;
  box-shadow: 0 0 0 4px rgba(41,98,239,0.08);
}

#searchBtn {
  height: 56px;
  padding: 0 36px;
  background: #2962ef;
  border: none;
  border-radius: 40px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

#searchBtn:hover {
  background: #1e4fd9;
}

.results-title {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

/* Контейнер результатов и лоадер */
.results-container {
  position: relative;
  min-height: 200px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  background: #f8fafc;
  border-radius: 20px;
  border: 1px solid #f1f5f9;
  transition: 0.15s;
}

/* Строка категории */
.category-row {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 4px;
  font-weight: 500;
}

.product-card:hover {
  background: white;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.product-info {
  flex: 1;
}

.product-info h4 {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 8px;
}

.product-info p {
  font-size: 14px;
  color: #475569;
}

.product-price {
  font-size: 22px;
  font-weight: 700;
  color: #2962ef;
  white-space: nowrap;
  margin-left: 16px;
  line-height: 1.2;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 28px;
  font-size: 16px;
}

/* Лоадер */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #64748b;
  background: #f8fafc;
  border-radius: 20px;
  min-height: 200px;
}

.spinner {
  border: 4px solid #e2e8f0;
  border-top: 4px solid #2962ef;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.footer {
  margin-top: 40px;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
  border-top: 1px solid #e2e8f0;
  padding-top: 24px;
}

/* Первая строка: компания + иконка Excel + дата */
.top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.excel-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.excel-icon:hover {
  opacity: 0.7;
}

.update-date {
  font-size: 14px;
}

/* Вторая строка: только телефон */
.phone-row {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.company-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.company-name {
  color: #475569;
  font-size: 15px;
  font-weight: 500;
}

.contact-icons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.excel-link {
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  color: #27ae60; /* зелёный для Excel */
  transition: opacity 0.2s;
}

.excel-link:hover {
  opacity: 0.7;
}

/* Контейнер для контактных иконок */
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* Общие стили для контактных ссылок */
.contact-link {
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  transition: opacity 0.2s;
}

.contact-link:hover {
  opacity: 0.7;
}

/* Специфичные стили для сайта */
.website-link {
  color: #7e57c2; /* фиолетовый для сайта */
}

.subscription-modal,
.login-modal,
.register-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 28px;
  max-width: 500px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
}

.modal-close:hover {
  color: #0f172a;
}

.subscription-plans {
  display: flex;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.plan {
  flex: 1;
  min-width: 200px;
  padding: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  text-align: center;
  transition: 0.2s;
}

.plan:hover {
  border-color: #2962ef;
  box-shadow: 0 4px 12px rgba(41,98,239,0.1);
}

.plan h3 {
  margin-bottom: 10px;
  color: #0f172a;
}

/* Блок цены и дополнительной информации */
.price-block {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.price {
  font-size: 24px;
  font-weight: 700;
  color: #2962ef;
  margin: 15px 0;
}

.excel-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #64748b;
  padding-top: 3px;
}

.plan button {
  background: #2962ef;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.plan button:hover {
  background: #1e4fd9;
}

.login-link,
.register-link {
  text-align: center;
  margin-top: 20px;
  color: #64748b;
}

.login-link a,
.register-link a {
  color: #2962ef;
  text-decoration: none;
  font-weight: 600;
}

.login-link a:hover,
.register-link a:hover {
  text-decoration: underline;
}

.login-modal input,
.register-modal input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
}

.login-modal button[type="submit"],
.register-modal button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: #2962ef;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.site-header {
  width: 100%;
  max-width: 1100px;           /* как у контейнера */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: white;
  border-radius: 28px 28px 0 0; /* скруглены сверху */
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  box-sizing: border-box;
}

.header-left .site-title {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav {
  display: flex;
  gap: 15px; /* увеличенный отступ между пунктами */
}

.main-nav a {
  color: #475569;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 6px 16px;          /* отступы для овала */
  border-radius: 40px;         /* скругление */
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover {
  background: #f1f5f9;         /* серый фон при наведении */
  color: #0f172a;
}

.main-nav a.active {
  background: #2962ef;         /* синий фон как у кнопки входа */
  color: white;
}

.auth-button {
  background: #2962ef;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.auth-button:hover {
  background: #1e4fd9;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 16px;
  color: #334155;
}

.user-name {
  font-weight: 600;
  color: #2962ef;
}

.logout-btn {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 6px 16px;
  border-radius: 40px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

.logout-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.phone-text {
  color: #2962ef;          /* синий, как у иконки телефона */
  font-size: 15px;
  margin-left: 4px;
  margin-right: 4px;
  white-space: nowrap;     /* предотвращаем перенос номера */
}

/* Десктопное меню */
.desktop-nav {
  display: flex;
  gap: 15px;
}

.desktop-nav a {
  color: #475569;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 40px;
  transition: background 0.2s, color 0.2s;
}

.desktop-nav a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.desktop-nav a.active {
  background: transparent;
  color: #2962ef;
  border-bottom: 3px solid #2962ef;
  border-radius: 0;
  padding: 6px 16px 3px;
}

/* Гамбургер (скрыт на десктопе) */
.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
  user-select: none;
  margin-right: 15px;
}

/* Мобильное выпадающее меню */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: white;
  padding: 10px 0;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  position: absolute;
  top: calc(100% + 2px); /* отступ от шапки */
  left: 0;
  z-index: 100;
}

.mobile-nav a {
  padding: 12px 20px;
  color: #334155;
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  background: #f8fafc;
}

.mobile-nav a.active {
  background: #2962ef;
  color: white;
}

.company-link {
  color: #2962ef;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.company-link:hover {
  color: #1e4fd9;
  text-decoration: underline;
}

.phone-link {
  color: #2962ef;
  text-decoration: none;
  font-size: 15px;
  margin-left: 8px;
  white-space: nowrap;
  transition: color 0.2s;
  padding-top: 3px;
}

.phone-link:hover {
  color: #1e4fd9;
  text-decoration: underline;
}

/* Адаптация для мобильных */
@media (max-width: 600px) {

  .city-selector {
    margin-bottom: 12px;
  }

  .phone-link {
    font-size: 14px;
    margin-left: 6px;
  }

  .desktop-nav {
    display: none; /* прячем обычное меню */
  }

  .hamburger {
    display: inline-block; /* показываем гамбургер */
  }

  .site-header {
    position: relative; /* для позиционирования выпадающего меню */
    justify-content: space-between;
    padding: 15px 20px;
  }

  .header-left {
    display: flex;
    align-items: center;
  }

  /* Стили для блока авторизации на мобильных */
  .user-info {
    gap: 10px;
    font-size: 14px;
  }

  .user-name {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logout-btn {
    padding: 4px 12px;
    font-size: 13px;
  }

  .auth-button {
    padding: 6px 16px;
    font-size: 14px;
  }

  .main-nav a {
    padding: 6px 12px;   /* чуть меньше на мобильных */
    font-size: 15px;
  }

  .main-nav {
    gap: 15px; /* ещё больше отступ на мобильных */
  }

  .phone-text {
    font-size: 14px;
  }

  .contact-icons {
    gap: 6px;
  }

  .excel-date {
    font-size: 13px;
    padding-top: 0px;
  }

  .price {
    font-size: 18px;
  }

  .price-block {
    justify-content: space-between; /* на мобилках растягиваем */
    width: 100%;
  }

  .site-header {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
  }

  .header-left .site-title {
    flex-direction: row; /* гарантируем горизонтальное расположение */
    gap: 20px; /* при необходимости можно настроить */
  }

  .header-right {
    text-align: center;
  }

  .auth-button, .logout-btn {
    padding: 6px 12px;
    font-size: 14px;
  }

  .user-info {
    gap: 8px;
  }

  .modal-content {
    padding: 30px 20px;
  }

  .subscription-plans {
    flex-direction: column;
  }

  .plan {
    width: 100%;
  }

  .contact-row {
    gap: 16px; /* больше расстояние для удобного нажатия */
    margin-top: 10px;
  }

  .contact-link {
    font-size: 22px; /* удобнее для тапа */
  }

  .excel-icon {
    width: 24px;
    height: 24px;
  }

  .category-row {
    font-size: 13px;
    margin-bottom: 3px;
  }

  .company-row {
    /*gap: 6px;*/
    margin-bottom: 0px;
  }

  .update-date {
    font-size: 13px;
  }

  .container {
    flex-direction: column;
    padding: 0 20px 20px;
    gap: 20px;
  }

  .left-panel {
    flex: auto;
    border-right: none;
    border-bottom: 1px solid #eaeef5;
    padding-right: 0;
    padding-bottom: 20px;
  }

  .right-panel {
    flex: auto;
  }

  .search-box {
    flex-direction: column;
    gap: 12px;
  }

  #searchInput {
    min-height: 48px;
    width: 100%;
    height: 48px;
    line-height: normal;
    /*font-size: 18px;*/
    padding: 0 16px;
  }

  #searchBtn {
    width: 100%;
    height: 48px;
    padding: 0 16px;
  }

  .radio-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .radio-item {
    flex: 1 0 auto;
    min-width: 120px;
  }

  .radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
  }

  .product-card {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  /*.product-info {*/
  /*  width: 100%;*/
  /*}*/

  .product-info h4 {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .product-price {
    align-self: flex-end;
    font-size: 18px;
    margin-left: 0;
  }

  /*.excel-icon {*/
  /*  width: 22px;*/
  /*  height: 22px;*/
  /*}*/

  .company-name {
    font-size: 14px;
  }

  .top-row {
    gap: 8px;
    margin-bottom: 10px;
  }

  .update-date {
    font-size: 12px;
  }

  .results-title {
    margin-bottom: 12px;
    font-size: 13px;
  }

  .footer {
    margin-top: 20px;
    padding-top: 16px;
    font-size: 12px;
  }

  .spinner {
    width: 36px;
    height: 36px;
    border-width: 3px;
  }

  .loader {
    padding: 30px 16px;
    min-height: 150px;
  }
}