/* Обнуление */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%; /* Обязательно */
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9fafb;
  color: #111827;
  line-height: 1.6;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Минимум полная высота экрана */
}

.main-content {
  flex: 1 0 auto; /* Занимает всё свободное пространство */
}

a {
  /* text-decoration: none; */
  /* color: #333;
  font-weight: 500;
  font-style: italic; */
}

/* Шапка */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #1e3a8a;
}

.header nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

.header nav a:hover {
  color: #3b82f6;
}

.user-actions button {
  background: #1e3a8a;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 1rem;
  font-size: 0.9rem;
}

.user-actions button:hover {
  background: #1e40af;
}

.cart-icon {
  font-size: 1.5rem;
  cursor: pointer;
}

/* Главный экран */
.hero {
  text-align: center;
  padding: 5rem 1rem;
  background: linear-gradient(to bottom, #e0f2fe, #f9fafb);
}

.hero h1 {
  font-size: 2.5rem;
  color: #1e3a8a;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.search-bar {
  padding: 0.75rem 1rem;
  width: 80%;
  max-width: 500px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

.search-bar:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Фильтры */
.filters {
  padding: 1.5rem 5%;
  text-align: center;
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.filter-buttons {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: #f3f4f6;
  padding: 0.5rem;
  border-radius: 12px;
  justify-content: center;
}

.filter-btn {
  border: none;
  padding: 0.6rem 1.2rem;
  background: transparent;
  color: #4b5563;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
  background: #3b82f6;
  color: white;
}

/* Популярные товары */
.featured {
  padding: 3rem 5%;
  text-align: center;
}

.featured h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #1e3a8a;
}

.product-grid {
  display: grid;
  justify-items: center;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin: 0 auto;

}

.product-card {
  width: 220px;
  height: 352px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
}

.product-card h3 {
  font-size: 1.1rem;
  margin: 0.75rem 0 0.25rem;
  padding: 0 1rem;
}

.product-card p {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding: 0 1rem;
}

.price {
  font-weight: bold;
  color: #1e3a8a;
  font-size: 1.2rem;
  margin: 0.5rem 1rem;
}

.product-card button {
  width: 80%;
  padding: 0.75rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-top: 1px solid #ffffff30;
  /* border-radius: 0 0 12px 12px; */
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

.product-card button:hover {
  background: #2563eb;
}

/* Значки доверия */
.trust {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 1rem;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

/* Адаптивность */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    padding: 1rem;
  }

  .header nav a {
    margin: 0.5rem;
  }

  .user-actions {
    margin-top: 0.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .featured h2 {
    font-size: 1.75rem;
  }

  .filter-buttons {
    flex-direction: column;
    align-items: center;
  }
}

.product-card .details-button {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  text-align: center;
  background: #f3f4f6;
  color: #1e3a8a;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  font-size: 0.9rem;
  transition:
    background 0.3s,
    color 0.3s;
}

.product-card .details-button:hover {
  background: #d1d5db;
  color: #1e3a8a;
}


.footer a {
  text-align: center;
  color: #333;
  font-weight: 500;
  font-style: italic;
}