/* Modern CSS reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* #root,
#__next {
  isolation: isolate;
} */

/* Variables */

:root {
  /* === Primary Green === */
  --color-green-500: hsl(158, 36%, 37%); /* Medium green - primary */
  --color-green-700: hsl(158, 42%, 18%); /* Dark green - hover/active */

  /* === Neutral Palette === */
  --color-black-900: hsl(212, 21%, 14%); /* Very dark blueish black */
  --color-grey-500: hsl(228, 12%, 48%); /* Medium grey - subtext */
  --color-cream-100: hsl(30, 38%, 92%); /* Light cream - background */
  --color-white-100: hsl(0, 0%, 100%); /* Pure white - main bg */

  /*Font Families*/
  --font-sans: "Montserrat", sans-serif;
  --font-serif: "Fraunces", serif;

  /* Font Weights */
  --font-weight-medium: 500;
  --font-weight-bold: 700;
}

body {
  font-family: var(--font-sans);
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--color-cream-100);
  padding: 20px;

  @media (width >=768px) {
    align-items: center;
  }
}

.product {
  /* border: 2px red solid; */
  width: 100%;
  max-width: 800px;
  border-radius: 10px;
  overflow: hidden;

  @media (width >=701px) {
    display: flex;
  }

  .product-image {
    width: 100%;
    @media (width >=701px) {
      width: 50%;
      height: auto;
    }
  }
  picture,
  img {
    @media (width >= 701px) {
      height: 100%;
      width: 100%;
      object-fit: cover;
    }
  }
}
.product-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  background-color: white;
  gap: 1rem;

  @media (width >= 701px) {
    width: 50%;
    padding: 30px;
    gap: 1.25rem;
  }

  & p:first-child {
    color: var(--color-grey-500);
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 0.8rem;
  }

  h1 {
    font-family: var(--font-serif);
    font-size: 2rem;
    line-height: 1;
    color: var(--color-black-900);
    margin-bottom: 0px;

    @media (width >=701px) {
      font-size: 2.6rem;
      max-width: 300px;
    }
  }

  .perfume-description {
    color: var(--color-grey-500);
    font-size: 0.9rem;
    margin-bottom: 10px;

    @media (width >=701px) {
      font-size: 1.1rem;
      line-height: 1.8;
    }
  }

  .product-price-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    line-height: 0.5;

    .product-price-sale {
      /* display: inline-block; */
      color: var(--color-green-500);
      font-family: var(--font-serif);
      font-weight: var(--font-weight-bold);
      font-size: 2rem;
    }

    .product-price-original {
      color: var(--color-grey-500);
      text-decoration: line-through;
    }
  }

  .add-to-cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--color-white-100);
    background-color: var(--color-green-500);
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: background-color 0.3s ease;

    img {
      width: 18px;
      height: 18px;
    }

    &:hover,
    &:active {
      background-color: var(--color-green-700);
    }

    @media (width >=701px) {
      /* margin-bottom: 0; */
      font-size: 1.1rem;
      padding: 20px 0;
    }
  }
}
