@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Text:ital,wght@0,300..700;1,300..700&display=swap');

:root {
  --color-heading:rgb(95 192 218);
  --color-p: rgb(233, 233, 233);
  --Dark-Blue: hsl(228, 56%, 26%);
  --Very-Dark-Blue: hsl(229, 57%, 11%);
  --color-primary: #c73b0f;
  --margin-bottom: 2rem;
  --font-red-hat: "Red Hat Text", sans-serif;
}

*, 
*::after, 
*::before {
  box-sizing: border-box;
  margin: 0;
}

html {
  font-size: 62.5%;
}

.hidden {
  display: none;
}

body {
  font-family: var(--font-red-hat);
}

main {
  padding: 5rem 2rem;
  position: relative;
}


/* TYPOGRAPHY */

h1 {
  font-size: 4rem;
  font-weight: 800;
}

h2 {
  font-size: 3rem;
  font-weight: 800;
}

.productCategory,
.productName,
.productPrice {
  cursor: pointer;
  display: inline-block;
}

p {
  font-size: 1.7rem; 
}

.productCategory {
  font-size: 1.6rem;
  color: gray;
}

.productName {
  font-size: 2rem;
  margin: 1rem 0;
}

.productPrice {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--color-primary);
}

.btnAddItem {
  font-size: 1.5rem;
  font-weight: 700;
}

.addedToCart {
  text-align: center;
  font-weight: 900;
  font-size: 2rem;
  margin-top: 1rem;
  color: transparent;
}

.cartAnimation{
  color: transparent;
  animation: addedToCart 2s ease-in-out;
}


@keyframes addedToCart {
  0% {
    color: transparent;
  }

  30% {
    color: rgb(51, 153, 51);
  }
  
  80% {
    color: rgb(51, 153, 51);
  }  
  
  100% {
    color: transparent;
  }  
};


.productQuantity, 
.cartDecrement,
.cartIncreament {
  color: white;
  font-size: 1.7rem;
  font-weight: 500;
}

.cart-title {
  font-size: 2.5rem;
  color: var(--color-primary);
}

.cart-items {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cart-details {
  color: var(--color-primary);
  font-size: 1.5rem;
  text-align: center;
}

.order-title {
  font-size: 1.7rem;
  margin: 1.5rem 0;
}

.orderConfirmedIcon {
  width: 3rem;
}

.order-description {
  color: gray;
}


@media screen and (min-width: 768px) {
  .order-title {
    font-size: 4rem;
  }
}


/* PRODUCT ITEM */

.productItem {
  margin: 5rem 0;
  background-color: rgba(241, 243, 244, 0.484);
  border-radius: 1.5rem;
  overflow: hidden;
}

@media screen and (min-width: 768px) {
  .product {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
  }

  .productItem {
    margin: 1rem 0;
  }

  .cartSection, 
  .cartDiv {
    margin-top: 3rem;
  }
}

@media screen and (min-width: 1100px) {

  .main-contents {
    display: flex;
    justify-content: center;
    gap: 5rem;
  }

  .product-section {
    max-width: 70%;
  }

  .cartSection {
    margin-top: 7rem;
  }

  .cartDiv {
    margin-top: 1rem;
  }


}

/* COMPONENTS - PRODUCT HEADER*/

.productHeader {
  position: relative;
}

.productImage img{
  width: 100%;
  height: auto;
}

.btnAddCart {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-25%);
  border-radius: 50rem;
  width: 60%;
  max-width: 20rem;
  min-width: 13rem;
}

.btnAddItem {
  background-color: white;
  border: 1px solid var(--color-primary);
  border-radius: 10rem;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.3rem .5rem;
  cursor: pointer; 
  width: 100%;
  transition: transform .3s;
}

.btnAddItem:hover {
  transform: scale(1.06);
}

.cart-icon {
  margin-right: .5rem;
}

.cart-option {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: var(--color-primary);
  border-radius: 50rem;
  padding: 1.3rem 2rem;
}

.cartDecrement,
.cartIncreament {
  cursor: pointer; 
  border: 1px solid white;
  height: 2rem;
  width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2rem;
  text-align: center;
  padding: 1rem;
}


/* PRODUCT FOOTER */

.product-footer {
  margin-top: 4rem;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
}

/* CART ITEMS */


.cartItem {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px  solid rgb(218, 210, 210);
  padding: 2rem 0;
}

.emptyCart {
  margin: 2rem;
  width: 30%; 
}

@media screen and (min-width: 1100px) {
  .emptyCart {
    width: 50%; 
  }
}

.itemDescription {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.itemDescription img {
  width: 5rem;
  border-radius: .5rem;
}

.itemTitle {
  font-size: 1.4rem;
  font-weight: 600;
}

.numberOfItem {
  color: var(--color-primary);
}

.itemPcs {
  margin-top: .7rem;
}

.numberOfItem, 
.costPerItem,
.totalPerItem {
  font-size: 1.5rem;
  margin-right: 2rem;
 }

 .totalPerItem {
  font-weight: 700;
  align-self: center;
 }

 .removeIcon {
  border: 1px solid var(--color-primary);
  height: 2rem;
  border-radius: 5rem;
  cursor: pointer; 
  padding: .2rem;
  align-self: center;
  transition: transform .5s;
 }

 .removeIcon:hover {
  transform: scale(1.09);
 }

.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
}

.orderTotal {
  font-size: 1.7rem;
}

.grandTotal,
.grandTotalConfirm {
  font-size: 1.8rem;
  font-weight: 700; 
}

.shippingDetails {
  text-align: center;
  font-size: 1.7rem;
  margin: 5rem 0; 
}

.btn {
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btnConfirmOrder, 
.btnNewOrder  {
  background-color: var(--color-primary);
  color: white;
  padding: 1rem 1rem;
  border-radius: 5rem;
  display: inline-block;
  font-size: 1.5rem;
  width: 100%;
  text-align: center;
  transition: background-color .5s;
  margin: 3rem 0; 
}

.btnConfirmOrder:hover, 
.btnNewOrder:hover {
  background-color: #fc5a29;
}

.cartThumbnail {
  width: 30px;
}



@media screen and (min-width: 500px) {
  .btnConfirmOrder, 
  .btnNewOrder  {
    padding: 1.5rem 2rem;
    font-size: 2rem;
  }

  .itemTitle {
    font-size: 1.8rem;
  }

  .numberOfItem, 
  .costPerItem,
  .totalPerItem {
    font-size: 1.7rem;
  }

  .grandTotal,
  .grandTotalConfirm {
    font-size: 3rem;
    font-weight: 700; 
  }
}


/* MODAL WIDWOW */

.modal {
  display: flex;
  align-items: center;
  justify-content: center;
  top: 2rem;
  left: 0;
  width: 100%;
  position: fixed;
  margin: 0 auto;
  transition: all .5s;
}



@media screen and (min-width: 1100px) {
  
}

.overlay {
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.534);
  top: 0;
  left: 0;
  cursor: pointer;
  position: absolute;
  z-index: 1;
}

.modal-content {
  width: 75%;
  max-width: 70rem;
  background-color: rgb(255, 255, 255);
  padding: 5rem 3rem 1rem 3rem;
  border-radius: 2rem;
  z-index: 2;
  position: fixed;
  top: 2%;
  left: 50%;
  max-height: 95%;
  overflow-y: auto; 
  transform: translateX(-50%);
}



