/* Import fonts */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&family=Overpass:ital,wght@0,100..900;1,100..900&family=Poppins:wght@400;700&family=Roboto:ital,wght@0,100..900;1,100..900&family=Young+Serif&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&family=Overpass:ital,wght@0,100..900;1,100..900&family=Poppins:wght@400;700&family=Roboto:ital,wght@0,100..900;1,100..900&family=Young+Serif&display=swap");

/* Custom variables -- color */

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

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

body {
  background-color: var(--cream);
  font-size: 14px;
  width: 100%;
  height: 100vh;
}

.main-container {
  display: flex;
  flex-direction: row;
  margin: 7rem auto;
  background-color: var(--white);
  max-width: 700px;
  min-width: 375px;
  border-radius: 0.6rem;
  overflow: hidden;
}

.left-side {
  width: 55%;
  height: auto;
  background-image: url(./images/image-product-desktop.jpg);
  background-position: top;
  background-size: cover;
  background-repeat: no-repeat;
}

.right-side {
  width: 50%;
  margin: 1.5rem 2rem 0 2.5rem;
  padding: 0.2rem;
}

.headers {
  display: flex;
  flex-direction: column-reverse;
  margin-top: 1rem;
}

/* h1 styling */

.main-header {
  font-family: "Fraunces";
  font-size: 40px;
  font-weight: 700;
  color: var(--black-text);
  margin: 0;
}

/* h2 styling */

.header-two {
  color: var(--grey-text);
  font-family: "Montserrat";
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.3em;
  font-weight: 500;
}

/* paragraph styling */

p {
  width: 80%;
  margin-top: 1.2rem;
  color: var(--grey-text);
  font-family: "Montserrat";
  font-weight: 500;
  line-height: 1.7em;
}

/* prices section styling */

.prices {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  width: 68%;
}

.active-price {
  font-family: "Fraunces";
  font-size: 34px;
  font-weight: 700;
  color: var(--green-500);
}

.discounted-price {
  font-family: "Montserrat";
  color: var(--grey-text);
  font-weight: 500;
  text-decoration: line-through;
}

/* button styling */

button {
  display: block;
  width: 100%;
  padding: 1rem 0.3rem;
  background-color: var(--green-500);
  color: var(--white);
  font-size: 1.1rem;
  margin: 2rem auto;
  gap: 8rem;
  border-radius: 0.6rem;
  border: none;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

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

/* adding icon to the add to cart button */

.btn-text::before {
  content: url("./images/icon-cart.svg");
  padding-right: 0.5rem;
}

@media (max-width: 450px) {
  .main-container {
    width: 92%;
    flex-direction: column;
    margin: 4.2rem auto;
    border-radius: 0.8rem;
  }

  .left-side {
    width: 100%;
    height: 322px;
    background-image: url(./images/image-product-mobile.jpg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }

  .right-side {
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0 1.8rem;
  }

  .main-header {
    font-size: 2rem;
    margin-top: 1rem;
  }

  .prices {
    margin-top: 1.2rem;
    width: 72%;
  }

  p {
    width: 100%;
  }
}

/* Bottom attribution section */
.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}
