//
// Cart page
// ----------------------------
//
@import "../global";

// Cart Page.
.cart-form {
  margin-bottom: $spacer * 3;

  // Multiple cart forms.
  + .cart-form {
    padding-top: $spacer * 3;
    border-top: $border-width solid $border-color;
  }

  // Remove button
  .views-field-remove-button {
    text-align: center;
  }

  .form-actions {
    margin-top: $spacer * 3;
    display: flex;
    gap: $spacer;
    justify-content: flex-end;
  }
}

// Cart page specific styles
.cart-page {
  .cart-contents {
    margin-bottom: $spacer * 2;
  }

  .cart-summary {
    background-color: $light;
    padding: $spacer * 1.5;
    border-radius: $border-radius;
    margin-bottom: $spacer * 2;

    .summary-item {
      display: flex;
      justify-content: space-between;
      margin-bottom: $spacer * 0.5;

      &:last-child {
        margin-bottom: 0;
        border-top: $border-width solid $border-color;
        padding-top: $spacer * 0.5;
        font-weight: bold;
        font-size: 1.1em;
      }
    }
  }

  .cart-actions {
    display: flex;
    gap: $spacer;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;

    @include media-breakpoint-down(md) {
      flex-direction: column;
      align-items: stretch;
    }

    .btn {
      min-width: 120px;
    }
  }

  .empty-cart {
    text-align: center;
    padding: $spacer * 3;

    .empty-cart-icon {
      font-size: 3rem;
      color: $gray-400;
      margin-bottom: $spacer;
    }

    .empty-cart-message {
      font-size: 1.2rem;
      color: $gray-600;
      margin-bottom: $spacer * 2;
    }
  }
}
