@import url('https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap');
/*
=============== 
Variables
===============
*/

:root {
  /* dark shades of primary color*/
  --clr-primary-1: hsl(21, 91%, 17%);
  --clr-primary-2: hsl(21, 84%, 25%);
  --clr-primary-3: hsl(21, 81%, 29%);
  --clr-primary-4: hsl(21, 77%, 34%);
  /* primary/main color */
  --clr-primary-5: hsl(21, 62%, 45%);
  /* lighter shades of primary color */
  --clr-primary-6: hsl(21, 57%, 50%);
  --clr-primary-7: hsl(21, 65%, 59%);
  --clr-primary-8: hsl(21, 80%, 74%);
  --clr-primary-9: hsl(21, 94%, 87%);
  --clr-primary-10: hsl(21, 100%, 94%);
  /* darkest grey - used for headings */
  --clr-grey-1: #102a42;
  --clr-grey-2: hsl(211, 39%, 23%);
  --clr-grey-3: hsl(209, 34%, 30%);
  --clr-grey-4: hsl(209, 28%, 39%);
  /* grey used for paragraphs */
  --clr-grey-5: hsl(210, 22%, 49%);
  --clr-grey-6: hsl(209, 23%, 60%);
  --clr-grey-7: hsl(211, 27%, 70%);
  --clr-grey-8: hsl(210, 31%, 80%);
  --clr-grey-9: hsl(212, 33%, 89%);
  --clr-grey-10: hsl(210, 36%, 96%);
  --clr-white: #fff;
  --clr-red-dark: hsl(360, 67%, 44%);
  --clr-red-light: hsl(360, 71%, 66%);
  --clr-green-dark: hsl(125, 67%, 44%);
  --clr-green-light: hsl(125, 71%, 66%);
  --clr-black: #222;

  --transition: all 0.3s linear;
  --spacing: 0.1rem;
  --radius: 0.25rem;
  --light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  --max-width: 1170px;
  --fixed-width: 620px;
}
/*
=============== 
Global Styles
===============
*/

*,
::after,
::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: var(--clr-white);
  color: var(--clr-grey-1);
  line-height: 1.5;
  font-size: 0.875rem;
}
ul {
  list-style-type: none;
}
a {
  text-decoration: none;
}
h1,
h2,
h3,
h4 {
  letter-spacing: var(--spacing);
  text-transform: capitalize;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  font-weight: 400;
}
h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.25rem;
}
h4 {
  font-size: 0.875rem;
}
p {
  margin-bottom: 1.25rem;
  color: var(--clr-grey-5);
}
@media screen and (min-width: 800px) {
  h1 {
    font-size: 4rem;
  }
  h2 {
    font-size: 2.5rem;
  }
  h3 {
    font-size: 1.75rem;
  }
  h4 {
    font-size: 1rem;
  }
  body {
    font-size: 1rem;
  }
  h1,
  h2,
  h3,
  h4 {
    line-height: 1;
  }
}
.img {
  width: 100%;
  display: block;
}
.text-slanted {
  font-family: 'Kaushan Script', cursive;
}
.section-center {
  width: 90vw;
  max-width: var(--max-width);
  margin: 0 auto;
}
.section {
  padding: 5rem 0;
}
.btn {
  background: var(--clr-primary-5);
  color: var(--clr-white);
  border-radius: var(--radius);
  padding: 0.375rem 0.75rem;
  text-transform: uppercase;
  letter-spacing: var(--spacing);
  display: inline-block;
  transition: var(--transition);
  border-color: transparent;
  cursor: pointer;
}
.btn:hover {
  background: var(--clr-primary-7);
  color: var(--clr-black);
}
.section-loading {
  text-align: center;
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.page-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--clr-grey-10);
  display: flex;
  align-items: center;
  justify-content: center;
}
/*
=============== 
Navbar
===============
*/

