/* ===========================
   HUB PRODUCTS STYLES
   ========================== */

/* Hub Application Selector */
.hub-applications-selector {
  margin-bottom: 20px;
}

.hub-applications-selector .product__system-selector-title {
  width: 100%;
}
.product__system-selector-title p {
  font-size: 16px !important;
}

.hub-applications-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  background-color: #F4F4F4;
  border-radius: 10px;
  padding: 16px;
}

/* Hub Application Button */
.hub-app-button, .hub-sub-option-button {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  background: #ffffff;
  color: #000;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.hub-app-button {
  width: 32%;
}
/* Если есть disabled кнопка, активные кнопки становятся шире */
.hub-applications-buttons:has(.hub-app-button.disabled) .hub-app-button:not(.disabled) {
  width: 48%;
}

.hub-sub-option-button {
  width: 100%;
}

.hub-app-button:hover, .hub-sub-option-button:hover {
  border-color: #155EA0;
  color: #155EA0;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(21, 94, 160, 0.15);
}

.hub-app-button.active, .hub-sub-option-button.active {
  background-color: #CBCBCB;
  color: #000;
}

.hub-app-button.active:hover, .hub-sub-option-button.active:hover {
  color: #ffffff;
}

/* Button Icon */
.hub-app-button-icon, .hub-sub-option-button-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 5px;
}

.hub-app-button-icon img, .hub-sub-option-button-icon img {
  max-width: 20px;
  max-height: 100%;
  object-fit: contain;
  transition: all 0.3s ease;
}

/*.hub-app-button.active .hub-app-button-icon img {*/
/*  filter: brightness(0) invert(1);*/
/*}*/

/* Button Text */
.hub-app-button-text {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

/* Loading state for inactive buttons */
.hub-app-button:not(.active) {
  opacity: 0.7;
}

.hub-app-button.disabled,
.hub-app-button:disabled {
  display: none !important;
}

/* Sub-selection for Boats */
.hub-sub-selection {
  display: none;
}

.hub-sub-selection.active {
  display: flex;
  flex-wrap: wrap;
}

.hub-sub-selection-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
  color: #333333;
}

.hub-sub-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  width: 99%;
}

.hub-sub-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-sub-option-icon img {
  max-width: 20px;
  max-height: 100%;
  object-fit: contain;
}

.hub-sub-option-content {
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hub-sub-option-title {
  font-size: 16px;
  font-weight: 600;
}

.hub-sub-option-description {
  font-size: 12px;
  font-weight: 500;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 5px;
}
.hub-sub-option-description img {
  width: 40px;
}

/* Breadcrumbs loading state */
.breadcrumbs.loading {
  opacity: 0.6;
  position: relative;
}

.breadcrumbs.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 10px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid #D9D9D9;
  border-top: 2px solid #155EA0;
  border-radius: 50%;
  animation: bb-spinner 1s linear infinite;
}

@keyframes bb-spinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===========================
   HUB CONFIGURATIONS STYLES (OFF-GRID)
   ========================== */

/* Configuration Groups Container */
.hub-configurations {

}

.hub-configurations-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Configuration Group */
.hub-configuration-group {
  display: flex;
  align-items: center;
  gap: 40px;
  border-bottom: 1px solid #A4A4A4;
  padding-bottom: 15px;
}
.hub-configuration-group:last-child {
  border: none;
}

.hub-configuration-group-header {
  display: flex;
  flex-direction: column;
  width: 90px;
  align-items: center;
}

.hub-configuration-group-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hub-configuration-group-icon img {
  max-width: 95px;
  object-fit: contain;
}

.hub-sub-selection[data-app="boats"], 
.hub-sub-selection[data-app="golf_cart"], 
.hub-sub-selection[data-app="rvs"] {
  flex-direction: column;
  width: 100%;
}

.hub-sub-selection[data-app="boats"].active .hub-sub-selection-title, 
.hub-sub-selection[data-app="golf_cart"].active .hub-sub-selection-title, 
.hub-sub-selection[data-app="rvs"].active .hub-sub-selection-title {
  align-self: baseline;  
}

.hub-sub-selection[data-app="boats"].active .hub-configuration-group, 
.hub-sub-selection[data-app="golf_cart"].active .hub-configuration-group, 
.hub-sub-selection[data-app="rvs"].active .hub-configuration-group {
  display: flex;
  gap: 40px;
}
.hub-sub-selection[data-app="boats"].active .hub-configuration-group-header, 
.hub-sub-selection[data-app="golf_cart"].active .hub-configuration-group-header, 
.hub-sub-selection[data-app="rvs"].active .hub-configuration-group-header {
  display: flex;
  flex-direction: column;
  border: none;
}

