/* Базовые настройки и переменные */
:root {
    --primary: #3a86ff;
    --primary-dark: #2667cc;
    --secondary: #8338ec;
    --dark: #212529;
    --light: #f8f9fa;
    --gray: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f5f7fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
  }
  
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
  }
  
  .btn-primary {
    background-color: var(--primary);
    color: white;
  }
  
  .btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
  }
  
  .btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
  }
  
  .btn-outline:hover {
    background-color: var(--primary);
    color: white;
  }
  
  /* Шапка сайта */
  .header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  .header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
  }
  
  .logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
  }
  
  .logo i {
    margin-right: 10px;
    font-size: 28px;
  }
  
  .main-nav ul {
    display: flex;
    list-style: none;
  }
  
  .main-nav li {
    margin-left: 25px;
    position: relative;
  }
  
  .main-nav a {
    font-weight: 500;
    padding: 5px 0;
    position: relative;
  }
  
  .main-nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
  }
  
  .main-nav a:hover:after {
    width: 100%;
  }
  
  .user-actions {
    display: flex;
    align-items: center;
  }
  
  .user-actions .btn {
    margin-left: 10px;
    font-size: 14px;
  }
  
  .cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 20px;
    background-color: var(--primary);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
  }
  
  .cart-btn i {
    margin-right: 5px;
  }
  
  .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
  }
  
  /* Герой секция */
  .hero {
    background: linear-gradient(135deg, #3a86ff 0%, #8338ec 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 50px;
  }
  
  .hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
  }
  
  .hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
  }
  
  /* Секция с товарами */
  .section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
  }
  
  .section-title h2 {
    font-size: 32px;
    display: inline-block;
    padding-bottom: 10px;
  }
  
  .section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary);
  }
  
  .featured-products {
    padding: 60px 0;
  }
  
  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
  }
  
  .product-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
  }
  
  .product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  }
  
  .product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
  }
  
  .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
  }
  
  .product-card:hover .product-image img {
    transform: scale(1.05);
  }
  
  .product-info {
    padding: 20px;
  }
  
  .product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
  }
  
  .price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
  }
  
  .current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
  }
  
  .old-price {
    font-size: 16px;
    text-decoration: line-through;
    color: var(--gray);
    margin-right: 10px;
  }
  
  .product-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
  }
  
  .product-actions .btn {
    flex: 1;
    margin: 0 5px;
    padding: 8px 10px;
    font-size: 14px;
  }
  
  /* Подвал сайта */
  .footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 20px;
    margin-top: auto;
  }
  
  .footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
  }
  
  .footer-column h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
  }
  
  .footer-column h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary);
  }
  
  .footer-column p {
    margin-bottom: 10px;
    opacity: 0.8;
  }
  
  .footer-links {
    list-style: none;
  }
  
  .footer-links li {
    margin-bottom: 10px;
  }
  
  .footer-links a {
    opacity: 0.8;
    transition: var(--transition);
  }
  
  .footer-links a:hover {
    opacity: 1;
    color: var(--primary);
    padding-left: 5px;
  }
  
  .social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
  }
  
  .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
  }
  
  .social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
  }
  
  .copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 14px;
  }
  
  /* Адаптивность */
  @media (max-width: 768px) {
    .header .container {
      flex-direction: column;
      padding: 15px;
    }
    
    .main-nav {
      margin: 15px 0;
    }
    
    .main-nav ul {
      flex-wrap: wrap;
      justify-content: center;
    }
    
    .main-nav li {
      margin: 0 10px 5px;
    }
    
    .hero h1 {
      font-size: 36px;
    }
    
    .hero p {
      font-size: 18px;
    }
    
    .products-grid {
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
  }
  
  @media (max-width: 480px) {
    .hero {
      padding: 60px 0;
    }
    
    .hero h1 {
      font-size: 28px;
    }
    
    .section-title h2 {
      font-size: 26px;
    }
    
    .products-grid {
      grid-template-columns: 1fr;
    }
    
    .footer-columns {
      grid-template-columns: 1fr;
    }
  }




  /* Стили для каталога */
.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.catalog-header h1 {
  font-size: 32px;
  margin-bottom: 15px;
}

.catalog-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sorting {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-control {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  background-color: white;
}

.view-options {
  display: flex;
  gap: 5px;
}

.view-btn {
  background: none;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  cursor: pointer;
  color: var(--gray);
}

.view-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.catalog-content {
  display: flex;
  gap: 30px;
}

.sidebar {
  width: 250px;
  flex-shrink: 0;
}

.filter-section {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.filter-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--dark);
}

.category-list, .manufacturer-list {
  list-style: none;
}

.category-list li, .manufacturer-list li {
  margin-bottom: 10px;
}

.category-list a {
  color: var(--dark);
  transition: var(--transition);
}

.category-list a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.manufacturer-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.price-range {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.price-range input[type="range"] {
  width: 100%;
}

.price-values {
  display: flex;
  justify-content: space-between;
}

.products-container {
  flex-grow: 1;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  gap: 5px;
}

.page-item {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  color: var(--dark);
}

.page-item.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.page-item.disabled {
  color: var(--gray);
  pointer-events: none;
}

/* Стили для списка товаров (альтернативный вид) */
.products-list {
  display: none;
  flex-direction: column;
  gap: 15px;
}

.products-list .product-card {
  flex-direction: row;
  max-height: 200px;
}

.products-list .product-image {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.products-list .product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.products-list .product-actions {
  margin-top: 15px;
}

/* Адаптивность */
@media (max-width: 992px) {
  .catalog-content {
      flex-direction: column;
  }
  
  .sidebar {
      width: 100%;
      margin-bottom: 30px;
  }
}

@media (max-width: 576px) {
  .catalog-header {
      flex-direction: column;
      align-items: flex-start;
  }
  
  .catalog-controls {
      width: 100%;
      flex-direction: column;
      gap: 15px;
  }
  
  .sorting {
      width: 100%;
  }
  
  .form-control {
      width: 100%;
  }
}