.navbar {
  height: 6rem;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-center {
  width: 90vw;
  max-width: var(--max-width);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-links {
  display: none;
}
.toggle-nav {
  background: var(--clr-primary-5);
  border-color: transparent;
  color: var(--clr-white);
  width: 3.75rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-nav:hover {
  background: var(--clr-primary-3);
}
.toggle-container {
  position: relative;
  margin-top: 0.75rem;
}
.toggle-cart {
  background: transparent;
  border-color: transparent;
  font-size: 1.6rem;
  color: var(--clr-white);
  cursor: pointer;
}
.cart-item-count {
  position: absolute;
  top: -0.85rem;
  right: -0.85rem;
  background: var(--clr-primary-5);
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--clr-white);
  font-weight: bold;
  font-size: 1rem;
}
@media screen and (min-width: 800px) {
  .nav-center {
    position: relative;
  }
  .nav-logo {
    position: absolute;
    top: 50%;
    left: 65%;
    transform: translate(-50%, -50%);
  }
  .toggle-nav {
    display: none;
  }
  .nav-links {
    display: flex;
    font-size: 1.5rem;
    text-transform: capitalize;
  }
  .nav-link {
    color: var(--clr-white);
    margin-right: 3rem;
    letter-spacing: var(--spacing);
    transition: var(--transition);
    font-size: 1.25rem;
  }
  .nav-link:hover {
    color: var(--clr-primary-5);
  }
}
@media screen and (min-width: 992px) {
  .nav-logo {
    left: 50%;
  }
}
/* page navbar */
.page .nav-link {
  color: var(--clr-grey-1);
}
.page .nav-link:hover {
  color: var(--clr-primary-5);
}
.page .toggle-cart {
  color: var(--clr-grey-1);
}
/*
=============== 
Hero
===============
*/
.hero {
  min-height: 100vh;
  margin-top: -6rem;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(./images/main-bcg.jpeg) center/cover;
  display: grid;
  place-items: center;
  color: var(--clr-white);
}
.hero-container {
  width: 90vw;
  max-width: var(--max-width);
}
.hero h1 {
  font-weight: 700;
}
.hero h3 {
  text-transform: none;
  font-size: 1.5rem;
}
.hero-btn {
  color: var(--clr-white);
  background: transparent;
  border: 1px solid var(--clr-white);
  padding: 0.5rem 0.75rem;
  display: inline-block;
  margin-top: 0.75rem;
  text-transform: uppercase;
  letter-spacing: var(--spacing);
  border-radius: var(--radius);
  transition: var(--transition);
}
.hero-btn:hover {
  background: var(--clr-white);
  color: var(--clr-primary-5);
}

@media screen and (min-width: 800px) {
  .hero h3 {
    font-size: 1.5rem;
    margin: 1rem 0;
  }
}

@media screen and (min-width: 992px) {
  .hero h1 {
    font-size: 5.25rem;
    letter-spacing: 5px;
  }
  .hero h3 {
    font-size: 2.75rem;
    margin: 1.5rem 0;
  }
}

/*
=============== 
Sidebar
===============
*/
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  z-index: -1;
  transition: var(--transition);
  opacity: 0;
  background: rgba(0, 0, 0, 0.5);
}
.sidebar-overlay.show {
  opacity: 1;
  z-index: 100;
}
.sidebar {
  width: 90vw;
  height: 95vh;
  max-width: var(--fixed-width);
  background: var(--clr-white);
  border-radius: var(--radius);
  box-shadow: var(--dark-shadow);
  position: relative;
  padding: 4rem;
  transform: scale(0);
}
.show .sidebar {
  transform: scale(1);
}
.sidebar-close {
  font-size: 2rem;
  background: transparent;
  border-color: transparent;
  color: var(--clr-grey-5);
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
}
.sidebar-link {
  font-size: 1.5rem;
  text-transform: capitalize;
  color: var(--clr-grey-1);
}
.sidebar-link i {
  color: var(--clr-grey-5);
  margin-right: 1rem;
  margin-bottom: 1rem;
}
@media screen and (min-width: 800px) {
  .sidebar-overlay {
    display: none;
  }
}
/*
=============== 
Cart
===============
*/
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  transition: var(--transition);
  opacity: 0;
  z-index: -1;
}
.cart-overlay.show {
  opacity: 1;
  z-index: 100;
}
.cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  max-width: 400px;
  background: var(--clr-grey-10);
  padding: 3rem 1rem 0 1rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: var(--transition);
  transform: translateX(100%);
  overflow: scroll;
}
.show .cart {
  transform: translateX(0);
}
.cart-close {
  font-size: 2rem;
  background: transparent;
  border-color: transparent;
  color: var(--clr-grey-5);
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  cursor: pointer;
}
.cart header {
  text-align: center;
}
.cart header h3 {
  font-weight: 500;
}
.cart-total {
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 500;
}
.cart-checkout {
  display: block;
  width: 75%;
  margin: 0 auto;
  margin-bottom: 3rem;
}
/* cart item */
.cart-item {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: auto 1fr auto;

  column-gap: 1.5rem;
  align-items: center;
}
.cart-item-img {
  width: 75px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius);
}
.cart-item-name {
  margin-bottom: 0.15rem;
}
.cart-item-price {
  margin-bottom: 0;
  font-size: 0.75rem;
  color: var(--clr-grey-3);
}
.cart-item-remove-btn {
  background: transparent;
  border-color: transparent;
  color: var(--clr-grey-5);
  letter-spacing: var(--spacing);
  cursor: pointer;
}
.cart-item-amount {
  margin-bottom: 0;
  text-align: center;
  color: var(--clr-grey-3);
  line-height: 1;
}
.cart-item-increase-btn,
.cart-item-decrease-btn {
  background: transparent;
  border-color: transparent;
  color: var(--clr-primary-5);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.25rem;
}
/*
=============== 
Title
===============
*/

