/* Mobile product-card repairs, isolated from catalog and request forms. */
@media (max-width: 768px) {
  /* Colorbox calculates its own viewport-safe dimensions. Legacy responsive
     caps changed those inline dimensions after every gallery transition,
     which exposed two rows of the control sprite and hid landscape photos. */
  #colorbox,
  #cboxWrapper,
  #cboxContent,
  #cboxLoadedContent {
    max-width: none !important;
  }

  #colorbox #cboxContent,
  #colorbox #cboxLoadedContent {
    box-sizing: content-box !important;
    overflow: hidden !important;
  }

  #colorbox .cboxPhoto {
    max-width: none !important;
  }

  #cboxPrevious,
  #cboxNext,
  #cboxClose,
  #cboxSlideshow {
    min-height: 25px !important;
    height: 25px !important;
  }

  .node-product.view-mode-full > .group-right .section > .field-name-tabs ul.tabs {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    height: auto !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
  }

  .node-product.view-mode-full > .group-right .section > .field-name-tabs .tabs li {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 32px !important;
    margin: 0 !important;
    border: 1px solid #c7d9e6 !important;
    border-radius: 7px !important;
    background: #fff !important;
  }

  .node-product.view-mode-full > .group-right .section > .field-name-tabs .tabs li span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 30px !important;
    height: auto !important;
    padding: 5px 8px !important;
    background: none !important;
    line-height: 16px !important;
  }

  .node-product.view-mode-full > .group-right .section > .field-name-tabs .tabs li.current {
    border-color: #0066b6 !important;
    background: #0066b6 !important;
    color: #fff !important;
  }

  .node-product.view-mode-full > .group-left .item-full,
  .node-product.view-mode-full > .group-left .item-full-right {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .node-product.view-mode-full > .group-left .item-image {
    display: block !important;
    width: 100% !important;
    max-width: 320px !important;
    max-height: none !important;
    margin: 0 auto !important;
  }

  .node-product.view-mode-full > .group-left .item-image .for-img {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 230px;
    height: auto !important;
    padding: 10px;
  }

  .node-product.view-mode-full > .group-left .item-image img {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 300px;
    margin: auto;
  }

  .node-product.view-mode-full > .group-left .someImage {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 10px 0 14px;
  }

  .node-product.view-mode-full > .group-left .someImage > div {
    display: block;
  }

  .node-product.view-mode-full > .group-left .someImage > div:empty {
    display: none;
  }

  .node-product.view-mode-full > .group-left .someImage > div > div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0;
    padding: 4px;
    border: 1px solid #c7d9e6;
    border-radius: 7px;
    background: #fff;
  }

  .node-product.view-mode-full > .group-left .someImage a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }

  .node-product.view-mode-full > .group-left .someImage img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 44px;
  }

  .node-product.view-mode-full > .group-right .section > .box {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .node-product.view-mode-full > .group-right .section iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  .node-product.view-mode-full > .group-footer > .group-aks,
  .node-product.view-mode-full > .group-footer > .group-other {
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .node-product.view-mode-full > .group-footer > .group-aks h3,
  .node-product.view-mode-full > .group-footer > .group-other h3 {
    width: 100% !important;
    max-width: 100% !important;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .field-item > .ds-2col,
  .node-product.view-mode-full > .group-footer > .group-other .field-item > .ds-2col {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100px !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    border-right: 0 !important;
    border-bottom: 1px dashed #b2b2b2 !important;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .ds-2col > .group-left,
  .node-product.view-mode-full > .group-footer > .group-other .ds-2col > .group-left {
    grid-column: 1;
    float: none !important;
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    margin: 0 !important;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .ds-2col > .group-right,
  .node-product.view-mode-full > .group-footer > .group-other .ds-2col > .group-right {
    grid-column: 2;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .field-name-field-primg,
  .node-product.view-mode-full > .group-footer > .group-other .field-name-field-primg,
  .node-product.view-mode-full > .group-footer > .group-aks .field-name-field-primg .field-items,
  .node-product.view-mode-full > .group-footer > .group-other .field-name-field-primg .field-items,
  .node-product.view-mode-full > .group-footer > .group-aks .field-name-field-primg .field-item,
  .node-product.view-mode-full > .group-footer > .group-other .field-name-field-primg .field-item {
    width: 104px !important;
    max-width: 104px !important;
    margin: 0 !important;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .field-name-field-primg img,
  .node-product.view-mode-full > .group-footer > .group-other .field-name-field-primg img {
    max-width: 94px !important;
    height: auto !important;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .field-name-title h2,
  .node-product.view-mode-full > .group-footer > .group-other .field-name-title h2 {
    margin-top: 0 !important;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .field-name-no-price-small > .field-items > .field-item,
  .node-product.view-mode-full > .group-footer > .group-other .field-name-no-price-small > .field-items > .field-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 7px;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .field-name-field-priced,
  .node-product.view-mode-full > .group-footer > .group-other .field-name-field-priced {
    flex: 1 1 auto;
    float: none !important;
    width: auto !important;
    min-width: 0;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 34px;
    text-align: left !important;
    white-space: nowrap;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .field-name-zakaz-aks,
  .node-product.view-mode-full > .group-footer > .group-other .field-name-zakaz-aks {
    flex: 0 0 112px;
    float: none !important;
    width: 112px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 7px;
    background: #ed7a13 !important;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .field-name-zakaz-aks:only-child,
  .node-product.view-mode-full > .group-footer > .group-other .field-name-zakaz-aks:only-child {
    flex-basis: 128px;
    width: 128px !important;
  }

  .node-product.view-mode-full > .group-footer > .group-aks .field-name-zakaz-aks a,
  .node-product.view-mode-full > .group-footer > .group-other .field-name-zakaz-aks a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 8px;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
  }
}
