/* Герой-секция каталога */
    .catalog-hero {
      background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('../images/header.png') center/cover no-repeat;
      color: white;
      padding: 10px 0 30px;
      position: relative;
      overflow: hidden;
    }

    .catalog-hero::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
      opacity: 0.3;
    }

    .catalog-hero-content {
      position: relative;
      z-index: 2;
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
      text-align: center;
    }

    .catalog-hero h1 {
      font-size: clamp(32px, 5vw, 48px);
      font-weight: 800;
      margin-bottom: 16px;
      line-height: 1.2;
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .catalog-hero-subtitle {
      font-size: clamp(16px, 2vw, 20px);
      opacity: 0.9;
      max-width: 600px;
      margin: 0 auto 10px;
      line-height: 1.6;
    }

    .catalog-stats {
      display: flex;
      justify-content: center;
      gap: 30px;
      flex-wrap: wrap;
      margin-top: 20px;
    }

    .stat-item {
      background: rgba(255, 255, 255, 0.15);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 16px;
      padding: 7px;
      min-width: 150px;
      text-align: center;
    }

    .stat-number {
      font-size: 32px;
      font-weight: 700;
      display: block;
      margin-bottom: 5px;
      color: white;
    }

    .stat-label {
      font-size: 14px;
      opacity: 0.9;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    /* Основной контейнер каталога */
    .catalog-container {
      max-width: 1400px;
      margin: 0 auto;
      padding: 40px 20px;
      display: grid;
      grid-template-columns: 300px 1fr;
      gap: 30px;
      position: relative;
    }

    /* Сайдбар с категориями */
    .catalog-sidebar {
      position: sticky;
      top: 100px;
      align-self: start;
      background: white;
      border-radius: 20px;
      box-shadow: var(--catalog-card-shadow);
      padding: 25px;
      border: 1px solid #e5e7eb;
      height: fit-content;
    }

    .catalog-sidebar h2 {
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 25px;
      color: var(--catalog-dark);
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .catalog-sidebar h2 i {
      color: var(--catalog-primary);
    }

    .category-nav {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .category-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #ffffff;
    color: rgb(18,113,171);
    border: 3px solid rgb(18,113,171);
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
    margin-bottom: 0;
    }

    .category-btn:hover {
      border-color: var(--catalog-primary);
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(0, 174, 239, 0.1);
    }

    .category-btn.active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgb(18,113,171);
    color: rgb(255, 255, 255);
    border: 3px solid rgb(18,113,171);
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
    margin-bottom: 0;
    }

.category-btn:not(.active):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.3);
    background:  #d4f1fc;
}

    /* Основной контент с товарами */
    .catalog-main {
      background: white;
      border-radius: 20px;
      box-shadow: var(--catalog-card-shadow);
      padding: 30px;
      border: 1px solid #e5e7eb;
    }

    .catalog-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 30px;
      flex-wrap: wrap;
      gap: 20px;
    }

    .catalog-title {
      font-size: 28px;
      font-weight: 700;
      color: var(--catalog-dark);
      margin: 0;
    }

    .catalog-subtitle {
      color: #6b7280;
      font-size: 16px;
      margin-top: 5px;
    }

    .catalog-actions {
      display: flex;
      gap: 15px;
    }

    .filter-btn {
      padding: 10px 20px;
      background: white;
      border: 2px solid #e5e7eb;
      border-radius: 10px;
      font-weight: 600;
      color: var(--catalog-dark);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: all 0.3s ease;
    }

    .filter-btn:hover {
      border-color: var(--catalog-primary);
      color: var(--catalog-primary);
    }

    .sort-select {
      padding: 10px 20px;
      border: 2px solid #e5e7eb;
      border-radius: 10px;
      font-weight: 600;
      background: white;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .sort-select:hover {
      border-color: var(--catalog-primary);
    }

    /* Сетка товаров */
    .products-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 25px;
    }

    .product-card {
      background: white;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: var(--catalog-card-shadow);
      border: 1px solid #e5e7eb;
      transition: all 0.3s ease;
      position: relative;
      height: 100%;
      display: flex;
      flex-direction: column;
    }

    .product-card:hover {
      transform: translateY(-8px);
      box-shadow: var(--catalog-hover-shadow);
      border-color: var(--catalog-primary);
    }

    .product-badge {
      position: absolute;
      top: 15px;
      left: 15px;
      background: var(--catalog-accent);
      color: white;
      padding: 5px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
      z-index: 2;
    }

    .product-image {
      height: 200px;
      background: #f8fafc;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
    }

    .product-image img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      transition: transform 0.3s ease;
    }

    .product-card:hover .product-image img {
      transform: scale(1.05);
    }

    .product-content {
      padding: 20px;
      flex-grow: 1;
      display: flex;
      flex-direction: column;
    }

    .product-category {
      font-size: 12px;
      color: var(--catalog-primary);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 8px;
    }

    .product-name {
      font-size: 18px;
      font-weight: 600;
      color: var(--catalog-dark);
      margin-bottom: 10px;
      line-height: 1.4;
      flex-grow: 1;
    }

    .product-description {
      font-size: 14px;
      color: #6b7280;
      margin-bottom: 15px;
      line-height: 1.5;
    }

    .product-price {
      font-size: 20px;
      font-weight: 700;
      color: var(--catalog-primary);
      margin: 10px 0;
    }

    .product-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: auto;
      padding-top: 15px;
      border-top: 1px solid #e5e7eb;
    }

    .product-tags {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
    }

    .product-tag {
      background: #f3f4f6;
      color: #6b7280;
      padding: 4px 10px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 500;
    }

    .product-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--catalog-primary);
      font-weight: 600;
      font-size: 14px;
      text-decoration: none;
      transition: all 0.3s ease;
    }

    .product-link:hover {
      gap: 12px;
      color: var(--catalog-secondary);
    }

    .product-link i {
      transition: transform 0.3s ease;
    }

    .product-link:hover i {
      transform: translateX(5px);
    }

    /* Корзина и кнопки добавления товара */
    .product-cart-controls {
      margin-top: 15px;
      padding-top: 15px;
      border-top: 1px solid #e5e7eb;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .cart-add-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 16px;
      background: var(--catalog-primary);
      color: rgb(0, 0, 0);
      border: none;
      border-radius: 8px;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .cart-add-btn:hover {
      background: var(--catalog-secondary);
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(0, 174, 239, 0.2);
    }

    .cart-add-btn i {
      font-size: 16px;
    }

    .cart-quantity-controls {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .cart-quantity-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: none;
      background: #f3f4f6;
      color: var(--catalog-dark);
      font-size: 18px;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
    }

    .cart-quantity-btn:hover {
      background: var(--catalog-primary);
      color: white;
    }

    .cart-quantity-btn:disabled {
      opacity: 0.3;
      cursor: not-allowed;
    }

    .cart-quantity {
      font-size: 18px;
      font-weight: 700;
      color: var(--catalog-dark);
      min-width: 24px;
      text-align: center;
    }

    /* Бейдж корзины в хедере */
    .cart-badge {
      position: absolute;
      top: -8px;
      right: -8px;
      background: var(--cart-badge);
      color: white;
      font-size: 12px;
      font-weight: 700;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transform: scale(0);
      transition: all 0.3s ease;
    }

    .cart-badge.active {
      opacity: 1;
      transform: scale(1);
    }

    /* Индикатор загрузки и ошибки */
    .loading-indicator {
      text-align: center;
      padding: 40px;
      color: #6b7280;
      font-size: 16px;
    }

    .loading-spinner {
      border: 3px solid #f3f4f6;
      border-top: 3px solid var(--catalog-primary);
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
      margin: 0 auto 15px;
    }

    .error {
      text-align: center;
      padding: 40px;
      color: #dc2626;
      background: #fef2f2;
      border-radius: 12px;
      border: 1px solid #fecaca;
    }

    .no-products {
      text-align: center;
      padding: 40px;
      color: #6b7280;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    /* Адаптивность */
    @media (max-width: 1100px) {
      .catalog-container {
        grid-template-columns: 1fr;
        gap: 20px;
      }

      .catalog-sidebar {
        position: static;
        width: 100%;
      }

      .category-nav {
        flex-direction: row;
        flex-wrap: wrap;
      }

      .category-btn {
        flex: 1;
        min-width: 200px;
      }
    }

    @media (max-width: 768px) {
      .catalog-hero {
        padding: 60px 0 40px;
      }

      .catalog-stats {
        gap: 15px;
      }

      .stat-item {
        min-width: 120px;
        padding: 15px;
      }

      .stat-number {
        font-size: 24px;
      }

      .catalog-container {
        padding: 20px 15px;
      }

      .catalog-header {
        flex-direction: column;
        align-items: stretch;
      }

      .catalog-actions {
        justify-content: space-between;
      }

      .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
      }

      .category-btn {
        min-width: 100%;
      }
    }

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

      .stat-item {
        min-width: calc(50% - 15px);
      }

      .catalog-sidebar {
        padding: 20px;
      }
    }

    /* Анимация перехода между категориями */
    .products-category {
      animation: fadeIn 0.5s ease forwards;
      display: none;
    }

    .products-category.active {
      display: block;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Индикатор активной категории */
    .category-indicator {
      height: 4px;
      background: linear-gradient(90deg, var(--catalog-primary), var(--catalog-accent));
      border-radius: 2px;
      position: absolute;
      bottom: 0;
      left: 20px;
      right: 20px;
      transform: scaleX(0);
      transition: transform 0.3s ease;
    }

    .category-btn.active .category-indicator {
      transform: scaleX(1);
    }

    /* Кнопка "Вверх" для навигации */
    .back-to-top {
      position: fixed;
      bottom: 30px;
      right: 30px;
      width: 50px;
      height: 50px;
      background: var(--catalog-primary);
      color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      font-size: 20px;
      box-shadow: 0 4px 15px rgba(0, 174, 239, 0.3);
      transition: all 0.3s ease;
      z-index: 100;
      opacity: 0;
      visibility: hidden;
      transform: translateY(20px);
    }
    
    a {
      text-decoration: none;
    }

    .back-to-top.visible {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .back-to-top:hover {
      background: var(--catalog-secondary);
      transform: translateY(-5px);
      box-shadow: 0 6px 20px rgba(0, 174, 239, 0.4);
    }

    /* Фильтры (для будущего расширения) */
    .catalog-filters {
      background: white;
      border-radius: 16px;
      padding: 20px;
      margin-bottom: 25px;
      border: 1px solid #e5e7eb;
      display: none;
    }

    .filters-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }

    .filter-group {
      margin-bottom: 15px;
    }

    .filter-group label {
      display: block;
      margin-bottom: 8px;
      font-weight: 600;
      color: var(--catalog-dark);
    }

    .filter-options {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .filter-option {
      padding: 8px 16px;
      background: #f3f4f6;
      border: 2px solid transparent;
      border-radius: 20px;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .filter-option:hover {
      background: #e5e7eb;
    }

    .filter-option.active {
      background: var(--catalog-primary);
      color: white;
    }

