/* ОЧЕНЬ СПЕЦИФИЧНЫЕ СЕЛЕКТОРЫ ДЛЯ TILDA */
div.js-store-parts-select-container {
  margin-bottom: 30px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
  overflow: visible !important;
}

/* Контейнер для кнопок - десктоп */
div.t-store__parts-switch-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 10px !important;
  background: transparent !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 15px 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

/* Стили для отдельных кнопок-разделов */
button.t-store__parts-switch-btn,
a.t-store__parts-switch-btn,
div.t-store__parts-switch-btn {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  padding: 14px 26px !important;
  background: #ffffff !important;
  border: 2px solid rgba(133, 38, 38, 0.2) !important;
  border-radius: 12px !important;
  color: #852626 !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  position: relative !important;
  overflow: hidden !important;
  font-family: 'Georgia', 'Times New Roman', serif !important;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(133, 38, 38, 0.1) !important;
  text-align: center !important;
  font-size: 16px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  letter-spacing: 0.2px !important;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8) !important;
}

/* Элегантный эффект при наведении */
button.t-store__parts-switch-btn:hover,
a.t-store__parts-switch-btn:hover,
div.t-store__parts-switch-btn:hover {
  background: #fffaf9 !important;
  transform: translateY(-3px) !important;
  border-color: rgba(133, 38, 38, 0.4) !important;
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(133, 38, 38, 0.15) !important;
  color: #701f1f !important;
}

/* Стили для активной кнопки */
button.t-store__parts-switch-btn.t-active,
a.t-store__parts-switch-btn.t-active,
div.t-store__parts-switch-btn.t-active {
  background: linear-gradient(145deg, #852626, #6c1f1f) !important;
  color: #ffffff !important;
  border-color: #852626 !important;
  transform: translateY(-2px) !important;
  box-shadow: 
    0 6px 18px rgba(133, 38, 38, 0.3),
    0 2px 6px rgba(133, 38, 38, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

button.t-store__parts-switch-btn.t-active:hover,
a.t-store__parts-switch-btn.t-active:hover,
div.t-store__parts-switch-btn.t-active:hover {
  background: linear-gradient(145deg, #6c1f1f, #5a1919) !important;
  border-color: #6c1f1f !important;
  transform: translateY(-3px) !important;
  box-shadow: 
    0 8px 22px rgba(133, 38, 38, 0.35),
    0 3px 8px rgba(133, 38, 38, 0.25) !important;
}

/* Эффект свечения для активной кнопки */
button.t-store__parts-switch-btn.t-active::before,
a.t-store__parts-switch-btn.t-active::before,
div.t-store__parts-switch-btn.t-active::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  border-radius: 10px !important;
  box-shadow: 
    0 0 15px rgba(133, 38, 38, 0.4),
    inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
  z-index: -1 !important;
  animation: pulseGlow 2s infinite alternate !important;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 
      0 0 10px rgba(133, 38, 38, 0.3),
      inset 0 0 15px rgba(255, 255, 255, 0.05) !important;
  }
  100% {
    box-shadow: 
      0 0 20px rgba(133, 38, 38, 0.5),
      inset 0 0 25px rgba(255, 255, 255, 0.15) !important;
  }
}

/* Декоративный элемент для активной кнопки */
button.t-store__parts-switch-btn.t-active::after,
a.t-store__parts-switch-btn.t-active::after,
div.t-store__parts-switch-btn.t-active::after {
  content: '' !important;
  position: absolute !important;
  bottom: 6px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 40px !important;
  height: 3px !important;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.8), 
    rgba(255, 255, 255, 1), 
    rgba(255, 255, 255, 0.8)) !important;
  border-radius: 2px !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6) !important;
}

