@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&display=swap");

/* Global style */

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

/* Design System */

:root {
  /* colors */

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

  /* fonts */

  --primary-font: "Montserrat", sans-serif;
  --secondary-font: "Fraunces", serif;
}

/* base style */

html,
body {
  background-color: var(--cream);
  min-height: 100%;
  font-family: var(--primary-font);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Card Container */
.main-card {
  display: flex;
  flex-direction: row;
  max-width: 35em;
  background-color: var(--white);

  border-radius: 1em;
}

/* Product Image Section */
.perfume-img {
  width: 50%;
}

.perfume-img img {
  width: 100%;
  height: 100%;
  border-top-left-radius: 1em;
  border-bottom-left-radius: 1em;
  object-fit: cover;
}

/* Product Information Section */
.card-data {
  width: 50%;
  padding: 2em;
}

/* Category Label */
.pre-heading {
  font-family: var(--secondary-font);
  font-weight: 200;
  letter-spacing: 0.3em;
  margin-bottom: 1em;
  color: var(--grey);
}

/* Product Title */
.heading {
  line-height: 1em;
  font-family: var(--secondary-font);
  font-weight: 700;
  margin-bottom: 1em;
}

/* Product Description */
.perfume-detail {
  color: var(--grey);
  margin-bottom: 1em;
  line-height: 1.3em;
}

/* Price Section */

.price {
  margin-bottom: 1em;

  display: flex;
  flex-direction: row;
  font-family: var(--secondary-font);
}

.new-price {
  color: var(--green-500);
  font-size: 2em;
  font-weight: 900;
  margin-right: 0.5em;
}

.old-price {
  color: var(--grey);
  text-decoration: line-through;
  align-self: center;
}

/* CTA Button */
.btn {
  display: block;
  background-color: var(--green-500);
  color: var(--white);
  padding: 1em;
  text-align: center;
  border-radius: 0.7em;
  text-decoration: none;
  cursor: pointer;
}

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

.cart-img {
  margin-right: 0.5em;
}

/*breaking point for phone 600*/

@media only screen and (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .main-card {
    flex-direction: column;
    width: 80%;
    margin: 10%;
  }

  .perfume-img {
    width: 100%;
  }

  .perfume-img img {
    width: 100%;
    height: 15em;
    border-top-left-radius: 1em;
    border-top-right-radius: 1em;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .card-data {
    width: 100%;
  }
}
