/* Карточки товаров в «Решениях» повторяют карточки основного каталога. */
.page-solution-detail .solution-products-grid {
  gap: 14px;
}

.page-solution-detail .solution-product {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  padding: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(49, 54, 61, 0.13);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 11px 25px rgba(38, 43, 48, 0.07);
  transform: translateZ(0);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.page-solution-detail .solution-product:hover {
  border-color: rgba(232, 119, 27, 0.28);
  box-shadow: 0 18px 36px rgba(38, 43, 48, 0.12);
  transform: translateY(-3px);
}

.page-solution-detail .solution-product__favorite {
  z-index: 4;
  width: 36px;
  height: 36px;
  border-color: rgba(43, 48, 54, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(31, 35, 40, 0.1);
  font-size: 23px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-solution-detail .solution-product__favorite:hover,
.page-solution-detail .solution-product__favorite:focus-visible {
  border-color: rgba(232, 119, 27, 0.38);
  outline: none;
  box-shadow: 0 9px 20px rgba(232, 119, 27, 0.17);
  transform: translateY(-2px);
}

.page-solution-detail .solution-products-grid .solution-product {
  min-width: 0;
  overflow: hidden !important;
  contain: paint;
  background: #fff;
}

.page-solution-detail .solution-product__media {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 4 / 3;
  padding: 16px;
  place-items: center;
  overflow: hidden !important;
  box-sizing: border-box;
  background: #fff;
}

.page-solution-detail .solution-product__media img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: auto;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  box-sizing: border-box;
  background: transparent;
  transition: none;
}

.page-solution-detail .solution-product:hover .solution-product__media img {
  transform: none !important;
}

.page-solution-detail .solution-product__placeholder {
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  background: #fff;
}

.page-solution-detail .solution-product__body {
  display: flex;
  min-width: 0;
  padding: 14px;
  flex: 1 1 auto;
  flex-direction: column;
}

.page-solution-detail .solution-product__title {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;
  color: #24272b;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.45;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-solution-detail .solution-product__meta {
  display: -webkit-box;
  min-height: 34px;
  margin-top: 7px;
  overflow: hidden;
  color: #777d84;
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-solution-detail .solution-product__code {
  min-height: 17px;
  margin-top: 7px;
  overflow: hidden;
  color: #888d92;
  font-size: 10.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-solution-detail .solution-product__unit-line {
  display: flex;
  min-height: 22px;
  margin-top: 9px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #777d84;
  font-size: 10.5px;
  line-height: 1.35;
}

.page-solution-detail .solution-product__unit-line > span {
  overflow: hidden;
  color: #4c5157;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-solution-detail .solution-product__unit-line > small {
  flex: 0 0 auto;
  font: inherit;
  white-space: nowrap;
}

/* v141: остатки в карточках «Решений» синхронизированы с каталогом. */
.page-solution-detail .solution-product__stock-line {
  display: flex;
  min-height: 30px;
  margin: 9px 0 3px;
  align-items: center;
}

.page-solution-detail .product-stock {
  display: inline-flex;
  width: max-content;
  padding: 7px 11px;
  align-items: center;
  gap: 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.page-solution-detail .product-stock i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.page-solution-detail .product-stock--many {
  color: #168441;
  border-color: rgba(22, 132, 65, 0.28);
  background: #effaf3;
}

.page-solution-detail .product-stock--enough {
  color: #d5740c;
  border-color: rgba(213, 116, 12, 0.30);
  background: #fff7e9;
}

.page-solution-detail .product-stock--none {
  color: #c43030;
  border-color: rgba(196, 48, 48, 0.28);
  background: #fff1f1;
}

.page-solution-detail .product-stock--unknown {
  color: #6b7280;
  border-color: rgba(107, 114, 128, 0.24);
  background: #f3f4f6;
}

.page-solution-detail .solution-modal__specs > .product-stock {
  margin: 0 0 4px;
}

.page-solution-detail .solution-modal__stock-caption {
  margin: 0 0 12px;
  color: #777d84;
  font-size: 11px;
  font-weight: 700;
}

.page-solution-detail .solution-product__controls {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 9px;
  margin-top: auto;
  padding-top: 12px;
  align-items: stretch;
}

.page-solution-detail .solution-qty {
  display: grid;
  width: 100%;
  min-height: 48px;
  height: 100%;
  padding: 4px;
  grid-template-columns: 28px minmax(24px, 1fr) 28px;
  gap: 2px;
  align-items: center;
  overflow: visible;
  border: 1px solid rgba(49, 54, 61, 0.13);
  border-radius: 14px;
  background: #fff;
}

.page-solution-detail .solution-qty button {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  align-self: center;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #24272b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.page-solution-detail .solution-qty input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  text-align: center;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  background: transparent;
  -moz-appearance: textfield;
}

.page-solution-detail .solution-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.page-solution-detail .solution-qty button:hover,
.page-solution-detail .solution-qty button:focus-visible {
  color: #bd5e09;
  border-color: rgba(232, 119, 27, 0.38);
  outline: none;
  background: #fffaf5;
}

.page-solution-detail .solution-cart-button {
  --solution-cart-brand: #f39e32;
  --solution-cart-light: #ffc273;
  --solution-cart-deep: #e8771b;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  height: 100%;
  padding: 4px 10px 4px 6px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(34, 34, 34, 0.08);
  border-radius: 14px;
  color: #2c2c2c;
  background:
    radial-gradient(circle at 50% 0%, rgba(243, 158, 50, 0.23), transparent 58%),
    linear-gradient(180deg, #fffaf3, #f1f2f4);
  box-shadow: 0 12px 24px rgba(31, 35, 40, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  font: inherit;
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 0.34s cubic-bezier(0.2, 0.78, 0.2, 1), border-color 0.34s ease, box-shadow 0.38s ease, color 0.34s ease;
}

.page-solution-detail .solution-cart-button::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.34), transparent 52%),
    linear-gradient(145deg, var(--solution-cart-light), var(--solution-cart-brand) 55%, var(--solution-cart-deep));
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.34s ease, transform 0.48s cubic-bezier(0.2, 0.78, 0.2, 1);
  pointer-events: none;
}

.page-solution-detail .solution-cart-button::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(112deg, transparent 18%, rgba(255, 255, 255, 0.88) 42%, transparent 63%);
  opacity: 0;
  transform: translateX(-145%) skewX(-16deg);
  pointer-events: none;
}

.page-solution-detail .solution-cart-button img,
.page-solution-detail .solution-cart-button span {
  position: relative;
  z-index: 2;
}

.page-solution-detail .solution-cart-button img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(243, 158, 50, 0.48));
  transition: transform 0.36s cubic-bezier(0.2, 0.78, 0.2, 1), filter 0.34s ease;
}

.page-solution-detail .solution-cart-button span {
  min-width: 0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.08;
  white-space: nowrap;
}

.page-solution-detail .solution-cart-button:hover,
.page-solution-detail .solution-cart-button:focus-visible {
  color: #b96200;
  border-color: rgba(243, 158, 50, 0.45);
  outline: none;
  box-shadow: 0 20px 34px rgba(86, 53, 13, 0.16), 0 0 0 4px rgba(243, 158, 50, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.98);
  transform: translateY(-2px) scale(1.01);
}

.page-solution-detail .solution-cart-button:hover::after,
.page-solution-detail .solution-cart-button:focus-visible::after {
  opacity: 1;
  animation: solutionCartShine 0.85s ease both;
}

.page-solution-detail .solution-cart-button:hover img,
.page-solution-detail .solution-cart-button:focus-visible img {
  filter: drop-shadow(0 0 9px rgba(243, 158, 50, 0.72));
  transform: translateY(-2px) rotate(-3deg) scale(1.06);
}

.page-solution-detail .solution-cart-button.is-added {
  color: #fff;
}

.page-solution-detail .solution-cart-button.is-added::before {
  opacity: 1;
  transform: scale(1);
}

.page-solution-detail .solution-cart-button.is-added span {
  color: #fff;
  text-shadow: 0 1px 7px rgba(117, 58, 0, 0.24);
}

@keyframes solutionCartShine {
  from { transform: translateX(-145%) skewX(-16deg); }
  to { transform: translateX(145%) skewX(-16deg); }
}

@media (max-width: 1280px) {
  .page-solution-detail .solution-product__controls {
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 7px;
  }

  .page-solution-detail .solution-cart-button {
    padding-right: 7px;
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .page-solution-detail .solution-product__media {
    min-height: 0;
    aspect-ratio: 16 / 10;
    padding: 12px;
    background: #fff;
  }

  .page-solution-detail .solution-product__body {
    padding: 14px;
  }

  .page-solution-detail .solution-product__title {
    min-height: 42px;
    font-size: 14px;
  }

  .page-solution-detail .solution-product__meta {
    min-height: 34px;
  }

  .page-solution-detail .solution-product__controls {
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .page-solution-detail .solution-product__favorite {
    top: 10px;
    right: 10px;
    left: auto;
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-solution-detail .solution-cart-button,
  .page-solution-detail .solution-cart-button::before,
  .page-solution-detail .solution-cart-button::after,
  .page-solution-detail .solution-cart-button img {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
