/* ==================================
  GLOBALS
===================================== */

:root {
  --primary-100: hsl(21, 94%, 87%);
  --primary-200: hsl(21, 80%, 74%);
  --primary-300: hsl(21, 65%, 59%);
  --primary-400: hsl(21, 57%, 50%);
  /* primary/main color */
  --primary-500: hsl(21, 62%, 45%);
  --primary-600: hsl(21, 77%, 34%);
  --primary-700: hsl(21, 81%, 29%);
  --primary-800: hsl(21, 84%, 25%);
  --primary-900: hsl(21, 91%, 17%);

  /* grey */
  --grey-50: #f8fafc;
  --grey-100: #f1f5f9;
  --grey-200: #e2e8f0;
  --grey-300: #cbd5e1;
  --grey-400: #94a3b8;
  --grey-500: #64748b;
  --grey-600: #475569;
  --grey-700: #334155;
  --grey-800: #1e293b;
  --grey-900: #0f172a;

  /* rest of the colors */
  --black: #222;
  --green-dark: #0f5132;
  --green-light: #d1e7dd;
  --red-dark: #842029;
  --red-light: #f8d7da;
  --white: #fff;

  --fs-text-small: 0.7em;

  /* rest of the vars */
  --border-radius: 0.25rem;
  --color-background: var(--grey-50);
  --color-text: var(--grey-900);
  --ls-text: 1px;
  --transition: 0.3s ease-in-out all;
  --width-max: 1120px;
  --width-fixed: 600px;
  --width-fluid: 90vw;

  /* box shadow*/
  --shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-4: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==================================
  RESET
===================================== */

html {
  box-sizing: border-box;
}

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

a {
  text-decoration: none;
}

body {
  color: var(--color-text);
  background: var(--color-background);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  line-height: 1.75;
}

header {
  margin-inline-start: 2rem;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--fs-heading);
  font-weight: 400;
  letter-spacing: var(--ls-text);
  line-height: 1.3;
  margin: 0;
  margin-bottom: 1.38rem;
  text-transform: capitalize;
}

h1 {
  font-size: 3.052rem;
  margin-top: 0;
}

h2 {
  font-size: 1.25rem;
  /*font-size: 2.441rem; */
}

h3 {
  font-size: 1.953rem;
}

h4 {
  font-size: 1.563rem;
}

h5 {
  font-size: 1.25rem;
}

img {
  display: block;
  object-fit: cover;
  width: 100%;
}

small,
.text-small {
  font-size: var(--fs-text-small);
}

p {
  margin-bottom: 1.5rem;
  max-width: 40em;
}

ul {
  list-style-type: none;
  padding: 0;
}

/* ==================================
  ACCESSIBILITY
===================================== */
.visually-hidden {
  clip: rect(1px, 1px, 1px, 1px) !important;
  height: 1px !important;
  border: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
}

/* ==================================
  ALERT
===================================== */
.alert-danger {
  font-weight: 700;
}

/* ==================================
  FILTERS
===================================== */

.product__filter h2 {
  font-size: 0.85rem;
  font-weight: 500;
  margin: 1.5rem 0 0.5rem;
}

.search-input {
  background: var(--grey-200);
  border-color: transparent;
  border-radius: var(--border-radius);
  letter-spacing: var(--ls-text);
  padding: 0.5rem;
}

.company__btn {
  border-color: transparent;
  background: transparent;
  color: var(--grey-500);
  cursor: pointer;
  display: block;
  font-size: 0.85rem;
  letter-spacing: var(--ls-text);
  margin: 0.25em 0;
  padding: 0.25rem;
  text-transform: capitalize;
  transition: var(--transition);
}

.company__btn:hover {
  color: var(--grey-700);
  font-weight: 600;
}

/* ==================================
  PRODUCTS
===================================== */

.product {
  margin-bottom: 1rem;
}

.product footer {
  padding: 0.75rem 0;
  text-align: center;
}

.product__image {
  border-radius: var(--border-radius);
  height: 15rem;
}

.product__name {
  color: var(--grey-500);
  letter-spacing: var(--ls-text);
  margin-bottom: 0.25rem;
  text-transform: capitalize;
}

.product__price {
  color: var(--grey-700);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: var(--ls-text);
  margin-bottom: 0;
}

.product-section {
  display: grid;
  grid-gap: 1rem;
  margin: 4rem auto;
  max-width: var(--width-max);
  width: var(--width-fluid);
}

@media screen and (min-width: 768px) {
  .product-section {
    grid-template-columns: 200px 1fr;
  }
}

@media screen and (min-width: 992px) {
  .product {
    margin-bottom: 0;
  }

  .product__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .product__list .product__image {
    height: 10rem;
  }

  .product__list .product__name {
    font-size: 0.85rem;
  }

  .product__list .product__price {
    font-size: 0.85rem;
  }
}

@media screen and (min-width: 1170px) {
  .product__list {
    grid-template-columns: repeat(3, 1fr);
  }
}
