
:root {
    --clr-primary-400: hsl(158, 36%, 37%);
    --clr-primary-500: hsl(158, 36%, 20%);
    --clr-secondary-200: hsl(30, 38%, 92%);

    --clr-neutral-900: hsl(212, 21%, 14%);
    --clr-neutral-400: hsl(228, 12%, 48%);
    --clr-neutral-100: hsl(0, 0%, 100%);

    --ff-accent: "Fraunces", serif;
    --ff-base: "Montserrat", sans-serif;

    --fw-regular: 500;
    --fw-bold: 700;
}


/* 
=======================================================================
joshwcomeau - A Modern CSS Reset- Last updated on September 13th, 2024.
https://www.joshwcomeau.com/css/custom-css-reset/
*/


/*
  1. Use a more-intuitive box-sizing model.
*/
*, *::before, *::after {
    box-sizing: border-box;
  }
  
  /*
    2. Remove default margin
  */
  * {
    margin: 0;
  }

/* 
Changelog:
June 2023 — I removed the height: 100% from html and body. 
This rule was added to make it possible to use percentage-based heights within the application. 
Now that dynamic viewport units(opens in new tab) are well-supported, 
however, this hacky fix is no longer required.
*/
/*
    3. Allow percentage-based heights in the application
*/
/* html,
body {
    height: 100%;
} */
  
  /*
    Typographic tweaks!
    4. Add accessible line-height
    5. Improve text rendering
  */
  body {
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
  }
  
  /*
    6. Improve media defaults
  */
  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }
  
  /*
    7. Remove built-in form typography styles
  */
  input, button, textarea, select {
    font: inherit;
  }
  
  /*
    8. Avoid text overflows
  */
  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }
  
  /*
    8. Create a root stacking context
  */
 /*  #root, #__next {
    isolation: isolate;
  } */

/* not in joshw comeau css reset */
  h1,
  h2,
  h3 {
    line-height: 1;
  }

/* =============================================================
   General styling 
*/

body {

    font-family: var(--ff-base);
    font-weight: var(--fw-regular);
    font-size: 0.875rem;
    color: var(--clr-neutral-400);
    background-color: var(--clr-secondary-200);

    /* for this project only */
    display: grid;
    min-height: 100vh;/* height that fills up the viewport */
    place-content: center;
    margin: 1rem;

}

/* ================================================================ 
Utilities 
*/
.flex-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap; /* not necessary here, but prevent overflow */
    align-items: center;
}

/* Inclusively Hidden 
https://www.scottohara.me/blog/2017/04/14/inclusively-hidden.html
*/
.visually-hidden:not(:focus):not(:active) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }



/* ================================================================ 
button
*/
.button {
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
  
    border: 0;
    border-radius: 0.5rem;
    padding: 0.75em 1.5em;
    background-color: var(--clr-primary-400);
    color: var(--clr-neutral-100);
    font-weight: var(--fw-bold);
    font-size: 0.925rem;
}

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

.button:is(:hover, :focus) {
    background-color: var(--clr-primary-500);
}



/* ================================================================= 
product styles 
*/

.product {
    /* scoped custom property */
    --content-padding: 1.5rem;
    --content-spacing: 1rem;

    display: grid;
    background-color: var(--clr-neutral-100);
    border-radius: 0.5rem;
    overflow: hidden;
    max-width: 600px;
}

@media (min-width: 600px) {
    .product {
        grid-template-columns: 1fr 1fr;
        --content-padding: 1.5rem;
    }
}

.product__content {
    /* border: 3px solid red; */
    display: grid;
    gap: var(--content-spacing);
    padding: var(--content-padding);

}

.product__category {
    font-size: 0.8125rem;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.product__title {
    font-size: 2rem;
    font-family: var(--ff-accent);
    color: var(--clr-neutral-900);
}

.product__price {
    font-size: 2rem;
    font-family: var(--ff-accent);
    color: var(--clr-primary-400);
}