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

:root {
  /* Layout */
  --layout-mobile-width: 375px;
  --layout-desktop-width: 1440px;

  /* 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%);

  /* Typography */
  --font-size-body: 14px;

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

  --font-weight-regular: 500;
  --font-weight-bold: 700;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-body);
  color: var(--black);
  background-color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card {
  background-color: var(--white);
  border-radius: 10px;
  max-width: var(--layout-mobile-width);
  margin: 1em;
  overflow: hidden;
}

.img_mobile {
  display: block;
  width: 100%;
}
.img_desktop {
  display: none;
}

.card_content {
  margin: 1.8em;
}

.tag {
  font-family: var(--font-family-primary);
  font-size: 0.6em;
  letter-spacing: 0.5em;
  text-transform: uppercase;
}

.title {
  font-family: var(--font-family-secondary);
  font-weight: var(--font-weight-bold);
  font-size: 2em;
  margin-top: 0.5em;
  line-height: 1em;
}

.description {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  color: var(--grey);
  font-size: 0.9em;
  line-height: 1.5em;
  margin-top: 1em;
}

.prices {
  display: flex;
  align-items: center;
  margin-top: 1.5em;
}

.actual_price {
  font-family: var(--font-family-secondary);
  font-weight: var(--font-weight-bold);
  font-size: 1.5em;
  color: var(--green-500);
}

.old_price {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  font-size: 0.8em;
  color: var(--grey);
  text-decoration: line-through;
  margin-left: 1em;
}

.btn {
  width: 100%;
  margin-top: 1.5em;

  background-color: var(--green-500);
  color: var(--white);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-bold);
  font-size: 0.9em;

  padding: 0.8em 1.5em;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

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

.icon {
  width: 1em;
  height: 1em;
}

.attribution {
  font-family: var(--font-family-primary);
  position: fixed;
  bottom: 0;
}

@media (min-width: 769px) {
  body {
    display: flex;
    align-items: center;
    height: 100vh;
  }

  .card {
    display: flex;
    flex-direction: row;

    width: 100%;
    max-width: 520px;
    min-width: 400px;

    height: auto;
    max-height: 380px;
    min-height: 280px;

    background-color: var(--white);
    overflow: hidden;
    margin: 1em;
  }

  .card_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .img_mobile {
    display: none;
  }

  .img_desktop {
    display: block;
    flex: 1;
    max-width: 50%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background-color: var(--cream);
  }
}
