/* Карточка товара */

.product-page {
  padding: 28px 0 80px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  color: #8b8b8b;
  font-size: 12px;
}
.breadcrumbs a:hover {
  color: #3f7736;
}
.product-layout {
  display: grid;
  grid-template-columns: 660px 1fr;
  gap: 36px;
  align-items: start;
}
.product-gallery {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 22px;
  margin-bottom: 30px;
}
.product-thumbs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.product-thumb {
  width: 110px;
  height: 110px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #f7f2ed;
  overflow: hidden;
  cursor: pointer;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-thumb--active {
  outline: 2px solid #3f7736;
  outline-offset: 0;
}
.product-main-img {
  height: 510px;
  border-radius: 12px;
  background: #f7f2ed;
  overflow: hidden;
}

.product-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-main-img {
  height: 510px;
  border-radius: 12px;
  background: #f7f2ed;
  overflow: hidden;
}

.form-message {
  margin: 18px 22px 0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.form-message--error {
  background: #fff1f1;
  color: #b33a3a;
}
.product-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-right h1 {
  max-width: 520px;
  margin-bottom: 8px;
  font-family: "inter-bold";
  font-size: 32px;
  /* line-height: 1.15; */
}
.product-price {
  margin-bottom: 32px;
  color: #3f7736;
  font-family: "inter-bold";
  font-size: 32px;
}
.product-desc {
  max-width: 523px;
  margin-bottom: 28px;
  font-size: 14px;
  /* line-height: 1.42; */
}
.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 140px;
}
.product-info > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  font-size: 14px;
}
.product-info span {
  color: #111;
}
.product-info a {
  color: #3f7736;
}
.stock {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #3f7736;
}
.stock i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f7736;
}
.animal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.animal-tags span {
  padding: 8px 21px;
  border-radius: 999px;
  background: #f7f2ed;
  border: 1px solid #ded7cf;
  font-size: 14px;
}
.product-actions {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 50px;
  margin-bottom: 32px;
}
.quantity {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  font-family: "inter-bold";
  font-size: 18px;
}
.quantity button {
  border: 0;
  background: none;
  font-size: 28px;
  cursor: pointer;
}
.cart-btn {
  height: 64px;
  width: 313px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 0;
  border-radius: 8px;
  background: #3f7736;
  color: #fff;
  font-family: "inter-regular";
  font-size: 18px;
  cursor: pointer;
}
.cart-btn img {
  width: 29px;
  height: 29px;
  filter: brightness(0) invert(1);
}
.product-note {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  padding: 20px 18px;
  border-radius: 12px;
  background: #fbf6f3;
}

.note-icon {
  flex: 0 0 auto;
}
.note-icon img {
  width: 40px;
}

.product-note h3 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 18px;
}
.product-note p {
  font-size: 14px;
  /* line-height: 1.45; */
}
.product-tabs {
  margin-top: 62px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  overflow: hidden;
}
.tabs-nav {
  height: 57px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #cfcfcf;
}
.tab-btn {
  height: 100%;
  min-width: 165px;
  position: relative;
  border: 0;
  background: #fff;
  font-family: "inter-regular";
  font-size: 14px;
  cursor: pointer;
}
.tab-btn--active {
  color: #3f7736;
}
.tab-btn--active::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 0;
  height: 2px;
  background: #3f7736;
}
.tab-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: #3f7736;
  color: #fff;
  font-size: 14px;
}
.tab-content {
  display: none;
  padding: 28px 34px;
}
.tab-content--active {
  display: block;
}
.tab-content p {
  font-size: 14px;
  /* line-height: 1.5; */
}
.features-table {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.features-table div {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  font-size: 14px;
}
.features-table p {
  font-size: 14px;
}
.reviews-head {
  display: flex;
  align-items: center;
  margin-bottom: 26px;
}
.rating-total {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rating-total strong {
  color: #3f7736;
  font-family: "inter-bold";
  font-size: 42px;
}
.rating-total span,
.rating-total p {
  color: #999;
  font-size: 14px;
}
.stars {
  color: #3f7736;
  font-size: 35px;
  letter-spacing: 0px;
}
.review-form {
  margin-bottom: 34px;
  padding: 0 0 24px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  overflow: hidden;
}
.review-form h3 {
  padding: 18px 22px;
  border-bottom: 1px solid #d4d4d4;
  font-size: 14px;
}
.review-form__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 25px;
  padding: 20px 22px 0;
  align-items: start;
}
.review-form__row label {
  margin-top: 3px;
  font-size: 14px;
}

.review-form__row label.title {
  margin-top: 10px;
}

.review-stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
}
.review-stars input {
  display: none;
}
.review-stars label {
  color: #bdbdbd;
  font-size: 30px;
  cursor: pointer;
}
.review-stars label:hover,
.review-stars label:hover ~ label,
.review-stars input:checked ~ label {
  color: #3f7736;
}
.review-form textarea {
  width: 100%;
  height: 125px;
  resize: none;
  padding: 13px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  font-family: "inter-regular";
  font-size: 14px;
  outline: none;
}
.review-form textarea:focus {
  border-color: #3f7736;
}
.review-form button {
  display: block;
  width: 185px;
  height: 48px;
  margin: 18px 22px 0 auto;
  border: 0;
  border-radius: 8px;
  background: #3f7736;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.reviews-list {
  display: flex;
  flex-direction: column;
}
.review-card {
  padding: 22px 0;
  border-bottom: 1px solid #cfcfcf;
}
.review-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.review-user {
  display: flex;
  align-items: center;
  gap: 14px;
}
.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #d9d9d9;
}
.review-user strong {
  font-family: "inter-bold";
  font-size: 14px;
}
.review-user span {
  color: #999;
  font-size: 14px;
  margin-left: 30px;
}
.review-card .stars {
  font-size: 22px;
}
.review-card p {
  font-size: 14px;
  /* line-height: 1.45; */
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}
.pagination__item {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  font-size: 14px;
}
.pagination__item--active {
  background: #3f7736;
  color: #fff;
  border-color: #3f7736;
}

