/*
 * Copyright 2020-2021 Hippo B.V. (http://www.onehippo.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

brx-spartacus-product-details {
  .ProductDetailsPageTemplate {
    padding: var(--cx-padding, 2.5rem 0 0);

    div {
      &.Summary {
        @extend .container !optional;
        margin-bottom: 40px;

        @include media-breakpoint-up(lg) {
          display: grid;
          grid-column-gap: 20px;
          grid-row-gap: 0px;
          grid-template-columns: 1fr 1fr;
          grid-template-rows: repeat(5, auto) 1fr;

          cx-product-images {
            grid-column: 1;
            grid-row: 1 / span 6;
          }

          cx-product-intro {
            grid-column: 2;
          }

          cx-product-summary {
            grid-column: 2;
          }

          cx-product-variants {
            grid-column: 2;
            grid-row: 3;
          }

          cx-add-to-cart {
            grid-column: 2;
            padding-top: 20px;
            padding-inline-end: 20px;
            padding-bottom: 0px;
            padding-inline-start: 20px;
          }

          cx-stock-notification {
            grid-column: 2;
            grid-row: 3 / 4;
            padding-top: 20%;
            padding-inline-end: 20px;
            padding-bottom: 20px;
            padding-inline-start: 20px;
          }

          cx-stock-notification:empty {
            display: none;
          }
        }
      }
      &.AddToCart {
        max-width: 50%;
      }
      &.UpSelling,
      &.CrossSelling {
        max-width: var(--cx-page-width-max);
        margin: auto;
      }
    }

    .tab-delivery {
      @extend .container !optional;
    }
  }
}