button.add-to-cart.in-cart {
    background-color: transparent !important;
    border: none !important;
    color: blue;
    text-decoration: underline dotted;
    font-size: 1.35rem;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    outline: none; /* убираем обводку */
    box-shadow: none !important;
}

button.add-to-cart.in-cart:hover {
    color: orange;
    text-decoration: underline dotted;
    cursor: pointer;
    outline: none;
    box-shadow: none !important;
}

button.add-to-cart.in-cart:focus {
    outline: none;
    border: none !important;
    box-shadow: none !important;
}
.product-description-block {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
}

.product-description {
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}
.thumb-gallery {
  list-style: none;
  padding: 0;
  margin: 0;
}

.thumb-img {
  height: 70px;
  width: auto;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.thumb-img:hover {
  border-color: #007bff;
}

.specs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    text-align: end;
}
.specs-list li {
  display: flex;
  margin-bottom: 8px;
}
.specs-list-full {
  list-style: none;
  padding: 0;
  margin: 0;
    font-size: 14px;
    text-align: end;
}

.specs-list-full li {
  display: flex;
  margin-bottom: 8px;
}

.spec-name {
  white-space: nowrap;
}

.spec-dots {
  flex-grow: 1;
  border-bottom: 1px dotted #ccc;
  /*margin: 0 8px;*/
}

@media (max-width: 768px) {
    .title {
        font-size: 1.2rem;
    }
    .product-description h1 {
        font-size: 1.2rem;
    }
  .img-big-wrap img {
    width: 100%;
    height: auto; /* Чтобы сохранять пропорции и не растягивалось по вертикали */
    object-fit: contain; /* или cover — пробуй, что лучше */
  }

  .thumb-gallery {
    overflow-x: hidden; /* Запрещаем горизонтальный скролл */
    justify-content: center !important; /* Центрируем миниатюры */
  }

  .thumb-gallery li {
    flex: 0 0 auto; /* Чтобы миниатюры не растягивались */
  }
/*  .spec-dots {*/
/*  flex-grow: 1;*/
/*  border-bottom: 1px dotted #ccc;*/
/*  margin: 0 2px;*/
/*}*/
}



@media (min-width: 768px) {
    .col-md-3.d-flex {
        position: relative;
        overflow: visible;
    }

    .img-wrap {
        position: relative;
        display: block;
        overflow: hidden;
    }

    .img-wrap img {
        width: 100%;
        height: 100%;
        display: block;
        transition: opacity 0.15s ease-in-out, transform 0.15s ease;
        backface-visibility: hidden;
        will-change: opacity, transform;
        position: absolute;
        top: 0;
        left: 0;
        object-fit: cover;
        transform: translateX(20%); /* 👈 немного правее */
    }

    .img-main {
        z-index: 1;
        opacity: 1;
        transform: translateX(20%);
    }

    .img-hover {
        z-index: 2;
        opacity: 0;
        transform: translateX(20%);
        pointer-events: none;
    }


    .img-wrap:hover .img-main {
        opacity: 0;
    }

    .img-wrap:hover .img-hover {
        opacity: 1;
    }
}
.cart-btn-img {
  height: 24px;
  width: auto;
  transition: opacity 0.3s ease;
}
.card {
    border: none; !important;
}
.btn-cart {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-left: auto; /* сдвигает кнопку вправо */
}

.card-product-grid:hover .btn-cart {
    opacity: 1;
    pointer-events: auto;
}

.price-wrap .btn {
    border-color: transparent;
    font-size: 0.8rem;
    padding: 0.2em 0.5em;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}
.col-md-3 {
    padding-left: 0;
    padding-right: 0;
}

