.sub-header {
    border-bottom: none;
}

#desc-wrapper {
  position: relative;
  max-height: 3.7em; /* 3 lines × 1.2 line-height */
  overflow: hidden;
  transition: max-height 0.5s ease;
}

#desc-wrapper.expanded{
    max-height: 1000px; /* Remove the limit when extended */
}

#desc-text {

  line-height: 1.2em;

}

.input-icon-wrapper{
  margin-bottom: 10px;
}

#toggle-desc-button-close{
    display: none;
}

.carousel-item.active{
    transition: transform .4s ease !important;
}

.add_to_basket_form .btn{
  background-color: var(--color-primary-seconday) !important;
}

/* Скрыть navbar-details на странице товара */
body:has(.product_page) .navbar-details {
  display: none !important;
}

#product_gallery .carousel-inner > .carousel-item{
  line-height: 0 !important;
}

/* Уменьшить размер блока галереи */
#product_gallery.img-thumbnail {
  max-width: 500px; /* или другое значение */
  width: 100%;
}

#product_gallery .carousel-inner > .carousel-item > img {
  max-height: 500px;
  width: auto;
  object-fit: contain;
}

.product_page .row .col-sm-6.product_main {
  width: 60% !important;

  @media (max-width: 900px) {
    width: 100% !important;
  }
}

.product_page .row .col-sm-6.product_col_gallery {
  width: 35% !important;
  max-width: 35% !important;

  @media (max-width: 900px) {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.product-product-title-product-page{
  font-size: 2rem !important;
}

/* ===== Єдині CTA-кнопки на сторінці товару =====
   Логіка: залита кольором + білий текст/іконка; на hover інверсія —
   білий фон, колір повертається в текст/іконку/рамку. Однаковий розмір. */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 8px 16px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.cta-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* orange: "Повідомити мене", "Додати в кошик" */
.cta-btn--orange {
  background: var(--color-primary-seconday);
  border-color: var(--color-primary-seconday);
  color: #fff;
}
.cta-btn--orange svg { stroke: #fff; }
.cta-btn--orange:hover,
.cta-btn--orange:focus {
  background: #fff;
  color: var(--color-primary-seconday);
}
.cta-btn--orange:hover svg,
.cta-btn--orange:focus svg { stroke: var(--color-primary-seconday); }

/* red: "Додати до списку бажань" (із сердечком ♥) */
.cta-btn--red {
  background: #e11d1d;
  border-color: #e11d1d;
  color: #fff;
}
.cta-btn--red::before {
  content: "\2665"; /* heart */
  font-size: 15px;
  line-height: 1;
}
.cta-btn--red:hover,
.cta-btn--red:focus {
  background: #fff;
  color: #e11d1d;
}

/* приховуємо bootstrap-каретку в dropdown-варіанті вішлиста */
.btn-wishlist .dropdown-toggle::after { display: none; }
.btn-wishlist .dropdown-menu { border-radius: 8px; }

/* ===== Сіра панель дій (in-stock і out-of-stock) ===== */
.cta-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
  margin-top: 10px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 12px;
}

.oos-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: #c0392b; /* акцент "немає в наявності" */
}

.oos-text {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.45;
}

/* форма без власного боксу: порожня форма (кількість прихована) не створює
   зайвої смуги зверху панелі → відступи зверху/знизу однакові */
.cta-form {
  display: contents;
}
.cta-form .form-control,
.cta-form input[type="email"],
.cta-form input[type="text"] {
  width: 100%;
}

/* кнопки в один ряд, однаковий розмір, без переносу тексту */
.cta-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.cta-actions > * {
  flex: 1 1 200px;
  min-width: 215px;
  margin: 0;
}
.cta-actions .btn-wishlist {
  display: flex;
}
.cta-actions .btn-wishlist .cta-btn {
  width: 100%;
}

/* ===== Лічильник кількості на сторінці товару ===== */
.cta-qty {
  display: inline-flex;
  align-items: stretch;
  height: 44px;
  border: 1px solid #d9dce1;
  border-radius: 8px;
  overflow: hidden;
  width: max-content;
}

.cta-qty-btn {
  width: 46px;
  border: none;
  background: #f4f6f8;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: #333;
  cursor: pointer;
  transition: background-color .15s ease;
}
.cta-qty-btn:hover {
  background: #e9edf1;
}

.cta-qty input,
.cta-qty input[type="number"] {
  width: 58px;
  border: none;
  border-left: 1px solid #d9dce1;
  border-right: 1px solid #d9dce1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  padding: 0;
  background: #fff;
  -moz-appearance: textfield;
  appearance: textfield;
}
.cta-qty input::-webkit-outer-spin-button,
.cta-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cta-qty-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: #888;
}

.cta-qty-warning {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #c0392b;
}

.cta-qty-warning[hidden] {
  display: none;
}