﻿.products-section {
  padding: 132px 0 76px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  position: relative;
  min-height: 100vh;
}

.products-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 10%, rgba(22, 119, 255, 0.08), transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(33, 212, 253, 0.08), transparent 32%);
}

.products-section > .container {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  width: min(94vw, 1500px);
}

.products-section h1 {
  text-align: center;
  color: #0f172a;
  margin: 0 0 56px;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 900;
  letter-spacing: -0.06em;
  position: relative;
}

.products-section h1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 86px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1677ff, #21d4fd);
  transform: translateX(-50%);
}

.products-layout {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  margin-top: 30px;
}

.products-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 124px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.sidebar-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #1e50ae, #1677ff);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.sidebar-title .fa-chevron-down {
  transition: transform 0.3s ease;
}

.sidebar-title.collapsed .fa-chevron-down {
  transform: rotate(-90deg);
}

.sidebar-title.collapsed + .brand-filter {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
}

.brand-filter {
  display: block;
  max-height: 350px;
  overflow-y: auto;
  padding: 12px 20px 18px;
  margin: 0;
  transition: all 0.3s ease;
}

.brand-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 8px;
  color: #475569;
  border-radius: 10px;
  transition: 0.2s ease;
}

.brand-item:hover {
  color: #1e50ae;
  background: #eff6ff;
}

.brand-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #1677ff;
}

.sidebar-category {
  border-bottom: 1px solid #e5e7eb;
}

.category-header {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 0 20px;
  color: #475569;
  background: #ffffff;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s ease;
}

.category-header:hover {
  color: #1e50ae;
  background: #f8fafc;
}

.category-header i:first-child {
  width: 22px;
  margin-right: 10px;
  color: #1e50ae;
  font-size: 16px;
  text-align: center;
}

.category-header span {
  flex: 1;
  text-align: left;
  font-weight: 600;
}

.category-header .fa-chevron-down {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 50%;
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

.sidebar-category.collapsed .category-header .fa-chevron-down {
  transform: rotate(0deg);
}

.category-submenu {
  max-height: 500px;
  overflow: hidden;
  padding: 0;
  margin: 0;
  list-style: none;
  background: #f8fafc;
  transition: max-height 0.3s ease;
}

.sidebar-category.collapsed .category-submenu {
  max-height: 0;
}

.category-submenu a {
  display: block;
  position: relative;
  padding: 11px 20px 11px 52px;
  color: #64748b;
  font-size: 14px;
  transition: 0.2s ease;
}

.category-submenu a::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 50%;
  width: 5px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 50%;
  transform: translateY(-50%);
}

.category-submenu a:hover,
.category-submenu a.active {
  color: #1e50ae;
  background: #eff6ff;
  font-weight: 700;
}

.category-submenu a:hover::before,
.category-submenu a.active::before {
  background: #1e50ae;
}

.products-content {
  flex: 1;
  min-width: 0;
}

.product-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e5e7eb;
}

.product-section h2 {
  position: relative;
  margin: 0 0 22px;
  padding-bottom: 12px;
  color: #1e50ae;
  font-size: 24px;
  font-weight: 800;
}

.product-section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 80px;
  height: 3px;
  background: #1e50ae;
}

.product-list,
.unified-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 18px;
}

.unified-products-container h2 {
  position: relative;
  margin: 0 0 22px;
  padding-bottom: 12px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
  border-bottom: 2px solid #1677ff;
}

.product-item {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
  transition: all 0.3s ease;
}

.product-item:hover {
  transform: none;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.product-item.filtered {
  display: none;
}

.product-item .product-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 136px;
  margin: 0;
  padding: 12px;
  background: #f9fafb;
  overflow: hidden;
}

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

.product-item:hover .product-image img {
  transform: none;
}

.products-section .product-item.enhanced-hover,
.products-section .product-item.light-trail,
.products-section .product-item.gpu-accelerated {
  transform: none !important;
  perspective: none !important;
  transform-style: flat !important;
  will-change: auto !important;
}

.products-section .product-item.enhanced-hover:hover,
.products-section .product-item.light-trail:hover,
.products-section .product-item.gpu-accelerated:hover {
  transform: none !important;
}

.products-section .product-item.light-trail::before,
.products-section .product-item.light-trail:hover::before,
.products-section .product-item .card-light {
  display: none !important;
  content: none !important;
}

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  color: #ffffff;
  background: #1e50ae;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.product-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.product-details h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
}

.product-details p {
  flex: 1;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-more {
  display: inline-block;
  align-self: flex-start;
  padding: 8px 14px;
  color: #ffffff;
  background: #1e50ae;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-more:hover {
  background: #1677ff;
  transform: none;
}

.empty-category,
.no-products-message,
.no-category-products-message {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 30px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  text-align: center;
}

.empty-category i,
.no-products-message i,
.no-category-products-message i {
  margin-bottom: 12px;
  color: #94a3b8;
  font-size: 30px;
}

@media (max-width: 992px) {
  .products-layout {
    flex-direction: column;
  }

  .products-sidebar {
    position: relative;
    top: auto;
    width: 100%;
  }

  .product-list,
  .unified-products-grid {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
  }
}

@media (max-width: 768px) {
  .products-section {
    padding-top: 108px;
  }

  .product-list,
  .unified-products-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .products-section h1 {
    font-size: 2.2rem;
  }
}

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

  .product-item .product-image {
    height: 150px;
  }
}
