/* ---------- Cart Styles ---------- */

/* ----- Cart Page ----- */

.cart .content{
  display: flex;
  gap: 4.8rem;
}
.cart .content h1.h4,
.cart .content h2.h4{
  margin: 0 0 1.6rem;
}
.cart .content h3.h4{
  font-size: 2.4rem;
  margin: 0 0 1.6rem;
}
.cart-checkout,
.your-cart{
  width: calc(100% - 36.8rem);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
.user-info,
.checkout-form{
  max-width: 32rem;
  width: 100%;
}
.empty-cart{
  width: 100%;
}

/* ----- Cart Item ----- */

.cart_item{
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid hsla(0 0% 0% / .1);
  padding-bottom: 1.6rem;
}
.cart_item .img-wrapper{
  aspect-ratio: 1 / 1;
  width: 16rem;
  height: auto;
  margin: 0;
}
.cart_item .img-wrapper img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart_item .product-details{
  width: calc(100% - 16rem);
  display: flex;
  flex-wrap: wrap;
  padding-left: 1.6rem;
}
.cart_item .product-details .product-content{
  width: calc(100% - 10rem);
  padding-right: 1.6rem;
}
.cart_item .product-details .product-content h3{
  font-size: 1.8rem;
  margin: 0 0 .8rem;
}
.cart_item .product-details .product-content p{
  margin: 0;
}
.cart_item .product-details .product_pricing{
  width: 10rem;
  text-align: right;
  font-size: 1.4rem;
}
.cart_item .product-details .product_pricing .product_subtotal{
  border-top: 2px solid hsla(0 0% 0% / .1);
  padding: .8rem 0 0;
  margin: .8rem 0 0 ;
  font-weight: 600;
  color: var(--dark);
}
.cart_item form{
  width: 100%;
  margin-top: auto;
}
.cart_item form input.qty{
  height: 3.2rem;
  border: none;
  background: var(--light);
  border-bottom: 3px solid var(--main);
  transform: translate(0, -3px);
  width: calc(100% - 16.1rem);
  padding: 0 8px;
}
.cart_item form input.superbutton,
.cart_item form button.superbutton{
  margin: 0;
  height: 3.2rem;
  padding: 2px 2.4rem 0;
}
.cart_item form button.remove-btn{
  width: 3.2rem;
  padding: 0;
  border-radius: 50%;
  background: var(--danger);
  font-size: 1.4rem;
}
.cart_item form button.remove-btn:hover{
  background: var(--dark);
}

/* ----- Cart Summary ----- */

.cart-summary{
  padding-bottom: 1.6rem;
  margin-bottom: 1.6rem;
  border-bottom: 2px solid hsla(0 0% 0% / .1);
}
.cart-summary .cart-total,
.cart-summary .total-item{
  display: flex;
  gap: .8rem 0;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cart-summary .cart-total strong,
.cart-summary .total-item strong{
  color: var(--dark);
}
.cart-summary .total-item form{
  width: 100%;
}
.cart-summary .cart-total{
  padding-top: 1.6rem;
  margin-top: 1.6rem;
  border-top: 2px solid hsla(0 0% 0% / .1);
}

/* ----- User Info ----- */

.user-shipping strong,
.your-info strong{
  color: var(--dark);
}
.user-shipping{
  margin-top: 1.6rem;
}

/* ----- Cart Success ----- */

.cart.cart-success .content{
  flex-wrap: wrap;
  gap: 0 4.8rem;
}
.success-bar{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 2.4rem;
  margin-bottom: 2.4rem;
  border-bottom: 2px solid hsla(0 0% 0% / .1);
}
.success-bar .h6{
  margin: 0;
}

/* ----- Stripe Styles ----- */

.stripe-button-el {
  background-color: transparent !important;
}
.stripe-button-el span {
  background-color: var(--main) !important;
}
.stripe-button-el,
.stripe-button-el span {
  background-image: none !important;
  box-shadow: none !important;
  border: transparent !important;
  text-shadow: none !important;
  font-family: inherit !important;
  text-transform: uppercase;
  transition: 0.25s ease;
}
.stripe-button-el span:hover {
  background-color: hsl(0 0% 20%) !important;
  border-color: hsl(0 0% 20%);
  transition: 0.25s ease;
}
.StripeElement {
  background-color: var(--light);
  height: 40px;
  padding: 10px 12px;
  border-radius: 0;
  border: none;
  box-shadow: none;
  border-bottom: 3px solid var(--main);
  margin: 0 0 1.6rem;
  color: var(--medium);
}
.StripeElement--focus {
  box-shadow: 0 1px 3px 0 #cfd7df;
}
.StripeElement--invalid {
  border-color: #fa755a;
}
.StripeElement--webkit-autofill {
  background-color: #fefde5 !important;
}
#card_table {
  width: 100%;
}
#card_table table {
  width: 100%;
}
#card_table table thead {
  border-bottom: 1px solid #ddd;
}
#add_card_button {
  float: right;
  cursor: pointer;
}
#add_card_section,
#event_payment_div {
  position: relative;
  display: none;
  width: 100%;
}
#cancel_add_card,
#cancel_payment {
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  transition: 0.2s;
}
#cancel_add_card:hover,
#cancel_payment:hover {
  transform: scale(1.3);
}

/* ----- Mobile Responsiveness ----- */
@media screen and (max-width: 960px){
  .cart .content{
    flex-direction: column;
    gap: 2.4rem;
  }
  .cart-checkout,
  .user-info, 
  .checkout-form,
  .your-cart{
    max-width: 100%;
    width: 100%;
  }
  .user-info{
    padding-top: 2.4rem;
    border-top: 2px solid hsla(0 0% 0% / .1);
  }
  .cart_item form{
    margin-top: 1.6rem;
  }
  .cart-success .user-info{
    padding-top: 0;
    border: none;
  }
}
@media screen and (max-width: 768px){
  .success-bar{
    flex-direction: column;
    align-items: flex-start;
  }
}
@media screen and (max-width: 640px){
  .cart_item{
    flex-direction: column;
  }
  .cart_item .img-wrapper{
    width: 100%;
  }
  .cart_item .product-details{
    width: 100%;
    padding: 1.6rem 0 0;
  }
}
@media screen and (max-width: 420px){
  .cart_item .product-details{
    flex-direction: column;
  }
  .cart_item .product-details .product-content{
    width: 100%;
    padding-bottom: 1.6rem;
    border-bottom: 2px solid hsla(0 0% 0% / .1);
    margin-bottom: .8rem;
  }
  .cart_item .product-details .product_pricing{
    width: 100%;
  }
  .cart_item form{
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
  }
  .cart_item form input.qty{
    width: 100%;
  }
  .cart_item form input.superbutton, .cart_item form button.superbutton{
    width: calc(100% - 4rem);
  }
  .cart_item form button.remove-btn{
    width: 3.2rem;
  }
}