/*root styles*/

:root {
  /* Primary Colors */
  --green-500: hsl(158, 36%, 37%);
  --green-700: hsl(158, 42%, 18%);

  /* Neutral Colors */
  --black: hsl(212, 21%, 14%);
  --grey: hsl(228, 12%, 48%);
  --cream: hsl(30, 38%, 92%);
  --white: hsl(0, 0%, 100%);

  /* Typography */
  --font-montserrat: "Montserrat", sans-serif;
  --font-fraunces: "Fraunces", serif;
  --font-size-paragraph: 14px;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
}

.attribution {
  font-size: 11px;
  text-align: center;
  position: absolute;
  bottom: 0.5rem;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

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

/*mobile design*/

.container {
  background-color: var(--cream);
  font-family: var(--font-montserrat);
  font-size: var(--font-size-paragraph);
  font-weight: var(--font-weight-medium);
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card {
  background-color: var(--white);
  width: 95vw;
  height: 90vh;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}

.image-container {
  width: 100%;
  height: 40%;
  border-radius: 10px 10px 0 0;
  background-image: url("../images/image-product-mobile.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 1.3rem;
}

.perfume {
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 20px;
  font-family: var(--font-montserrat);
}

h1 {
  font-family: var(--font-fraunces);
  font-weight: var(--font-weight-bold);
  color: var(--black);
  font-size: 2rem;
  line-height: 1;
}

.description {
  line-height: 1.5;
  color: var(--grey);
  font-family: var(--font-montserrat);
}

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

.new-price {
  color: var(--green-500);
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  font-family: var(--font-fraunces);
}

.old-price {
  text-decoration: line-through;
  color: var(--grey);
  font-size: 1rem;
  width: fit-content;
  margin-left: 1rem;
  font-family: var(--font-montserrat);
}

.btn {
  background-color: var(--green-500);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: var(--font-weight-bold);
  font-family: var(--font-montserrat);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn:hover {
  background-color: var(--green-700);
}

.cart-icon {
  background-image: url("../images/icon-cart.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 15px;
  height: 15px;
  display: inline-block;
}

@media (min-width: 376px) {
  .card {
    flex-direction: row;
    width: 600px;
    height: 450px;
  }

  .image-container.desktop {
    width: 50%;
    height: 100%;
    border-radius: 10px 0 0 10px;
    background-image: url("../images/image-product-desktop.jpg");
  }

  .card-content {
    width: 50%;
    padding: 2rem;
    justify-content: space-between;
    margin: 0;
    padding: 1rem;
  }
}
