:root {
  /* FONT SIZE : Scale= 16 x1.25 */
  --text-sm: 1.4rem; /* 1.28rem*/
  --text-link: 1.4rem; /* 1.4rem */
  --text-paragraph: 1.4rem; /* 1.6rem */
  --text-h6: 2.3rem;
  --text-h5: 2.5rem;
  --text-h4: 3.125rem;
  --text-h3: 3.906rem;
  --text-h2: 4.883rem;
  --text-h1: 6.104rem;

  /* SPACING */
  --space-xs: 0.4rem; /* 4px */
  --space-sm: 0.8rem; /* 8px */
  --space-md: 1.6rem; /* 16px */
  --space-lg: 3.2rem; /* 32px */
  --space-xl: 6.4rem; /* 64px */
  --space-2xl: 12.8rem; /* 128px */
  /* Guidance:
  Use:
    --space-lg or xl for section spacing
    --space-md for card/grid gap
    --space-sm for text or button spacing */

  /* FONT WEIGHT */
  --fw-500: 500;
  --fw-700: 700;

  /* LINE HEIGHT */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;

  /* LETTER SPACING : for big letter gap of heading tags*/
  /* --letter-spacing-tight: -2px; */

  /* FONT FAMILY */
  --ff-body: "Montserrat", sans-serif;
  --ff-head: "Fraunces", sans-serif;

  /* Primary */

  --Green-500: hsl(158, 36%, 37%);
  --Green-700: hsl(158, 42%, 18%);

  /* Neutral */

  --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;
}

html {
  /* 62.5% of 16px = 10px */
  /* 62.5% of 24px = 15px */
  /* When browser change font-size it will scale base on browser font-size */
  font-size: 62.5%;
}

body {
  font-family: var(--ff-body);
  font-weight: var(--fw-500);
  line-height: var(--line-height-normal);
  color: var(--Grey);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--fw-bold);
  line-height: var(--line-height-tight);
  /* letter-spacing: -2px; NOTE: depend on font */
  /* color: black; depend on style*/
}

/* use website Typescale.com */
h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-h4);
}

h5 {
  font-size: var(--text-h5);
}

h6 {
  font-size: var(--text-h6);
}

p {
  /* font size 16px or 20px base on text readability */
  font-size: var(--text-paragraph);
}

a {
  text-decoration: none;
  font-size: var(--text-link);
  display: inline-block;
}

ul {
  list-style: none;
}

span {
  display: inline-block;
}

/* === Styling layout === */
.container {
  min-height: 100vh;
  background-color: var(--Cream);

  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-xl) var(--space-md);
}
.card {
  display: flex;
  max-width: 580px;
  background-color: var(--White);

  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 2px 1px 6px rgba(0, 0, 0, 0.1);
}
.card-image,
.card-content {
  flex: 1;
}

.card-image {
  background-image: url("../images/image-product-desktop.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 2.4rem;
}
.card-content {
  padding: 2.4rem;
}
.product-name {
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: var(--space-md);
}
.card-header {
  font-family: var(--ff-head);
  color: var(--Green-700);
  font-weight: var(--fw-700);
  line-height: 1;
  margin-bottom: var(--space-md);
}
.text {
  margin-bottom: var(--space-md);
}
.card-price {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}
.price-discount {
  font-size: var(--text-h4);
  font-family: var(--ff-head);
  color: var(--Green-500);
  font-weight: var(--fw-700);

  margin-bottom: var(--space-md);
}
.price-original {
  text-decoration: line-through;
}
.btn-add-to-card {
  width: 100%;
  padding: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  border: none;
  border-radius: var(--space-xs);

  font-family: var(--ff-hea);
  font-weight: var(--fw-500);
  color: var(--White);
  background-color: var(--Green-500);

  cursor: pointer;
  transition: 0.2s;
}

.btn-add-to-card:hover {
  background-color: var(--Green-700);
}
.attribution {
  padding: var(--space-md);
  text-align: center;
}

@media (max-width: 500px) {
  .card {
    flex-direction: column;
  }
  .card-image {
    background-image: url("../images/image-product-mobile.jpg");
    flex: auto;
    height: 250px;
  }
}
