.store-cart {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding-bottom: 6rem;
  display: grid;
  gap: 3.2rem;
  align-items: flex-start;

  &-list {
    display: grid;
    gap: 1.6rem;

    &-item {
      padding: 0.8rem;
      display: grid;
      gap: 1.6rem;
      grid-template-columns: min-content 1fr;
      align-items: center;
      background-color: var(--gray-soft-lightest);
      border: 1px solid var(--gray-soft-dark);
      border-radius: var(--border-radius);

      .picture {
        grid-area: 1 / 1 / 2 / 2;
        width: 10rem !important;
        @include imageRatio(76%);
        border-radius: var(--border-radius);
      }
      .ref {
        grid-area: 1 / 2 / 2 / 3;
        display: flex;
        flex-direction: column;
        span {
          @include text-sm;
          color: var(--gray-hard-lightest);
          text-transform: uppercase;
        }
        p {
          max-width: 60ch;
          margin: 0;
          @include text-base(600);
        }
        .min,.error p {
          margin-top: 0.8rem;
          @include text-sm;
          color: var(--alert);
          text-transform: none;
        }
        .error .refresh-btn {
          @extend .fab-button, .is-black;
          height: auto;
          margin-top: 0.4rem;
          padding: 0.4rem 0.8rem;
          @include text-sm;
        }
      }
      .actions {
        grid-area: 2 / 1 / 3 / 3;
        align-self: stretch;
        padding: 0.8rem;
        display: grid;
        grid-template-columns: min-content min-content;
        justify-content: space-evenly;
        justify-items: flex-end;
        align-items: center;
        gap: 2.4rem;
        background-color: var(--gray-soft-light);
        border-radius: var(--border-radius);
      }
      .offer {
        grid-area: 3 / 1 / 4 / 3;
        justify-self: flex-end;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem 1.6rem;
        border: 1px solid var(--gray-soft-dark);
        border-radius: var(--border-radius);
        label {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin: 0;
          @include text-base;
          cursor: pointer;
          span { margin-right: 0.8rem; }
        }
      }
      .quantity {
        padding: 0.8rem 1.6rem 0.8rem 1.2rem;
        display: grid;
        grid-auto-flow: column;
        gap: 0 0.8rem;
        background-color: var(--gray-soft);
        border-radius: var(--border-radius-sm);
        input[type="number"] {
          grid-area: 1 / 1 / 3 / 2;
          min-width: 4ch;
          background-color: transparent;
          border: none;
          text-align: right;
          @include text-base(400);
          -webkit-appearance: textfield;
             -moz-appearance: textfield;
                  appearance: textfield;
        }
        input[type=number]::-webkit-inner-spin-button,
        input[type=number]::-webkit-outer-spin-button {
          -webkit-appearance: none;
        }
        button {
          padding: 0;
          display: flex;
          background-color: transparent;
          border: none;
        }
      }
      .price,
      .total {
        min-width: 10rem;
        p {
          margin: 0;
          display: flex;
          @include title-base;
        }
        span { @include text-sm; }
      }
      .count {
        padding: 0.8rem 1.6rem;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: var(--gray-soft);
        border-radius: var(--border-radius-sm);
      }
      .total {
        span {
          @include text-sm;
          color: var(--main);
          text-transform: uppercase;
        }
      }
      &.error {
        border-color: var(--alert);
      }
    }
  }
  .group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }
  &-info,
  &-coupon {
    padding: 2.4rem;
    background-color: var(--gray-soft-light);
    border-radius: var(--border-radius);
    h3, label {
      margin: 0 0 1.6rem;
      @include text-base(500);
      color: var(--gray-hard-darkest) !important;
    }
    .fab-input .input-wrapper {
      width: 100%;
      .fab-input--input {
        border-radius: var(--border-radius);
      }
    }
  }
  &-info {
    p { @include text-sm; }
  }

  aside {
    & > div {
      @include component-border;
      h3 {
        @include component-title;
      }
    }
    .checkout {
      .list {
        margin: 0.8rem 0 2.4rem;
        padding: 2.4rem 0;
        border-top: 1px solid var(--main);
        border-bottom: 1px solid var(--main);
        p {
          display: flex;
          justify-content: space-between;
          align-items: center;
          span { @include title-base; }
        }
        .gift { color: var(--gray-hard-dark); }
      }
      .total {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        @include text-base(600);
        span { @include title-lg; }
      }

      &-btn {
        width: 100%;
        height: auto;
        padding: 1.6rem 0.8rem;
        background-color: var(--main);
        border: none;
        color: var(--gray-soft-lightest);
        justify-content: center;
        text-transform: uppercase;
        &:hover {
          color: var(--gray-soft-lightest);
          opacity: 0.75;
          cursor: pointer;
        }
      }
    }
  }

  @media (min-width: 640px) {
    .actions {
      grid-auto-flow: column;
      grid-template-columns: 1fr min-content 1fr min-content;
      justify-content: stretch;
      justify-items: flex-end;
      align-items: center;
    }
  }

  @media (min-width: 1024px) {
    &-list-item {
      .ref { grid-area: 1 / 2 / 2 / 3; }
      .actions { grid-area: 2 / 1 / 3 / 3; }
    }
    .group { grid-template-columns: repeat(2, 1fr); }
  }
  @media (min-width: 1200px) {
    &-list-item {
      grid-auto-flow: row;
      grid-template-columns: min-content 1fr 1fr;
      justify-content: space-between;
      align-items: center;
      .picture { grid-area: 1 / 1 / 2 / 2; }
      .ref { grid-area: 1 / 2 / 2 / 3; }
      .actions { grid-area: 1 / 3 / 2 / 4; }
      .offer {
        grid-area: 2 / 1 / 3 / 4;
        justify-self: flex-end;
      }
    }
  }
  @media (min-width: 1440px) {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: minmax(0, min-content);

    &-list { grid-area: 1 / 1 / 2 / 10; }
    .group { grid-area: 2 / 1 / 3 / 10; }
    aside { grid-area: 1 / 10 / 3 / 13; }
  }
}
