/* local fonts*/
@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');

@font-face {
  font-family:  Montserrat;
  src: url(./fonts/Montserrat-VariableFont_wght.ttf);
}

@font-face {
  font-family: Fraunces;
  src: url(./fonts/Fraunces-Italic-VariableFont_SOFT\,WONK\,opsz\,wght.ttf);
}
/* 1. Use a more-intuitive box-sizing model */


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

/* 2. Remove default margin */
* {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. Add accessible line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

:root {
  /* colors (primary)*/
  --Prim-green-500: hsl(158, 36%, 37%);
  --prim-green-700: hsl(158, 42%, 18%);

  /* colors (neutral)*/
  --neutral-black: hsl(212, 21%, 14%);
  --neutral-grey: hsl(228, 12%, 48%);
  --neutral-cream: hsl(30, 38%, 92%);
  --neutral-white: hsl(0, 0%, 100%);

  /* typography */

  --paragraph-size: 0.875rem;
  --regular-weight: 500;
  --bold-weight: 700;

  /* font family*/

  --base-font:Montserrat;
  --accent-font: Fraunces;
  --fraunces-fontweight: 700;
}

body {
  background-color: var(--neutral-cream);
  font-family: var(--base-font);
  height: auto;
  align-self: center;
  height: 100svh;
}

/* this is to center the card itself */

.wrapper {
  display: grid;
  grid-template-columns: 1fr;
  place-content: center;
  justify-content: center;
  height: 100svh;
  margin: 1em;
}

/* card  */
#product__card {
  background-color: var(--neutral-white);
  max-width: 600px;
  justify-self: center;
  border-radius: 0.5rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  align-self: center;
}


.catergory__txt {
  text-transform: uppercase;
  font-weight: var(--regular-weight);
  letter-spacing: 0.3rem;
  color: var(--neutral-black);
  font-size: clamp(0.3rem, 00.875rem + 1vw, 0.7rem);
}

.product__content {
  display: flex;
  flex-direction: column;
  gap: .8em;
  padding: 1em;
  height: auto;
}



.product__title,
.new__pricetag {
  font-family: var(--accent-font);
  font-weight: var(--bold-weight);
  line-height: 1;
  font-size: clamp(1rem, 0.875rem + 4vw, 2rem);
}

.product__description {
  font-weight: var(--regular-weight);
  color: var(--neutral-grey);
  font-size: var(--paragraph-size);
  line-height: 1.5;
  margin-bottom: 1em;
}

.price__section {
  margin-bottom: 0.5em;
  text-align: left;
}

.old__pricetag {
  line-height: 1px;
  color: var(--neutral-grey);
  font-weight: var(--regular-weight);
  font-size: 14px;
}

.new__pricetag {
  font-size: clamp(0.4rem, 0.875rem + 8vw, 2rem);
  margin-right: 0.4em;
  color: var(--Prim-green-500);
  font-weight: var(--bold-weight);
}

/* add to cart button */
button {
  background-color: var(--Prim-green-500);
  padding: 0.7em 0;
  border-radius: 0.5em;
  font-weight: var(--bold-weight);
  color: var(--neutral-white);
  outline: none;
  border: none;
  cursor: pointer;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5em;
}

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

/* icon on button */
.button[data-icon="shopping-cart"]::before {
  content: "";
  width: 15px;
  height: 16px;
  background-image: url(./images/icon-cart.svg);
  display: block;
}


/* for med - large screens */

@media screen and (min-width: 600px) {


  #product__card {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    margin: 1em;
  }

  .product__content {
    width: 600px;
  
    padding: 2em;
    gap: 1em;
  }

  img,
  picture,
  video,
  canvas,
  svg {
    display: block;
    aspect-ratio: 9/16;
    object-fit: cover;
  }
}