.hub-sub-selection[data-app="boats"].active .hub-configuration-group-title,
.hub-sub-selection[data-app="golf_cart"].active .hub-configuration-group-title,
.hub-sub-selection[data-app="rvs"].active .hub-configuration-group-title {
  font-size: 14px;
}

.hub-sub-selection[data-app="boats"].active .hub-configuration-buttons,
.hub-sub-selection[data-app="golf_cart"].active .hub-configuration-buttons,
.hub-sub-selection[data-app="rvs"].active .hub-configuration-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
}

/*hub-sub-selection hub-configurations active*/

.hub-configuration-group-title {
  font-size: 14px;
  text-align: center;
  font-weight: 500;
  color: #000000;
  line-height: 1.2;
}

/* Configuration Buttons */
.hub-configuration-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: fit-content;
  flex-wrap: wrap;
  gap: 12px;
}

.hub-configuration-button {
  border: 1px solid #D9D9D9;
  border-radius: 8px;
  background: #ffffff;
  color: #155EA0;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-configuration-button:hover {
  border-color: #155EA0;
  color: #155EA0;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(21, 94, 160, 0.15);
  transform: translateY(-1px);
}

/* Active state - синяя кнопка для текущего товара */
.hub-configuration-button.active {
  border-color: #155EA0;
  background: linear-gradient(135deg, #155EA0 0%, #1a6bb8 100%);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(21, 94, 160, 0.3);
  cursor: default;
  transform: none;
}

.hub-configuration-button.active:hover {
  color: #ffffff;
  transform: none;
  box-shadow: 0 3px 8px rgba(21, 94, 160, 0.3);
}

/* Disabled state */
.hub-configuration-button.disabled,
.hub-configuration-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
}

/* Кнопка с двумя состояниями одновременно (active + disabled) - цвет #155ea0 */
.hub-configuration-button.active.disabled {
  border-color: #155EA0;
  background: #155EA0;
  color: #ffffff;
  opacity: 1;
  cursor: default;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(21, 94, 160, 0.2);
}

.hub-configuration-button.active.disabled:hover {
  color: #ffffff;
  background: #155EA0;
  border-color: #155EA0;
  box-shadow: 0 2px 6px rgba(21, 94, 160, 0.2);
}

/* Focus states for accessibility */
.hub-configuration-button:focus {
  outline: 2px solid #155EA0;
  outline-offset: 2px;
}

/* Animation for smooth transitions */
.hub-configuration-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-configurations.active {
  animation: fadeInUp 0.4s ease-out;
}

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

/* ===========================
   DYNAMIC CONTENT CONTAINERS
   ========================== */

/* Базовые стили для всех динамических контейнеров */
.hub-content-default,
.hub-content-off_grid,
.hub-content-rvs,
.hub-content-boats,
.hub-content-golf_cart {
  width: 100%;
  transition: opacity 0.3s ease-in-out;
}

/* По умолчанию скрыты все контейнеры кроме default */
.hub-content-off_grid,
.hub-content-rvs,
.hub-content-boats,
.hub-content-golf_cart {
  display: none;
}

/* Контейнер по умолчанию виден */
.hub-content-default {
  display: block;
}

/* Анимация появления */
@keyframes hubContentFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.purchase_note .included_components li {
  border: none !important;
  padding: 0 !important;
}

/* ===========================
   RESPONSIVE STYLES
   ========================== */

@media (max-width: 768px) {
  .hub-applications-buttons {
    gap: 10px;
    justify-content: space-between;
  }

  .hub-app-button, .hub-sub-option-button {
    flex-direction: row;
    text-align: left;
  }

  .hub-app-button {
    width: 31%;
    padding: 2px 4px;
  }

  .hub-app-button-icon {
    width: 32px;
    height: 32px;
    margin: 0;
    flex-shrink: 0;
  }

  .hub-app-button-text {
    font-size: 15px;
    font-weight: 400;
  }

  .hub-sub-options {
    grid-template-columns: 1fr;
  }

  .hub-sub-option-title {
    font-size: 15px;
  }

  .hub-sub-option-description {
    font-size: 11px;
  }

  .hub-configurations-groups {
    gap: 20px;
    width: 100%;
  }

  .hub-configuration-group-header {
    display: none;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .hub-configuration-group-icon {
    width: 40px;
    height: 40px;
    margin-right: 12px;
  }

  .hub-configuration-group-title {
    font-size: 16px;
  }

  .hub-configuration-buttons {
    gap: 8px;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }

  .hub-configuration-button {
    padding: 10px 16px;
    font-size: 13px !important;
    min-height: 60px;
    white-space: normal;
  }
}