.title h2 {
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
}
.title span {
  color: var(--clr-primary-5);
  font-size: 0.85em;
  margin-right: 1rem;
}
/*
=============== 
product
===============
*/
.product-img {
  height: 15rem;
  object-fit: cover;
  border-radius: var(--radius);
}
.product-container {
  position: relative;
}
.product-icons {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  display: flex;
  transition: var(--transition);
}
.product-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: var(--clr-primary-5);
  color: var(--clr-white);
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: var(--transition);
  cursor: pointer;
  font-size: 1rem;
  border-color: transparent;
  margin: 0 0.5rem;
}
.product-icon:hover {
  background: var(--clr-primary-7);
}
.product-container:hover .product-icons {
  opacity: 1;
}
.product footer {
  padding: 0.75rem 0;
  text-align: center;
}
.product-name {
  margin-bottom: 0.25rem;
  text-transform: capitalize;
  letter-spacing: var(--spacing);
}
.product-price {
  margin-bottom: 0;
  color: var(--clr-grey-3);
  font-weight: 700;
}

.featured-center {
  margin: 3rem auto 2rem auto;
  display: grid;
  gap: 1rem;
  min-height: 6rem;
  position: relative;
}
.featured .btn {
  display: block;
  width: 11rem;
  margin: 0 auto;
  text-align: center;
}
@media screen and (min-width: 992px) {
  .featured-center {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
@media screen and (min-width: 1200px) {
  .featured-center {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }
  .product .img {
    height: 13rem;
  }
}
/*
=============== 
About Page
===============
*/
.about-text {
  line-height: 2;
  max-width: 45em;
  margin: 0 auto;
  margin-top: 2rem;
}

/*
=============== 
Products Page
===============
*/
.products {
  width: 90vw;
  display: grid;
  grid-gap: 1rem;
  margin: 4rem auto;
  max-width: var(--max-width);
  position: relative;
}
.filters-container {
  position: sticky;
  top: 1rem;
}
.filters h4 {
  font-weight: 500;
  margin: 1.5rem 0 0.5rem;
}

.search-input {
  padding: 0.5rem;
  background: var(--clr-grey-10);
  border-radius: var(--radius);
  border-color: transparent;
  letter-spacing: var(--spacing);
}
.search-input::placeholder {
  text-transform: capitalize;
}
.company-btn {
  display: block;
  margin: 0.25em 0;
  padding: 0.25rem;
  text-transform: capitalize;
  background: transparent;
  border-color: transparent;
  letter-spacing: var(--spacing);
  color: var(--clr-grey-5);
  cursor: pointer;
  transition: var(--transition);
}
.company-btn:hover {
  color: var(--clr-grey-3);
}
.price-filter {
  background: var(--clr-grey-5) !important;
  color: var(--clr-grey-5);
}
@media screen and (min-width: 768px) {
  .products {
    grid-template-columns: 200px 1fr;
  }
  .categories {
    position: sticky;
    top: 1rem;
  }
}
@media screen and (min-width: 992px) {
  .products-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .products-container .product-img {
    height: 10rem;
  }
  .products-container .product-name {
    font-size: 0.85rem;
  }
  .products-container .product-price {
    font-size: 0.85rem;
  }
}
@media screen and (min-width: 1170px) {
  .products-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
.filter-error {
  position: absolute;
  top: 5rem;
  left: 0;
  width: 100%;
  text-align: center;
  margin-top: 4rem;
}
/*
=============== 
Single Product Page
===============
*/
.page-hero {
  min-height: 20vh;
  display: grid;
  place-items: center;
  background: var(--clr-grey-10);
  color: var(--clr-grey-5);
}
.page-hero-title {
  font-weight: 500;
}
.single-product {
  padding: 2rem 0;
}
.single-product-center {
  margin: 2rem auto;
  display: grid;
  gap: 1rem 2rem;
}
.single-product-img {
  height: 25rem;
  border-radius: var(--radius);
  object-fit: cover;
}
.single-product-company {
  font-size: 1.2rem;
  color: var(--clr-grey-8);
  text-transform: uppercase;
  letter-spacing: var(--spacing);
  margin-bottom: 1.25rem;
}
.single-product-price {
  color: var(--clr-grey-3);
  font-size: 1.25rem;
  font-weight: 500;
}

.product-color {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #222;
  margin: 0.5rem 0.5rem 1.5rem 0;
}

.single-product-desc {
  max-width: 25em;
  line-height: 1.8;
}
@media screen and (min-width: 992px) {
  .single-product-center {
    grid-template-columns: 1fr 1fr;
  }
}
