@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700;9..144,800;9..144,900&family=Montserrat:wght@500;600;700;800;900&display=swap');

:root {
  --white:#ffffff;
  --darkgrey:#747682;
  --mediumlightgrey:#707176;
  --darkgreen:#3D8168;
  --black:#000000;
  --bluishblack:#242A31;
  --cream:#F2E9E2;
  --buttonGreen: hsl(156, 34%, 16%);
}

*, a{
  color:var(--black);
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 500;
  margin: 0px 0px 0px 0px;
  text-decoration: none;
}

body {
  background-color: var(--cream);
}

.card-container {
  background-color: var(--white);
  border-radius: 10px;
  display: grid;
  grid-template-rows: repeat(2, 1fr); /*questo serve per creare due righe di uguale altezza, 2volte 1frazione di spazio*/
  width:  350px;
  height: 620px;
  margin:30px 15px;
  margin-left: auto;
  margin-right: auto;
}

.images {
  height: 239px;
  border-top-left-radius: 10px;
  border-bottom-left-radius:0px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 0px;
  background-image: url("./images/image-product-mobile.jpg");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
}

.description {
  margin: 20px;
}

.top-content h2 {
  color: var(--mediumlightgrey);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 20px;
}

.top-content h1 {
  color: var(--bluishblack);
  font-size: 2.5em;
  font-weight: 700;
  font-family: 'Fraunces', serif;
  line-height: 36px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.paragraph p {
  color: var(--darkgrey);
  font-size: 1.1em;
  font-weight: 500;
  line-height: 20px;
  margin-top: 20px;
  margin-bottom: 5px;
  margin-right: 35px;
}

.amount {
  align-items: center;
  display: grid;
  grid-template-columns: repeat(2, 150px);
  justify-content: start;
  margin-top: 20px;
  margin-bottom: 8px;
}

.amount .greenPrice p{
  color: var(--darkgreen);
  font-size: 2.5em;
  font-weight: 800;
  font-family: 'Fraunces', serif;
}

.amount .strikedPrice p {
  color: var(--mediumlightgrey);
  text-decoration: line-through;
}

.button {
  align-items: center;
  background-color: var(--darkgreen);
  border-radius: 8px;
  border: none;
  height: 50px;
  margin-top: 16px;
  padding-left: 80px;
  padding-right: 80px;
  width: 300px;
}

.button .button-cart {
  display: grid;
  grid-template-columns: repeat(2,1fr);
}

.button  p {
  min-width: 100px;
  font-size: 1.2em;
  color: var(--white);
  font-weight: 500;
}

.button:hover{
  background-color: var(--buttonGreen);
}

@media screen and (min-width: 700px){
  .card-container {
    grid-template-rows:0;
    grid-template-columns: repeat(2, 1fr);
    width: 600px;
    height: 450px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 150px;
    margin-bottom: auto;
  }

  .images {
    width: 300px;
    height: 450px;
    border-top-left-radius: 10px;
    border-bottom-left-radius:10px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
    background-image: url("./images/image-product-desktop.jpg");
  }

  .description {
    margin: 40px 30px;
    max-width: 250px;
  }

  .top-content h1 {
    line-height: 1;
    margin-right: 30px;
  }

  .paragraph p {
    margin-right: 30px;
    line-height: 1.7;
  }

  .amount {
    margin-top: 29px;
  }
  
  .button {
    width: 240px;
    margin-top: 20px;
    padding-left: 60px;
    padding-right: 60px;
  }
}