/* Иконка корзины в шапке */
.header-right {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 15px;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  padding: 10px;
  color: white;
  font-size: 24px;
  transition: opacity 0.3s;
}

.cart-icon:hover {
  opacity: 0.8;
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #007aff;
  color: white;
  font-size: 12px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Заголовок страницы */
.page-title {
  color: white;
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .header-right {
    margin-right: 10px;
  }
  .cart-icon {
    font-size: 20px;
  }
  .page-title {
    font-size: 26px;
    margin-bottom: 25px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 22px;
  }
}

.back-button {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  margin-right: 15px;
  padding: 8px;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .back-button {
    font-size: 20px;
    margin-right: 5px;
  }
}

/* Модальное окно детального просмотра */
.product-detail-modal .modal-content {
  max-width: 900px;
  width: 90%;
  background: #1e1e1e;
  border-radius: 20px;
  overflow: hidden;
}

.product-detail-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #2a2a2a;
  border-bottom: 1px solid #3a3a3a;
}

.product-detail-modal .modal-header h3 {
  margin: 0;
  color: white;
  font-size: 1.3rem;
  font-weight: 500;
}

.modal-back {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.modal-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.product-detail-body {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  gap: 30px;
}

.product-detail-image {
  flex: 1 1 300px;
  max-width: 400px;
  margin: 0 auto;
}

.product-detail-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.product-detail-info {
  flex: 1 1 300px;
  color: white;
}

.product-detail-info h4 {
  font-size: 1.8rem;
  margin: 0 0 15px 0;
  color: #fff;
}

.product-detail-description {
  font-size: 1rem;
  line-height: 1.5;
  color: #ccc;
  margin-bottom: 20px;
  white-space: pre-line;
}

.product-detail-price {
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffd700;
  margin-bottom: 25px;
}

#detailAddToCart {
  width: 100%;
  padding: 15px;
  font-size: 1.2rem;
  background: #007aff;
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

#detailAddToCart:hover {
  background: #005bb5;
}

@media (max-width: 768px) {
  .product-detail-body {
    flex-direction: column;
    gap: 20px;
  }

  .product-detail-image {
    max-width: 100%;
  }

  .product-detail-info h4 {
    font-size: 1.5rem;
  }

  .product-detail-price {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .product-detail-modal .modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .product-detail-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
  }

  .product-detail-image {
    max-width: 100%;
    margin-bottom: 15px;
  }

  .product-detail-info h4 {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }

  .product-detail-description {
    font-size: 0.95rem;
  }

  .product-detail-price {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  #detailAddToCart {
    padding: 16px;
    font-size: 1.2rem;
    border-radius: 30px;
  }
}

.modal-back,
.modal-close,
#detailAddToCart {
  touch-action: manipulation;
}
/* Блок дополнительной информации под каталогом */
.catalog-more-info {
  background: #000; /* чёрный фон */
  border-radius: 0; /* убираем скругление, если не нужно */
  padding: 30px 20px;
  margin: 40px auto 20px;
  max-width: 900px;
  text-align: center;
  color: #fff;
  box-shadow: none; /* убираем тень */
}

.catalog-more-info h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #007aff; /* синий заголовок */
}

.catalog-more-info p {
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 10px 0;
  color: #ddd;
}

.contact-info-block {
  margin-top: 25px;
  padding-top: 20px;
  /* border-top убран */
}

.contact-phone {
  margin: 15px 0;
  font-size: 1.6rem;
  font-weight: 600;
}

.contact-phone i {
  margin-right: 10px;
  color: #007aff;
}

.contact-phone a {
  color: #fff;
  text-decoration: none;
}

.contact-phone a:hover {
  color: #007aff;
}

.contact-messengers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.contact-messengers span {
  color: #ccc;
  font-size: 1rem;
}

.contact-messengers a {
  color: #fff;
  font-size: 2rem;
  transition:
    color 0.3s,
    transform 0.2s;
  line-height: 1;
}

.contact-messengers a:hover {
  color: #007aff;
  transform: scale(1.1);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .catalog-more-info {
    padding: 20px 15px;
    margin: 30px 10px 10px;
  }

  .catalog-more-info h3 {
    font-size: 1.5rem;
  }

  .catalog-more-info p {
    font-size: 1rem;
  }

  .contact-phone {
    font-size: 1.4rem;
  }

  .contact-messengers a {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .contact-messengers {
    gap: 10px;
  }

  .contact-messengers span {
    width: 100%;
    margin-bottom: 5px;
  }
}
/* Синие кнопки "В корзину" как на элитных памятниках */
.add-to-cart-small {
  background-color: #007aff; /* синий */
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  box-sizing: border-box;
}

.add-to-cart-small:hover {
  background-color: #005bb5; /* темно-синий при наведении */
}

/* Выравнивание кнопок по нижнему краю карточек */
.catalog-item {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.catalog-item .catalog-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.catalog-item .add-to-cart-small {
  margin-top: auto; /* прижимает кнопку к низу */
}