/* МОБИЛЬНАЯ ВЕРСИЯ - ИСПРАВЛЕНА ВЫЛЕЗАНИЕ ЗА ПРЕДЕЛЫ */
@media screen and (max-width: 767px) {
  div.js-store-parts-select-container {
    margin-bottom: 25px !important;
    padding: 0 12px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  
  div.t-store__parts-switch-wrapper {
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
    border-radius: 12px !important;
    padding: 10px 0 !important;
    border: none !important;
    box-shadow: none !important;
    gap: 10px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  
  .t-store__parts-item {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  
  .t-store__parts-item-title {
    display: inline-block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.3 !important;
  }
  
  button.t-store__parts-switch-btn,
  a.t-store__parts-switch-btn,
  div.t-store__parts-switch-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 16px 20px !important;
    border-radius: 12px !important;
    border: 2px solid rgba(133, 38, 38, 0.25) !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    background: #ffffff !important;
    color: #852626 !important;
    transition: all 0.3s ease !important;
    min-height: 54px !important;
    height: auto !important;
    box-shadow: 
      0 3px 8px rgba(0, 0, 0, 0.08),
      0 1px 3px rgba(133, 38, 38, 0.1) !important;
    position: relative !important;
    float: none !important;
    clear: both !important;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8) !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.3 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  
  /* Обеспечиваем правильное отображение длинных текстов */
  .js-store-parts-switcher {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* Эффект при наведении на мобильных */
  button.t-store__parts-switch-btn:hover,
  a.t-store__parts-switch-btn:hover,
  div.t-store__parts-switch-btn:hover {
    background: #fffaf9 !important;
    transform: translateY(-2px) !important;
    border-color: rgba(133, 38, 38, 0.4) !important;
    box-shadow: 
      0 5px 12px rgba(0, 0, 0, 0.1),
      0 2px 4px rgba(133, 38, 38, 0.15) !important;
  }
  
  /* Эффект при нажатии на мобильных */
  button.t-store__parts-switch-btn:active,
  a.t-store__parts-switch-btn:active,
  div.t-store__parts-switch-btn:active {
    background: #f5f5f5 !important;
    transform: scale(0.98) !important;
    border-color: rgba(133, 38, 38, 0.35) !important;
    box-shadow: 
      0 2px 6px rgba(0, 0, 0, 0.05),
      0 1px 2px rgba(133, 38, 38, 0.08) !important;
  }
  
  /* Активная кнопка в мобильной версии */
  button.t-store__parts-switch-btn.t-active,
  a.t-store__parts-switch-btn.t-active,
  div.t-store__parts-switch-btn.t-active {
    background: linear-gradient(145deg, #852626, #6c1f1f) !important;
    color: #ffffff !important;
    border-color: #852626 !important;
    transform: translateY(-1px) !important;
    box-shadow: 
      0 6px 16px rgba(133, 38, 38, 0.25),
      0 3px 8px rgba(133, 38, 38, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  }
  
  button.t-store__parts-switch-btn.t-active:hover,
  a.t-store__parts-switch-btn.t-active:hover,
  div.t-store__parts-switch-btn.t-active:hover {
    background: linear-gradient(145deg, #6c1f1f, #5a1919) !important;
    transform: translateY(-2px) !important;
  }
  
  button.t-store__parts-switch-btn.t-active:active,
  a.t-store__parts-switch-btn.t-active:active,
  div.t-store__parts-switch-btn.t-active:active {
    background: linear-gradient(145deg, #5a1919, #4a1414) !important;
    transform: scale(0.98) !important;
  }
  
  /* Упрощенный эффект свечения для мобильных */
  button.t-store__parts-switch-btn.t-active::before,
  a.t-store__parts-switch-btn.t-active::before,
  div.t-store__parts-switch-btn.t-active::before {
    animation: none !important;
    box-shadow: 
      0 0 8px rgba(133, 38, 38, 0.3),
      inset 0 0 10px rgba(255, 255, 255, 0.08) !important;
  }
  
  /* Нижняя линия для мобильной версии */
  button.t-store__parts-switch-btn.t-active::after,
  a.t-store__parts-switch-btn.t-active::after,
  div.t-store__parts-switch-btn.t-active::after {
    bottom: 6px !important;
    width: 32px !important;
    height: 3px !important;
    background: linear-gradient(90deg, 
      rgba(255, 255, 255, 0.6), 
      rgba(255, 255, 255, 0.8), 
      rgba(255, 255, 255, 0.6)) !important;
  }
  
  /* Для очень маленьких экранов */
  @media screen and (max-width: 360px) {
    div.js-store-parts-select-container {
      padding: 0 8px !important;
    }
    
    button.t-store__parts-switch-btn,
    a.t-store__parts-switch-btn,
    div.t-store__parts-switch-btn {
      padding: 14px 16px !important;
      font-size: 14px !important;
      min-height: 50px !important;
    }
    
    .t-store__parts-switch-wrapper {
      gap: 8px !important;
    }
  }
}

/* Планшетная версия */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  div.js-store-parts-select-container {
    padding: 0 20px !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  div.t-store__parts-switch-wrapper {
    gap: 8px !important;
    padding: 12px 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }
  
  button.t-store__parts-switch-btn,
  a.t-store__parts-switch-btn,
  div.t-store__parts-switch-btn {
    padding: 13px 22px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
    max-width: calc(100% - 4px) !important;
  }
}

/* Десктопная версия */
@media screen and (min-width: 1024px) {
  div.t-store__parts-switch-wrapper {
    gap: 12px !important;
    padding: 20px 0 !important;
  }
  
  button.t-store__parts-switch-btn,
  a.t-store__parts-switch-btn,
  div.t-store__parts-switch-btn {
    padding: 14px 30px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
  }
}

/* Для очень больших экранов */
@media screen and (min-width: 1200px) {
  div.js-store-parts-select-container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Анимация появления кнопок */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.t-store__parts-switch-btn {
  animation: fadeInUp 0.4s ease backwards;
}

.t-store__parts-switch-btn:nth-child(1) { animation-delay: 0.1s; }
.t-store__parts-switch-btn:nth-child(2) { animation-delay: 0.2s; }
.t-store__parts-switch-btn:nth-child(3) { animation-delay: 0.3s; }
.t-store__parts-switch-btn:nth-child(4) { animation-delay: 0.4s; }
.t-store__parts-switch-btn:nth-child(5) { animation-delay: 0.5s; }