:root {
  --light-green: hsl(158, 36%, 37%);
  --dark-green: hsl(158, 42%, 18%);
  --black: hsl(212, 21%, 14%);
  --grey: hsl(228, 12%, 48%);
  --cream: hsl(30, 38%, 92%);
  --white: hsl(0, 0%, 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--cream);
  min-height: 100vh;
  margin: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
}

main {
  display: flex;
  flex: 1;
  max-width: 40rem;
  max-height: 31.25rem;
  overflow: hidden;
  margin: 0 auto;
  border-radius: 10px;
}

picture {
  min-width: 30em;
  height: auto;
  flex: 1;
  background-image: url(https://raw.githubusercontent.com/sola-fairy/product-card/refs/heads/main/images/image-product-desktop.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 2;
  background-color: var(--white);
  padding: 2.857em;
  min-height: 0;
}

.product-type {
  text-transform: uppercase;
  font-size: 1em;
  letter-spacing: 5px;
  color: var(--grey);
}

h1 {
  font-family: 'Fraunces', serif;
  font-size: 3em;
  margin: 0;
}

p {
  color: var(--grey);
  line-height: 160%;
  font-size: 1.2em;
  margin: 0;
}

.price {
  display: flex;
  align-items: center;
  margin: 0;
}

.current {
  color: var(--light-green);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 3em;
}

.previous {
  color: var(--grey);
  text-decoration: line-through;
  margin-left: 15px;
}

button {
  background-color: var(--light-green);
  color: var(--white);
  border: none;
  border-radius: 15px;
  padding: 0.714em;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

button img {
  width: 20px;
  margin-right: 10px;
}

button:hover {
    background-color: var(--dark-green);
  }

footer {
  margin-top: 5px;

  a {
    color: var(--grey);
  }
  a:hover {
    color: var(--dark-green);
  }
}

@media (max-width: 800px) {
  main {
    flex-direction: column;
    max-height: none;
    margin: 0 1em;
    max-width: 32.143em;
    border-radius: 0px;
  }
  picture {
    background-image: url(https://raw.githubusercontent.com/sola-fairy/product-card/refs/heads/main/images/image-product-mobile.jpg);
    min-height: 30em;
  }
}