:root {
  --primary-font-color: #2a2a2a;
  --secondary-font-color: #eeeeee;
  --primary-background-color: #ffffff;
  --third-background-color: #d8d8d8;
  --reversed-background-color: #2a2a2a;
  --primary-border-color: #e0e0e0;
  --primary-shadow-color: #f1f1f1;
}
body.darkMode {
  --primary-font-color: #eeeeee;
  --secondary-font-color: #2a2a2a;
  --primary-background-color: #1a1a1a;
  --third-background-color: #272727;
  --reversed-background-color: #eeeeee;
  --primary-border-color: #171717;
  --primary-shadow-color: #2e2e2e;
}
/*------------------------------ 
        Common Styles 
------------------------------*/
* {
  box-sizing: border-box;
  user-select: none;
  font-family: Poppins, sans-serif;
  text-decoration: none;
  color: var(--primary-font-color);
  margin: 0;
  padding: 0;
}
body {
  background-color: var(--primary-background-color);
}
button {
  cursor: pointer;
  border: none;
  font-weight: 600;
  padding: 10px;
}
.title {
  font-size: 26px;
  font-weight: 500;
  padding: 10px 0;
}
.subTitle {
  font-size: 24px;
  font-weight: 400;
  padding: 10px 0;
}
svg {
  width: 30px;
}

/*------------------------------ 
      Template | Container 
------------------------------*/
.container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  transition: 0.5s;
}
.navWraper {
  position: fixed;
  left: 0;
  right: 0;
  background-color: var(--primary-shadow-color);
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-column: 1 / -1;
  box-shadow: 1px 1px 5px var(--primary-border-color);
  border-bottom: 1px solid var(--primary-border-color);
  padding: 10px 0;
}
nav {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}
nav .title {
  padding: 0;
}
.cartIcon {
  cursor: pointer;
  position: relative;
  border-radius: 50%;
}
.cartIcon span {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  background-color: #ff0000;
  color: #eeeeee;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  top: 50%;
  left: -5px;
}
.icon-container {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mainWraper {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-column: 1 / -1;
  padding-top: 90px;
}

/*------------------------------ 
    Template | Shopping Cart 
------------------------------*/
.cartContent {
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: fixed;
  background-color: var(--third-background-color);
  max-width: 100%;
  width: 480px;
  top: 0;
  bottom: 0;
  right: -480px;
  z-index: 12;
  transition: 0.5s;
}
.cartContent .subTitle {
  color: var(--primary-font-color);
  padding: 10px;
}
.cartContainer {
  overflow: auto;
  padding: 10px;
}
.cartContainer::-webkit-scrollbar {
  width: 0;
}
.cartProduct img {
  width: 100%;
}
.cartProduct {
  display: grid;
  grid-template-columns: 60px 1fr 50px 80px;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.cartItemName {
  text-align: left;
}
.cartProduct p {
  color: var(--primary-font-color);
}
.cartProduct .totalPrice {
  text-wrap: nowrap;
  color: var(--primary-font-color);
}
.cartProduct div {
  display: flex;
  gap: 5px;
  align-items: center;
}
.cartProduct div span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  background-color: var(--primary-background-color);
  color: var(--primary-font-color);
  border-radius: 50%;
  cursor: pointer;
}
.cartProduct:nth-child(even) {
  background-color: var(--primary-shadow-color);
}

.cartBtns {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.cartBtns button {
  background-color: #ffdd55;
  font-size: 16px;
  padding: 16px;
  color: #2a2a2a;
}
.cartBtns button.cartClose {
  background-color: #ff7070;
}
body.activeCart .cartContent {
  right: 0;
}

/*------------------------------ 
    Index | Products Container 
------------------------------*/
.productsContainer {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-column: 1 / -1;
  gap: 20px;
  padding: 10px;
}
.product {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
  background-color: var(--primary-shadow-color);
  border: 1px solid var(--primary-border-color);
  border-radius: 10px;
  padding: 10px;
}
.product img {
  filter: drop-shadow(0 10px 20px rgba(60, 60, 60, 0.5));
  width: 100%;
}
.product h2 {
  text-align: center;
  flex-grow: 1;
  font-size: 18px;
  font-weight: 500;
}
.product p {
  text-align: center;
  letter-spacing: 3px;
  padding: 5px 0;
}
.product button {
  background-color: var(--reversed-background-color);
  color: var(--secondary-font-color);
  border-radius: 20px;
  padding: 5px 10px;
  margin-bottom: 20px;
}

/*------------------------------ 
    Detail | Product Details 
------------------------------*/
.detailsContainer {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
  text-align: left;
  margin-bottom: 30px;
}
.image img {
  width: 100%;
}
.image {
  position: relative;
  grid-column: span 12;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image::before {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: calc(50% - 150px);
  right: 50px;
  content: "";
  background-color: var(--third-background-color);
  z-index: -1;
  border-radius: 190px 80px 180px 160px;
}
.detailsContent {
  grid-column: span 12;
  padding: 10px;
}
.detailTitle {
  font-size: 24px;
  font-weight: 500;
  padding: 0;
  margin: 0 0 10px 0;
}
.detailPrice {
  font-weight: 500;
  font-size: x-large;
  letter-spacing: 4px;
  margin-bottom: 20px;
}
.detailBtns {
  display: flex;
  gap: 10px;
}
.detailBtns button {
  background-color: var(--third-background-color);
  border: none;
  padding: 15px 20px;
  border-radius: 20px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: medium;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detailBtns button:nth-child(2) {
  background-color: var(--reversed-background-color);
  color: var(--secondary-font-color);
  font-weight: 400;
}
.detailsContainer .description {
  font-weight: 300;
  margin-top: 20px;
}

/*------------------------------ 
    Detail | Product Details 
------------------------------*/
.titleSimilar {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 24px;
  font-weight: 500;
  padding-top: 20px;
}

/*------------------------------ 
        Rseponsiveness 
------------------------------*/
@media (min-width: 481px) {
  .cartContent {
    width: 360px;
    right: -360px;
  }
}

@media (min-width: 600px) {
  .productsContainer {
    gap: 30px;
  }
  .product {
    grid-column: span 4;
  }
  .image {
    grid-column: span 7;
  }
  .detailsContent {
    grid-column: span 5;
  }
  .detailTitle {
    padding: 40px 0 0 0;
  }
}

@media (min-width: 769px) {
  .cartContent {
    width: 400px;
    right: -400px;
  }
  nav {
    grid-column: 2 / -2;
  }
  .mainWraper .productsContainer {
    grid-column: 2 / -2;
  }
  .mainWraper .detailsContainer {
    grid-column: 2 / -2;
    gap: 30px;
  }

  .product h2 {
    font-size: 20px;
  }
  .image {
    grid-column: span 6;
  }
  .detailsContent {
    grid-column: span 6;
  }
}

@media (min-width: 1025px) {
  .product {
    grid-column: span 3;
  }
  .image img {
    width: 90%;
  }
  .image::before {
    inset: 0;
    margin: auto;
    left: calc(50% - 190px);
    right: 100px;
    top: 30px;
  }
}
