.product-detail-container {
  max-width: 1200px;
  margin: 50px auto 50px auto;
  padding: 20px;
}
.product-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 32px;
  text-align: center;
}
.product-card-new {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  background: #fff;
  padding: 36px 36px 24px 36px;
  position: relative;
}
.product-images-new {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 320px;
  max-width: none;
  width: 100%;
  flex: 4 1 0; /* увеличено с 2 до 4 */
  position: relative; /* добавлено */
}
.images-flex-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
  position: relative;
}
.additional-images-new {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: flex-start;
  width: auto;
  margin-right: 20px;
}
.additional-img-new {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.2s, transform 0.2s;
  background: #f7f7f7;
}
.additional-img-new.selected {
  border: 2px solid #007bff;
  transform: scale(1.05);
}
.main-image-new {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 0;
  width: 100%;
  height: auto;
  max-width: 800px; /* увеличенная ширина */
  max-height: 600px; /* увеличенная высота */
  overflow: hidden;
  position: relative;
}

.main-image-new img {
  display: block;
  width: 620px;
  height: 500px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 18px;
  background: transparent;
  margin: 0;
  padding: 0;
}
.product-info-new {
  flex: 1 1 0;
  min-width: 180px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 30px;
  margin-top: 0;
  justify-content: flex-end;
  position: relative;
  height: 100%;
  /* убираем position: relative; */
}
.variant-switcher-new {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-end;
  align-items: center;
  position: absolute;
  top: 0;
  right: 0;
  width: auto;
  z-index: 10;
}
.variant-circle-new {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.3s;
  background: #f3f3f3;
  flex-shrink: 0;
}
.variant-circle-new.active {
  border-color: #007BFF;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}

.variant-circle-new:hover {
  opacity: 0.8;
  transform: scale(1.05);
  transition: all 0.2s ease;
}
.variant-circle-new img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  aspect-ratio: 1 / 1;
  object-position: center;
  /* Принудительно делаем изображение квадратным */
  max-width: 100%;
  max-height: 100%;
  min-width: 100%;
  min-height: 100%;
}

/* Дополнительные правила для обеспечения круглой формы */
.variant-circle-new,
.variant-circle-new * {
  box-sizing: border-box;
}

.color-circle-new {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
}
.product-description-center-new {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 36px;
}
.product-description-title-new {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 14px;
  text-align: left;
}
.product-description-new {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  text-align: left;
}
.product-description-block-in-card {
  width: 100%;
  margin-top: 0;
  padding: 24px 32px;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 900px) {
  .product-card-new {
    flex-direction: column;
    gap: 20px;
    padding: 18px 8px 12px 8px;
  }
  .product-images-new {
    min-width: 0;
    max-width: 100vw;
    width: 100%;
  }
  .images-flex-wrap {
    flex-direction: column;
    align-items: center;
    position: static;
  }
  .additional-images-new {
    flex-direction: row;
    margin-right: 0;
    margin-bottom: 12px;
    width: 100%;
    justify-content: center;
    gap: 12px;
  }
  .additional-img-new {
    width: 80px;
    height: 60px;
  }
  .main-image-new,
  .main-image-new img {
    width: 100vw;
    height: auto;
    max-width: 100vw;
    max-height: 60vw;
    background-color: #FFFFFF;
  }
  .product-description-center-new {
    max-width: 100vw;
  }
  .product-description-new {
    max-width: 100vw;
  }
  .product-info-new {
    margin-left: 0;
    max-width: 100%;
    width: 100%;
    align-items: flex-start;
    position: static;
    height: auto;
  }
  .variant-switcher-new {
    position: static;
    flex-direction: row;
    margin-left: 0;
    margin-top: 24px;
    margin-right: 10px;
    margin-bottom: 0;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
  }
  
  .variant-circle-new {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  
  .variant-circle-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-position: center;
    /* Принудительно делаем изображение квадратным */
    max-width: 100%;
    max-height: 100%;
    min-width: 100%;
    min-height: 100%;
  }
  .product-description-block-in-card {
    padding: 16px 8px;
  }
}

.additional-images-carousel-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 150px; /* увеличено */
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 600px;
  position: relative;
  padding: 0 8px; /* чуть больше паддинг */
}

.carousel-images-container-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px; /* чуть больше отступ */
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 500px;
  width: 100%;
  align-items: center;
}

.additional-img-new {
  width: 120px; /* увеличено */
  height: 80px;  /* увеличено */
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.2s, transform 0.2s;
  background: #f7f7f7;
  display: block;
  margin: 0 auto;
}

/* Стили для таблицы размеров */
.product-info-container {
  display: flex;
  margin-top: 0;
  margin-bottom: 0;
  padding: 24px 32px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

.product-parameters-block-in-card {
  flex: 0 0 50%;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  max-width: 50%;
}

.product-sizes-block-in-card {
  flex: 0 0 50%;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  max-width: 50%;
}

/* Стили для списка параметров */
.parameters-list {
  width: 100%;
  margin-top: 16px;
  list-style: none;
  padding: 0;
}

.parameters-list li {
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.parameters-list li:last-child {
  border-bottom: none;
}

.parameter-key {
  font-weight: 500;
  color: #555;
  flex: 1;
}

.parameter-value {
  font-weight: 400;
  color: #333;
  flex: 1;
  text-align: left;
  margin-left: 10px;
}

/* Стили для таблицы размеров */
.sizes-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
}

.sizes-table td {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.sizes-table tr:last-child td {
  border-bottom: none;
}

.size-key {
  font-weight: 500;
  color: #555;
  width: 40%;
  padding-right: 16px;
}

.size-value {
  font-weight: 400;
  color: #333;
  width: 60%;
}

/* Стили для дополнительных размеров */
.additional-sizes-section {
  margin-top: 16px;
}

.additional-sizes-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.additional-sizes-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.additional-sizes-table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 14px 12px;
  text-align: center;
  font-weight: 600;
  color: #495057;
  border: none;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

.additional-sizes-table td {
  padding: 12px 12px;
  text-align: center;
  border: none;
  background: #fff;
  border-bottom: 1px solid #f1f3f4;
  font-size: 0.9rem;
  color: #333;
  transition: background-color 0.15s ease;
}

.additional-sizes-table tr:hover td {
  background: #f8f9fa;
}

.additional-sizes-table tr:last-child td {
  border-bottom: none;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .product-info-container {
    flex-direction: column;
    gap: 24px;
  }
  
  .product-parameters-block-in-card {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
  
  .family-products-grid {
    flex-direction: column;
  }
  
  .family-product-card {
    padding: 14px 20px;
    min-width: 100%;
  }
  
  .family-product-dimensions {
    font-size: 0.9rem;
  }
}

/* Стили для блока с семейством продуктов */
.family-products-section {

}

.family-products-section .product-description-title-new {
  color: #222;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.family-products-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.family-product-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  min-width: 100px;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
}

.family-product-card:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.family-tables-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.family-table-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  min-width: 100px;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
}

.family-table-card:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.family-table-info {
  text-align: center;
}

.family-table-dimensions {
  color: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
}