#khodovka-search {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}
#khodovka-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #888;
  z-index: 10;
  display: none;
}
.khodovka-suggestion-item {
  padding: 6px 10px;
  cursor: pointer;
}
.khodovka-suggestion-item:hover {
  background: #f5f5f5;
  color: #222;
}
.khodovka-suggestion-empty {
  padding: 6px 10px;
  color: #888;
}
#khodovka-search-block {
  max-width: 400px;
  margin: 20px auto;
  position: relative;
}
.khodovka-title {
  text-align: center;
  margin-bottom: 24px;
  margin-top: 24px;
  color: #222;
}
.khodovka-model-block {
  border: none;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(34,34,34,0.07);
  overflow: hidden;
}
.khodovka-model-title {
  font-weight: 900;
  font-size: 1.15rem;
  color: #222;
  background: #f5f5f5;
  padding: 14px 18px 10px 18px;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 12px 12px 0 0;
  letter-spacing: 0.01em;
}
.khodovka-section {
  padding: 12px 18px;
  background: #fafafa;
  color: #222;
  font-size: 1rem;
  font-weight: 300;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.khodovka-section:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}
.khodovka-section:hover {
  background: #f0f0f0;
  color: #222;
}
.khodovka-loading {
  text-align: center;
  padding: 16px;
  color: #888;
}
#khodovka-result-block {
  margin-top: 24px;
}
.wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}
.khodovka-brand-table-wrap {
  display: flex;
  justify-content: center;
}
.khodovka-brand-table {
  border-collapse: collapse;
  min-width: 340px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(34,34,34,0.04);
}
.khodovka-brand-table th, .khodovka-brand-table td {
  border: 1.5px solid #222;
  padding: 12px 18px;
  text-align: center;
  font-size: 1rem;
}
.khodovka-brand-table th {
  background: #f5f5f5;
  color: #222;
  font-weight: 700;
}
.khodovka-brand-table td {
  background: #fff;
}
.khodovka-popup {
  position: absolute;
  min-width: 220px;
  background: #fff;
  border: 2px solid #222;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(34,34,34,0.13);
  padding: 16px 20px 14px 20px;
  z-index: 1000;
  color: #222;
  animation: fadeIn .18s;
}
.khodovka-popup-title {
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
  font-size: 1.08rem;
}
.khodovka-popup-list {
  margin: 0;
  padding: 0 0 0 16px;
  list-style: disc;
}
.khodovka-popup-list li {
  margin-bottom: 4px;
  font-size: 0.98rem;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.khodovka-brand-link {
  color: #222;
  text-decoration: none;
  font-weight: 300;
  transition: color 0.18s;
}
.khodovka-brand-link:hover {
  color: #888;
  text-decoration: underline;
}

.khodovka-popup-title {
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 6px;
}
.khodovka-popup-table td {
  font-weight: 700;
}
.khodovka-brand-table {
  width: 100%;
  border-collapse: collapse;
}
.khodovka-brand-table th {
  text-align: center;
  background-color: #f8f9fa;
  padding: 12px 8px;
  border: 1px solid #dee2e6;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.khodovka-brand-table th[data-sort]:hover {
  background-color: #e9ecef;
}
.khodovka-brand-table th[data-sort]::after {
  content: '↕';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #6c757d;
}
.khodovka-brand-table th.sort-asc::after {
  content: '↑';
  color: #9d0034;
}
.khodovka-brand-table th.sort-desc::after {
  content: '↓';
  color: #9d0034;
}
.khodovka-brand-table td {
  text-align: center;
  padding: 12px 8px;
  border: 1px solid #dee2e6;
  vertical-align: middle;
}
.khodovka-brand-link {
  color: #9d0034;
  text-decoration: none;
  font-weight: 500;
}
.khodovka-brand-link:hover {
  text-decoration: underline;
}
.in-stock {
  color: #28a745;
  font-weight: 600;
}
.out-of-stock {
  color: #dc3545;
  font-weight: 600;
}
.price {
  font-weight: 600;
  color: #495057;
}
.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.quantity-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ced4da;
  background-color: #fff;
  color: #495057;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quantity-btn:hover {
  background-color: #e9ecef;
}
.quantity-btn:active {
  background-color: #dee2e6;
}
.quantity-input {
  width: 50px;
  height: 30px;
  text-align: center;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}
.quantity-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.quantity-input[type=number] {
  -moz-appearance: textfield;
}
.add-to-cart-btn {
  background-color: #9d0034;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}
.add-to-cart-btn:hover {
  background-color: #7a0028;
}
.add-to-cart-btn:active {
  background-color: #5a001e;
}
.go-to-cart-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}
.go-to-cart-btn:hover {
  background-color: #218838;
}
.go-to-cart-btn:active {
  background-color: #1e7e34;
}
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}
.notification-success {
  background-color: #28a745;
  color: white;
}
.notification-error {
  background-color: #dc3545;
  color: white;
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Адаптивные стили для планшетов */
@media (max-width: 768px) {
  .khodovka-brand-table {
    min-width: 100%;
    font-size: 14px;
  }
  
  .khodovka-brand-table th,
  .khodovka-brand-table td {
    padding: 8px 6px;
    font-size: 13px;
  }
  
  .khodovka-brand-table th[data-sort]::after {
    right: 4px;
    font-size: 10px;
  }
  
  .quantity-controls {
    gap: 3px;
  }
  
  .quantity-btn {
    width: 25px;
    height: 25px;
    font-size: 14px;
  }
  
  .quantity-input {
    width: 40px;
    height: 25px;
    font-size: 12px;
  }
  
  .add-to-cart-btn,
  .go-to-cart-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 480px) {
  .khodovka-brand-table-wrap {
    overflow-x: auto;
    justify-content: flex-start;
  }
  
  .khodovka-brand-table {
    min-width: 600px;
    font-size: 12px;
  }
  
  .khodovka-brand-table th,
  .khodovka-brand-table td {
    padding: 6px 4px;
    font-size: 11px;
  }
  
  /* Скрываем столбцы "Страна" и "Тип" на мобильных */
  .khodovka-brand-table th[data-sort="country"],
  .khodovka-brand-table th[data-sort="type"],
  .khodovka-brand-table td:nth-child(2),
  .khodovka-brand-table td:nth-child(3) {
    display: none;
  }
  
  /* Упрощаем контролы количества - убираем кнопки + и - */
  .quantity-controls {
    flex-direction: column;
    gap: 2px;
  }
  
  .quantity-btn {
    display: none;
  }
  
  .quantity-input {
    width: 35px;
    height: 22px;
    font-size: 11px;
    border-radius: 2px;
  }
  
  .add-to-cart-btn,
  .go-to-cart-btn {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 3px;
  }
  
  .khodovka-brand-table th[data-sort]::after {
    right: 2px;
    font-size: 8px;
  }
  
  .price {
    font-size: 10px;
  }
  
  .in-stock,
  .out-of-stock {
    font-size: 10px;
  }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 360px) {
  .khodovka-brand-table {
    min-width: 500px;
    font-size: 10px;
  }
  
  .khodovka-brand-table th,
  .khodovka-brand-table td {
    padding: 4px 2px;
    font-size: 10px;
  }
  
  .quantity-input {
    width: 30px;
    height: 20px;
    font-size: 10px;
  }
  
  .add-to-cart-btn,
  .go-to-cart-btn {
    padding: 3px 6px;
    font-size: 9px;
  }
}
