/* Mobile inline purchase, cookie clearance and unit labels in the fixed button. */
body.site_s3 .am-buy-inline { display: none; }
@media (max-width: 767px) {
  body.site_s3 .am-buy-inline:not([hidden]) {
    display: flex;
    gap: 12px;
    width: 100%;
    margin: 24px 0;
    clear: both;
  }
  body.site_s3 .am-buy-inline-counter:not([hidden]) {
    display: flex;
    align-items: stretch;
    flex: 1 1 45%;
    min-width: 0;
    height: 48px;
    border: 1px solid var(--stroke_black, #ddd);
    border-radius: 3px;
    background: var(--card_bg_black, #fff);
  }
  body.site_s3 .am-buy-inline-counter[hidden] { display: none; }
  body.site_s3 .am-buy-inline-counter button,
  body.site_s3 .am-buy-inline-counter input {
    appearance: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--white_text_black, #333);
    box-shadow: none;
    text-align: center;
    margin: 0;
    padding: 0;
    height: 46px;
    min-width: 0;
  }
  body.site_s3 .am-buy-inline-counter button { flex: 0 0 40px; font-size: 23px; cursor: pointer; }
  body.site_s3 .am-buy-inline-counter input { width: 100%; flex: 1 1 0; font-size: 16px; }
  body.site_s3 .am-buy-inline .am-buy-inline-submit {
    flex: 1 1 55%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 10px 8px;
    font-size: 16px;
    line-height: 24px;
    border-radius: 3px;
    white-space: normal;
  }
  body.site_s3 .am-buy-inline button:focus-visible,
  body.site_s3 .am-buy-inline input:focus-visible { outline: 2px solid var(--theme-base-color, #85489b); outline-offset: 2px; }
  body.site_s3 .am-buy-inline-submit:disabled { opacity: .6; cursor: wait; }
}

@media (max-width: 767px) {
  body.site_s3 .catalog_detail .product-action .counter_wrapp.fixed .to-cart[data-am-unit-price] {
    padding-top: 5px;
    padding-bottom: 5px;
    line-height: 17px;
  }

  body.site_s3 .catalog_detail .product-action .counter_wrapp.fixed .to-cart[data-am-unit-price]:not(.loadings)::after {
    display: block;
    content: attr(data-am-unit-price) " за шт.";
    color: inherit;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
  }
}

/* Leave the native mobile buy panel reachable while the notice is open. */
@media (max-width: 767px) {
  body.site_s3:has(.catalog_detail .product-action .counter_wrapp.fixed .button_block :is(.to-cart, .in-cart)) {
    --am-cookie-buy-clearance: 64px;
  }

  body.site_s3:has(.bottom-icons-panel-Y .catalog_detail .product-action .counter_wrapp.fixed) {
    --am-cookie-buy-clearance: 126px;
  }

  body.site_s3:has(.catalog_detail .product-action .counter_wrapp.fixed .button_block :is(.to-cart, .in-cart))
    #js-cnotice-window.ag_cnotice_position_bottom {
    bottom: calc(var(--am-cookie-buy-clearance) + env(safe-area-inset-bottom, 0px));
  }
}