/* Статус товара: нет в наличии */
.stock--out {
  color: #999;
}

.stock--out i {
  display: none;
}

.cart-btn:disabled,
.cart-btn--disabled {
  background: #b8b8b8;
  opacity: 0.65;
  cursor: not-allowed;
}

.cart-btn:disabled:hover,
.cart-btn--disabled:hover {
  background: #b8b8b8;
}

/* ===== Исправленный резиновый адаптив: карточка товара ===== */
.product-page {
  padding: clamp(22px, 3vw, 28px) 0 clamp(55px, 6vw, 80px);
}

.breadcrumbs {
  flex-wrap: wrap;
  gap: 8px 12px;
}

.product-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.82fr);
  gap: clamp(24px, 3vw, 36px);
}

.product-left,
.product-right {
  min-width: 0;
}

.product-gallery {
  grid-template-columns: clamp(78px, 8vw, 110px) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 22px);
}

.product-thumbs {
  gap: clamp(10px, 1.6vw, 20px);
}

.product-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.product-main-img {
  height: auto;
  aspect-ratio: 1 / 0.78;
}

.product-right h1 {
  max-width: none;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.18;
}

.product-price {
  margin-bottom: clamp(20px, 3vw, 32px);
  font-size: clamp(27px, 3vw, 32px);
}

.product-desc {
  max-width: none;
}

.product-info {
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 54px);
}

.product-info > div {
  grid-template-columns: minmax(105px, 130px) minmax(0, 1fr);
  align-items: start;
}

.animal-tags {
  gap: 9px;
}

.animal-tags span {
  padding: 7px 14px;
}

.product-actions {
  grid-template-columns: minmax(112px, 130px) minmax(0, 313px);
  gap: clamp(12px, 2vw, 24px);
}

.cart-btn {
  width: 100%;
}

.product-note {
  gap: 12px;
}

.product-tabs {
  margin-top: clamp(34px, 5vw, 62px);
}

.tabs-nav {
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-btn {
  flex: 0 0 auto;
}

.features-table div {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
}

.review-card__top,
.rating-total,
.review-user {
  min-width: 0;
}

@media (max-width: 1180px) {
  .product-layout {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.8fr);
  }

  .product-info > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "gallery"
      "right"
      "tabs";
  }

  .product-left {
    display: contents;
  }

  .product-gallery {
    grid-area: gallery;
    margin-bottom: 0;
  }

  .product-tabs {
    grid-area: tabs;
  }

  .product-right {
    grid-area: right;
  }

  .product-info {
    margin-bottom: 28px;
  }

  .product-info > div {
    grid-template-columns: minmax(105px, 130px) minmax(0, 1fr);
  }

  .product-actions {
    max-width: 470px;
  }
}

@media (max-width: 650px) {
  .product-gallery {
    grid-template-columns: 1fr;
  }

  .product-main-img {
    aspect-ratio: 1 / 0.92;
  }

  .product-thumbs {
    order: 2;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .product-thumb {
    width: 78px;
    flex: 0 0 78px;
  }

  .product-actions {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .quantity,
  .cart-btn {
    height: 56px;
  }

  .tabs-nav {
    height: auto;
  }

  .tab-btn {
    min-width: 142px;
    height: 54px;
  }

  .tab-content {
    padding: 22px 16px;
  }

  .features-table div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .rating-total,
  .review-card__top,
  .review-user {
    flex-wrap: wrap;
  }

  .review-user span {
    margin-left: 0;
  }

  .review-form__row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px 16px 0;
  }

  .review-form button {
    width: calc(100% - 32px);
    margin-right: 16px;
  }
}

@media (max-width: 430px) {
  .product-main-img {
    aspect-ratio: 1 / 1;
  }

  .product-info > div {
    grid-template-columns: 1fr;
  }

  .product-note {
    flex-direction: column;
    padding: 16px;
  }

  .review-card__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .stars {
    font-size: 28px;
  }

  .review-card .stars {
    font-size: 21px;
  }
}

/* ===== Стрелки слайдера в карточке товара ===== */
.product-main-img {
  position: relative;
}

.product-slider-arrow {
  width: 42px;
  height: 42px;
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #3f7736;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: 0.2s;
}

.product-slider-arrow:hover {
  background: #fff;
  color: #315f2b;
}

.product-slider-arrow--prev {
  left: 14px;
}

.product-slider-arrow--next {
  right: 14px;
}

@media (max-width: 560px) {
  .product-slider-arrow {
    width: 36px;
    height: 36px;
    font-size: 28px;
  }

  .product-slider-arrow--prev {
    left: 8px;
  }

  .product-slider-arrow--next {
    right: 8px;
  }
}
