/* main.css - полная версия */

/* CSS Variables для тем */
:root {
  --bg-primary: #0A0B0F;
  --bg-secondary: #16181F;
  --bg-surface: #1A1D25;
  --border-color: #2A2F3A;
  --border-width: 1px;
  --text-primary: #E5E7EB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --accent-iron: #D4D4D8;
  --accent-iron-dark: #A1A1AA;
  --accent-cyan: #67E8F9;
  --shadow-color: rgba(103, 232, 249, 0.2);
}

:root.light {
  --bg-primary: #F3F4F6;
  --bg-secondary: #FFFFFF;
  --bg-surface: #F9FAFB;
  --border-color: #1F2937;
  --border-width: 2px;
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --accent-iron: #3B82F6;
  --accent-iron-dark: #2563EB;
  --accent-cyan: #0EA5E9;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-top: 80px;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 5rem;
  z-index: 100;
}

.hero-container {
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
  padding: 0 1.5rem;
  z-index: 10;
}

.logo-wrapper {
  margin-bottom: 2rem;
  position: relative;
  min-height: 120px;
}

.iron-logo {
  max-width: 80%;
  height: auto;
  margin: 0 auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.iron-logo:hover {
  transform: scale(1.02);
}

.iron-logo-dark {
  display: block;
}

.iron-logo-light {
  display: none;
}

:root.light .iron-logo-dark {
  display: none;
}

:root.light .iron-logo-light {
  display: block;
}

.fallback-logo {
  display: none;
}

.fallback-title {
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: -0.25rem;
}

.iron-text {
  background: linear-gradient(135deg, var(--accent-iron) 0%, var(--accent-iron-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-slogan {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 3.5rem;
  letter-spacing: 0.025em;
}

.search-wrapper {
  max-width: 42rem;
  margin: 0 auto;
  position: relative;
  z-index: 1000;
}

.search-container {
  position: relative;
  z-index: 1001;
}

.search-icon {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.search-input {
  width: 100%;
  background-color: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 1.5rem;
  padding: 1.5rem 2rem;
  font-size: 1.125rem;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-primary);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-iron);
  box-shadow: 0 0 0 calc(var(--border-width) * 1.5) var(--shadow-color);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
  font-size: 0.875rem;
}

.search-tag {
  cursor: pointer;
  padding: 0.5rem 1rem;
  background-color: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 1rem;
  transition: all 0.3s;
}

.search-tag:hover {
  border-color: var(--accent-cyan);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 1rem;
  max-height: 400px;
  overflow-y: auto;
  z-index: 10000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  display: none;
}

.search-results-dropdown.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-surface);
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-category {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.search-result-badge {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  padding: 0.2rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.73rem;
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.search-loading {
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.suggest-add-item {
  padding: 1rem 1.25rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s;
}

.suggest-add-item:hover {
  background: var(--bg-secondary);
}

.suggest-add-item p {
  margin-bottom: 0.3rem;
}

.suggest-add-item .suggest-link {
  color: var(--accent-cyan);
  font-weight: 500;
  text-decoration: none;
}

.suggest-add-item .suggest-link:hover {
  text-decoration: underline;
}

.scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.scroll-hint-icon {
  width: 1.5rem;
  height: 2.5rem;
  border: 2px solid var(--text-muted);
  border-radius: 9999px;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-hint-dot {
  width: 0.25rem;
  height: 0.5rem;
  background-color: var(--text-muted);
  border-radius: 9999px;
  animation: bounce 1s infinite;
}

/* About Section */
.about-section {
  padding: 6rem 1.5rem;
  position: relative;
  z-index: 1;
  background: var(--bg-primary);
}

.about-container {
  max-width: 80rem;
  margin: 0 auto;
}

.about-header {
  text-align: center;
  margin-bottom: 4rem;
}

.about-badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.about-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--accent-iron) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-description {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.625;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

.stat-card {
  background-color: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 1.5rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px);
}

.stat-card.animated {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px var(--shadow-color);
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.stat-card:hover::after {
  width: 60%;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
  display: inline-block;
  position: relative;
}

.stat-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.stat-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px);
}

.card.animated {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card:nth-child(1) { transition-delay: 0.1s; }
.card:nth-child(2) { transition-delay: 0.2s; }
.card:nth-child(3) { transition-delay: 0.3s; }
.card:nth-child(4) { transition-delay: 0.4s; }

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px var(--shadow-color);
}

.card-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--text-secondary);
  line-height: 1.625;
}

.about-actions {
  margin-top: 4rem;
  text-align: center;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

/* Кнопки */
.btn-primary {
  display: inline-block;
  background-color: var(--accent-iron);
  color: var(--bg-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--accent-iron-dark);
  transform: scale(1.05);
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  border: var(--border-width) solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: scale(1.05);
}

.hero-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Catalog Styles */
.catalog-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.5rem;
}

.filters-sidebar {
  background-color: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 1rem;
  padding: 1.75rem;
  height: fit-content;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.filters-sidebar::-webkit-scrollbar {
  width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
  background: var(--bg-surface);
  border-radius: 3px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
  background: var(--accent-iron);
  border-radius: 3px;
}

.filter-group {
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-group h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.filter-option {
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.filter-option input {
  cursor: pointer;
  accent-color: var(--accent-cyan);
}

.filter-option label {
  cursor: pointer;
  color: var(--text-secondary);
}

.filter-search {
  width: 100%;
  padding: 0.4rem 0.6rem;
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.filter-search::placeholder {
  color: var(--text-muted);
}

.filter-options {
  max-height: 200px;
  overflow-y: auto;
}

.filter-options::-webkit-scrollbar {
  width: 4px;
}

.filter-group.collapsed .filter-options {
  display: none;
}

.filter-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-toggle:hover {
  color: var(--accent-cyan);
}

.filter-arrow {
  transition: transform 0.2s;
}

.filter-group.collapsed .filter-arrow {
  transform: rotate(-90deg);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background-color: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 0 20px var(--shadow-color);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.product-manufacturer {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-name {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.specs-list {
  flex-grow: 1;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.specs-list span {
  display: block;
  margin-bottom: 0.25rem;
}

.product-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.btn-compare {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background: transparent;
  border: var(--border-width) solid var(--border-color);
  color: var(--text-primary);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-compare:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.sort-select {
  padding: 0.6rem 1.2rem;
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 0.75rem;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-info {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0 0.75rem;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.page-btn.active {
  background: var(--accent-iron);
  border-color: var(--accent-iron);
  color: var(--bg-primary);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  margin: 0 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.per-page-select {
  padding: 0.4rem 0.8rem;
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: 1rem;
}

/* Product Detail Styles */
.product-detail-container {
  max-width: 1400px;
  margin: 100px auto 2rem;
  padding: 2rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: all 0.3s;
}

.back-button:hover {
  border-color: var(--accent-cyan);
  transform: translateX(-5px);
}

.product-detail-card {
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 1.5rem;
  overflow: hidden;
  width: 100%;
}

.product-detail-header {
  background: linear-gradient(135deg, var(--accent-iron) 0%, var(--accent-iron-dark) 100%);
  padding: 2rem;
  color: var(--bg-primary);
}

.product-detail-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.product-detail-header .manufacturer {
  font-size: 1rem;
  opacity: 0.9;
}

.product-detail-content {
  padding: 2rem;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
}

.specs-section {
  background: var(--bg-surface);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: all 0.3s;
  height: auto;
  min-height: fit-content;
}

.specs-section:hover {
  box-shadow: 0 0 15px var(--shadow-color);
}

.specs-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-cyan);
  display: inline-block;
}

.specs-table {
  width: 100%;
}

.specs-row {
  display: flex;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.specs-label {
  width: 40%;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.specs-value {
  width: 60%;
  color: var(--text-primary);
  font-size: 0.9rem;
  word-break: break-word;
}

/* Иконки */
.power-icons, .fan-icons, .video-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
}

.power-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.75rem;
  transition: all 0.3s;
  min-width: 85px;
  flex: 0 0 auto;
}

.power-icon img,
.fan-icon img,
.video-icon img {
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.power-icon[data-type="1x8"] img {
  width: 119px;
  height: 97px;
}

.power-icon[data-type="2x8"] img {
  width: 230px;
  height: 97px;
}

.power-icon[data-type="3x8"] img {
  width: 300px;
  height: 93px;
}

.power-icon[data-type="6pin"] img {
  width: 128px;
  height: 97px;
}

.power-icon[data-type="12v"] img {
  width: 170px;
  height: 110px;
}

.power-icon:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  box-shadow: 0 5px 15px var(--shadow-color);
}

.power-icon span {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 500;
  text-align: center;
}

.fan-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.75rem;
  transition: all 0.3s;
  margin: 0 auto;
}

.fan-icon img {
  width: 150px;
  height: 56px;
  object-fit: contain;
}

.fan-icon:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  box-shadow: 0 5px 15px var(--shadow-color);
}

.fan-icon span {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 500;
  text-align: center;
}

.video-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.75rem;
  transition: all 0.3s;
  min-width: 85px;
  flex: 0 0 auto;
}

.video-icon img {
  width: 190px;
  height: 80px;
  object-fit: contain;
}

.video-icon:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  box-shadow: 0 5px 15px var(--shadow-color);
}

.video-icon span {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 500;
  text-align: center;
}

/* Бейджи */
.badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
  margin: 0.2rem;
}

.badge-blue {
  background: rgba(103, 232, 249, 0.15);
  color: var(--accent-cyan);
}

.badge-gray {
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Ссылки на магазины */
.product-links {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.product-links h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.6rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.product-link:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  background: var(--bg-surface);
}

.not-available {
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
  font-size: 0.85rem;
}

.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10001;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 1.5rem;
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow: hidden;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.modal-close:hover {
  color: var(--accent-cyan);
}

.modal-body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.modal-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.modal-btn-primary {
  background: var(--accent-iron);
  border: none;
  color: var(--bg-primary);
}

.modal-btn-primary:hover {
  background: var(--accent-iron-dark);
  transform: translateY(-2px);
}

.modal-btn-secondary {
  background: transparent;
  border: var(--border-width) solid var(--border-color);
  color: var(--text-primary);
}

.modal-btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Форма предложения товара */
.suggest-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input, .form-group select, .form-group textarea {
  padding: 0.6rem;
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.success-message {
  text-align: center;
  padding: 2rem;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 0.5rem;
}

.error-message {
  text-align: center;
  padding: 2rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 0.5rem;
}

/* Панель сравнения */
.compare-bar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 3rem;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
  cursor: pointer;
}

.compare-bar:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.compare-count {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  border-radius: 9999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Кнопка предложения товара */
.suggest-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 3rem;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
  cursor: pointer;
  font-size: 0.85rem;
}

.suggest-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Анимация подсветки */
@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 3px var(--accent-cyan), 0 4px 20px rgba(0, 0, 0, 0.3); }
  100% { transform: scale(1); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); }
}

.suggest-btn.highlight {
  animation: pulseGlow 0.5s ease-in-out 3;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--accent-cyan), 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Compare page styles */
.compare-container {
  max-width: 1400px;
  margin: 100px auto 2rem;
  padding: 2rem;
}

.compare-table-wrapper {
  overflow-x: auto;
  border-radius: 1rem;
  border: var(--border-width) solid var(--border-color);
  background: var(--bg-secondary);
  margin-bottom: 2rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.compare-table th,
.compare-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.compare-table th {
  background: var(--bg-surface);
  font-weight: 600;
  color: var(--text-secondary);
  width: 180px;
  font-size: 0.9rem;
}

.compare-table td {
  color: var(--text-primary);
  font-size: 0.9rem;
  background: var(--bg-secondary);
}

.product-compare-card {
  text-align: center;
  min-width: 220px;
  padding: 1rem;
}

.product-compare-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.product-compare-manufacturer {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  font-weight: 500;
}

.product-category-badge {
  display: inline-block;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.remove-compare {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.4rem 1rem;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.remove-compare:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.value-best {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  color: #22c55e;
  border-radius: 0.5rem;
  padding: 0.3rem 0.6rem;
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
}

.value-diff {
  background: rgba(239, 68, 68, 0.08);
  border-radius: 0.5rem;
  padding: 0.3rem 0.6rem;
  display: inline-block;
}

.value-normal {
  padding: 0.3rem 0.6rem;
  display: inline-block;
}

.empty-cell {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  background: var(--bg-surface);
}

.add-product-cell {
  text-align: center;
  vertical-align: middle;
  background: var(--bg-surface);
}

.add-product-btn {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.add-product-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.empty-state {
  text-align: center;
  padding: 4rem;
  background: var(--bg-secondary);
  border-radius: 1rem;
  border: var(--border-width) solid var(--border-color);
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.performance-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-align: center;
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropdown:hover .dropdown-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background-color: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 0.75rem;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 10000;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  transform: translateY(-10px);
}

.dropdown-menu > div {
  padding: 0.5rem;
}

.dropdown-item {
  display: block;
  padding: 0.625rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background-color: var(--bg-surface) !important;
  color: var(--accent-cyan) !important;
}

.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem 0;
  font-weight: 500;
  transition: color 0.2s;
}

.dropdown-arrow {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s;
}

/* Compare list item */
.compare-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.compare-list-item:last-child {
  border-bottom: none;
}

.compare-item-info {
  flex: 1;
}

.compare-item-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.compare-item-category {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.empty-compare {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding-top: 120px;
  }
  
  .catalog-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .filters-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .product-detail-container {
    padding: 1rem;
    margin-top: 80px;
  }
  
  .specs-grid {
    grid-template-columns: 1fr;
  }
  
  .specs-row {
    flex-direction: column;
  }
  
  .specs-label, .specs-value {
    width: 100%;
  }
  
  .specs-label {
    margin-bottom: 0.25rem;
  }
  
  .power-icon[data-type="2x8"] img {
    width: 56px;
    height: 56px;
  }
  
  .power-icon[data-type="3x8"] img {
    width: 70px;
    height: 70px;
  }
  
  .fan-icon img, .video-icon img {
    width: 40px;
    height: 40px;
  }
  
  .power-icon, .fan-icon, .video-icon {
    min-width: 70px;
    padding: 0.5rem;
  }
  
  .product-link {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .compare-container {
    padding: 1rem;
    margin-top: 80px;
  }
  
  .compare-table th,
  .compare-table td {
    padding: 0.75rem;
  }
  
  .product-compare-card {
    min-width: 180px;
  }
  
  header > div {
    flex-direction: column;
    text-align: center;
  }
  
  nav {
    justify-content: center;
  }
  
  .dropdown-menu {
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 260px;
  }
  
  .dropdown:hover .dropdown-menu {
    transform: translateX(-50%) translateY(0) !important;
  }
  
  .suggest-btn {
    bottom: 80px;
  }
}

@media (max-width: 480px) {
  .power-icons, .fan-icons, .video-icons {
    gap: 0.5rem;
  }
  
  .power-icon[data-type="2x8"] img {
    width: 48px;
    height: 48px;
  }
  
  .power-icon[data-type="3x8"] img {
    width: 60px;
    height: 60px;
  }
  
  .power-icon, .fan-icon, .video-icon {
    min-width: 60px;
  }
}

html {
  scroll-behavior: smooth;
}

.specs-row:has(.fan-icon) .specs-value {
  text-align: center;
}
/* Кнопка управления частицами */
.particles-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-color);
  border-radius: 3rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
  cursor: pointer;
  font-size: 1.25rem;
}

.particles-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
  background: var(--bg-surface);
}

/* Адаптация под мобильные устройства */
@media (max-width: 768px) {
  .particles-toggle {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
/* Кнопка управления частицами - дополнительные стили */
#particles-toggle {
  transition: all 0.2s ease;
}

#particles-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
  background: var(--bg-surface);
}
