/* Product gallery containment.
 * The legacy layout used two percentage columns whose combined width left no
 * space between a large photo and the product description at medium screens. */
.product-wrap .left-view,
.product-wrap .right-product {
  box-sizing: border-box;
  min-width: 0;
}

.product-wrap .p-slider,
.product-wrap .p-slider .bx-wrapper,
.product-wrap .p-slider .bx-viewport {
  box-sizing: border-box;
  max-width: 100% !important;
}

.product-wrap .p-slider {
  background: #fff;
}

.product-wrap .p-slider .slider img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.product-purchase-form {
  display: grid;
  margin-top: 16px;
  padding: 16px;
  gap: 14px;
  border: 1px solid #d9dddf;
  border-radius: 4px;
  background: #f5f6f6;
}

.product-purchase-variant {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.product-purchase-variant > span,
.product-purchase-quantity > span:first-child {
  color: #555d61;
  font-family: 'SegoeUI-Bold', Arial, sans-serif;
  font-size: 12px;
  line-height: 1.2;
}

.product-purchase-variant select {
  display: block;
  width: 100%;
  height: 44px;
  min-width: 0;
  padding: 0 34px 0 11px;
  border: 1px solid #cbd1d4;
  border-radius: 3px;
  box-sizing: border-box;
  background: #fff;
  color: #202426;
  font: 14px/1.2 Arial, sans-serif;
  text-overflow: ellipsis;
}

.product-purchase-variant > .jcf-select {
  display: block;
  width: 100%;
  height: 44px;
  min-width: 0;
  border: 1px solid #cbd1d4;
  border-radius: 3px;
  box-sizing: border-box;
  background: #fff;
  color: #202426;
  font: 14px/1.2 Arial, sans-serif;
}

.product-purchase-variant > .jcf-select .jcf-select-text {
  display: block;
  height: 42px;
  margin: 0 36px 0 11px;
  overflow: hidden;
  color: #202426;
  font: 14px/42px Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-purchase-variant > .jcf-select .jcf-select-opener {
  width: 34px;
}

.product-purchase-variant > .jcf-select .jcf-select-opener:after {
  top: 19px;
  left: 12px;
}

.product-purchase-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.product-purchase-price {
  color: #111;
  font-family: 'SegoeUI-Bold', Arial, sans-serif;
  font-size: 27px;
  line-height: 1.1;
  white-space: nowrap;
}

.product-purchase-price::before {
  content: 'Итого';
  display: block;
  margin-bottom: 5px;
  color: #555d61;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: normal;
}

.product-purchase-quantity {
  display: grid;
  gap: 5px;
}

.product-purchase-form .catalog-card-quantity-controls {
  display: grid;
  width: 116px;
  grid-template-columns: 36px 44px 36px;
}

.product-purchase-form .catalog-card-quantity-controls button,
.product-purchase-form .catalog-card-quantity-controls input {
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid #cbd1d4;
  border-radius: 0;
  box-sizing: border-box;
  background: #fff;
  color: #202426;
  font: 16px/1 Arial, sans-serif;
  text-align: center;
}

.product-purchase-form .catalog-card-quantity-controls button:first-child {
  border-radius: 3px 0 0 3px;
}

.product-purchase-form .catalog-card-quantity-controls button:last-child {
  border-radius: 0 3px 3px 0;
}

.product-purchase-form .catalog-card-quantity-controls input {
  border-right: 0;
  border-left: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.product-purchase-form .catalog-card-quantity-controls input::-webkit-inner-spin-button,
.product-purchase-form .catalog-card-quantity-controls input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.product-purchase-button {
  width: 100%;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid #c60000;
  border-radius: 3px;
  background: #c60000;
  color: #fff;
  font-family: 'SegoeUI-Bold', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

.product-purchase-button:hover,
.product-purchase-button:focus-visible {
  background: #a90000;
  border-color: #a90000;
}

.product-purchase-button:disabled {
  opacity: .65;
  cursor: wait;
}

.product-purchase-unpriced {
  margin: 16px 0 0;
  padding: 13px 15px;
  border-left: 4px solid #c60000;
  background: #f5f6f6;
  color: #4f575c;
  font-size: 14px;
  line-height: 1.45;
}

@media (min-width: 761px) and (max-width: 1170px) {
  .product-wrap {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    column-gap: 28px;
    align-items: start;
  }

  .product-wrap .left-view,
  .product-wrap .right-product {
    float: none;
    width: auto;
  }
}

@media (max-width: 760px) {
  .product-wrap .p-slider,
  .product-wrap .p-slider .bx-wrapper,
  .product-wrap .p-slider .bx-viewport,
  .product-wrap .p-slider .slider,
  .product-wrap .p-slider .slider li,
  .product-wrap .p-slider .slider a {
    width: 100% !important;
    max-width: 100% !important;
  }

  .product-wrap .p-slider .slider img {
    width: 100%;
  }

  .product-purchase-row {
    grid-template-columns: 1fr;
  }

  .product-purchase-form .catalog-card-quantity-controls {
    width: 132px;
    grid-template-columns: 42px 48px 42px;
  }
}
