/* Сброс и базовые стили (оставляем как есть) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: #2c3e50;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header (оставляем как есть) */
.header {
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
  padding: 15px 0;
}

.logo h1 a {
  font-size: 24px;
  color: #2980b9;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.main-nav ul li a {
  font-weight: bold;
  color: #555;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.main-nav ul li a:hover {
  background-color: #e8f0fe;
}

.main-nav ul li a.active {
  background-color: #2980b9;
  color: white;
}

/* Основной контент - НОВОЕ: центрирование */
main {
  flex: 1;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center; /* Центрирование по горизонтали */
}

/* Центрированные секции - НОВОЕ */
.welcome-section,
.advantages,
.guarantees,
.about-section,
.mission-section,
.contact-info,
.filters {
  width: 100%;
  max-width: 800px; /* Оптимальная ширина для чтения */
  text-align: center; /* Центрирование текста */
  margin-bottom: 30px;
}

/* Списки в преимуществах - НОВОЕ */
.advantages ul {
  display: inline-block;
  text-align: left;
}

/* Каталог товаров - НОВОЕ */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center; /* Центрирование карточек */
  width: 100%;
  max-width: 1200px;
}

/* Форма входа - НОВОЕ */
form#loginForm {
  max-width: 400px;
  width: 100%;
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  margin: 0 auto; /* Центрирование формы */
}

/* Footer (оставляем как есть) */
footer {
  text-align: center;
  padding: 20px 0;
  background-color: #f1f1f1;
  margin-top: auto; /* Прижимаем к низу */
  border-top: 1px solid #ddd;
}

/* Остальные стили оставляем без изменений */
.auth-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.auth-buttons .btn {
  padding: 6px 12px;
  background-color: #2980b9;
  color: white;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.2s ease;
}

.auth-buttons .btn-outline {
  background-color: transparent;
  color: #2980b9;
  border: 1px solid #2980b9;
}

.auth-buttons .btn:hover,
.auth-buttons .btn-outline:hover {
  background-color: #216a94;
  color: white;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.user-profile button {
  background: #c0392b;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

form#loginForm input {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

form#loginForm button {
  background-color: #2980b9;
  color: white;
  border: none;
  padding: 10px;
  width: 100%;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

form#loginForm button:hover {
  background-color: #216a94;
}

.product-card {
  background-color: #fff;
  border: 1px solid #ddd;
  width: 250px;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  text-align: left; /* Текст в карточках оставляем слева */
}

.filters {
  margin-bottom: 20px;
  background-color: #fff;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-align: left; /* Фильтры оставляем слева */
}

.filters select,
.filters input[type="range"] {
  margin: 10px 0;
  padding: 6px;
  width: 200px;
}

#priceValue {
  margin-left: 10px;
  font-weight: bold;
}

.team-members {
  display: flex;
  gap: 20px;
  justify-content: center; /* Центрирование членов команды */
}

.advantages li {
  margin-bottom: 10px;
  padding-left: 24px;
  background: url("data:image/svg+xml,%3Csvg fill='%232980b9' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat left center;
  background-size: 16px 16px;
}

.product-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Адаптивность - НОВОЕ */
@media (max-width: 768px) {
  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .auth-buttons {
    justify-content: center;
  }
  
  .products-grid {
    justify-content: center;
  }
  
  .team-members {
    flex-direction: column;
    align-items: center;
  }
}