/* фиксируем высоту карточки */
.card-product-grid {
    border: 1px solid white;
    /*margin: 0 !important;*/
    /*height: 380px; !* пример фиксированной высоты *!*/
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* изменил чтобы текст не растягивал */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-origin: center center;
    aspect-ratio: 2 / 3;
}
.card-product-grid:hover {
    box-shadow: 0 4px 15px rgba(153, 153, 153, 0.3);
    transition: none; !important;
    border: 1px solid #DCDCDC; !important;
    border-radius: 1px; !important;
}

.text-success {
    margin-left: 0 !important;
}

.extra-info {
    padding-top: 10px;
    font-size: 0.7rem;
    color: #555;
    /*max-height: 0;*/
    /*overflow: hidden;*/
    transition: max-height 0.4s ease, opacity 0.4s ease;
    opacity: 1;
}

.responsive-buy-btn2 {
    white-space: nowrap;
}

button.add-to-cart2.in-cart {
    background-color: transparent !important;
    border: none !important;
    color: blue;
    text-decoration: underline dotted;
    font-size: 0.85rem;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    outline: none; /* убираем обводку */
    box-shadow: none !important;
}

button.add-to-cart2.in-cart:hover {
    color: orange;
    text-decoration: underline dotted;
    cursor: pointer;
    outline: none;
    box-shadow: none !important;
}

button.add-to-cart2.in-cart:focus {
    outline: none;
    border: none !important;
    box-shadow: none !important;
}

.title {
    display: block;
    /*white-space: nowrap;*/
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: clamp(10px, 1.2vw, 16px);
    line-height: 1.1;
}
h2.title {
    display: block;
    white-space: normal !important;
    max-width: 100%;
    font-size: clamp(12px, 1.2vw, 16px);
    line-height: 1.2;
}

.section-heading .btn {
    z-index: 1;
    position: relative;
}

/* для экранов меньше 768px */
@media (max-width: 1000px) {
    .responsive-buy-btn2 {
        font-size: 13px;
        padding: 4px 8px;
    }
}


@media (max-width: 876px) {
    .responsive-buy-btn2 {
        font-size: 13px;
        padding: 2px 6px;
    }
      .extra-info {
          visibility: hidden;
      }
    .img-hover {
    display: none !important;
  }
}


@media (max-width: 767px) {

  .card-product-grid {
    transform: none !important;
    height: auto !important;
  }

  .card-product-grid:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .card-product-grid:hover .btn-cart {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

      .extra-info {
          visibility: hidden;
      }

  .card-product-grid:hover .extra-info {
    max-height: 80px;
    opacity: 1;
    pointer-events: auto;
  }
  .btn-cart {
      opacity: 1;
  }
      .img-hover {
    display: none !important;
  }
}
@media (hover: none) {
    .card-product-grid:hover {
    border: none !important;
    box-shadow: none !important;
  }
}


.color-variant {
  display: inline-block;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  width: 90px;
  height: 100px;
  transition: all 0.2s ease-in-out;
  position: relative;
}

.color-variant img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.color-variant:hover {
  border-color: #007bff;
  transform: scale(1.1);
  z-index: 2;
}
.color-variant.unavailable {
  position: relative;
  opacity: 0.5;
}

.color-variant.unavailable::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 141%;
  height: 2px;
  background-color: red;
  transform: translate(-50%, -50%) rotate(-45deg);
  pointer-events: none;
}

.color-variant.active {
  border-color: #28a745;
}
.color-variant.active,
.color-variant.touched {
  border-color: #28a745;
}

/* Hide 5th color variant on mobile */
@media (max-width: 767px) {
  .color-variant:nth-child(5) {
    display: none;
  }
}

@media (max-width: 768px) {
    .responsive-buy-btn {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        padding: 15px 0;
        font-size: 1.2rem;
        text-align: center;
        z-index: 9999;
        border-radius: 0;
        margin: 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    }
}
.responsive-buy-btn2,
.responsive-buy-btn2:hover,
.responsive-buy-btn2:active,
.responsive-buy-btn2:focus,
.responsive-buy-btn2:visited {
  background: none !important;
  border: none !important;
  color: inherit !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
}
