/* import fonts */
@import url("https://fonts.googleapis.com/css2?family=Quicksand&:wght@200..800&display=swap");
/* VARIABLES */
:root {
  --bg-color: #fff;
  --link-color: #000;
  --link-size: 1.1rem;
  --motif-color: rgb(58, 193, 255);
}

/* General CSS */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Quicksand";
}

html {
  font-size: 1rem;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

a {
  text-decoration: none;
  color: #fff;
}

body {
  position: relative;
  /* overflow-x: hidden; */
  width: 100%;
}

/* HEADER */
header {
  width: 100%;
  height: 100vh;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  /* background-color: rgb(34, 34, 34); */
  /* position: fixed; */
  top: 0;
  left: 0;
  z-index: 99;
  position: relative;
}

nav {
  display: flex;
  gap: 1rem;
  height: 90px;
}

.logo {
  width: 250px;
}

header nav ul {
  display: flex;
  align-items: center;
  color: #fff;
}
header nav ul li {
  list-style: none;
  margin: 0 10px;
  padding: 5px 5px;
  border-radius: 15px;
}
header nav ul li.active {
  border: 1px solid #000;
}
header nav ul li a {
  font-size: var(--link-size);
  display: flex;
  align-items: center;
  height: 32px;
}
header nav ul li.btn {
  background-color: rgba(var(--right-side-bg-color), 0.4);
  border: 1px solid rgb(var(--right-side-bg-color));
}
header nav ul li.btn img {
  width: 32;
  height: 32px;
}
header nav ul li.home a {
  display: flex;
  align-items: center;
}
header nav ul li.home a img {
  margin-right: 5px;
}

/* MAIN */
main {
  width: 100%;
  height: 100%;
  background-color: #fff;
  position: relative;
}

.category-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.category-wrapper h2 {
  font-size: 3rem;
  margin: 4rem 0 2rem 0;
  text-align: center;
}

.category-row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.category-row.thirds > .product-row-link {
  width: 30%;
}

.product-row-link {
  width: 22%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.product-row-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-row-link span {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 0.5rem;
  color: #000;
}

/* PRODUCT BLOCK */
.product-block {
  width: 100%;
  height: 100vh;
  display: flex;
}

.product-block-img {
  width: 50%;
  display: block;
}

/* SHOPFRONT VIDEO */
.shopfront-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}

/* PRODUCT HEADER */
/* .filtered-product-header {
  margin: 2rem 0 0 0;
  font-size: 2rem;
  text-align: center;
} */

/* CATEGORY BUTTONS */
/* #category-button-container {
  display: flex;
  justify-content: center;
  width: 80%;
  gap: 2rem;
  padding: 1rem 0;
}

#category-button-container button {
  background-color: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

#category-button-container button:hover {
  text-decoration: underline;
} */

/* PRODUCT FILTER COMPONENT */
#product-filter {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 2rem 0;
}

#controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

#controls > input {
  width: 30%;
}

#controls > input,
#controls > select {
  padding: 0.5rem;
  font-size: 1.1rem;
}

/* PRODUCTS WRAPPER */
.products-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  padding-bottom: 2rem;
  visibility: hidden;
}

/* RENDERD PRODUCTS */
.products {
  height: 100%;
  width: 80%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.products img {
  width: 100%;
}

.item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 23%;
  position: relative;
}

.item-container {
  background-color: #e6e6e6;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.347),
    0 1px 3px rgba(0, 0, 0, 0.05);
  flex: 1;
}

.item-img {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.desc {
  width: 100%;
  color: #000;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-name {
  font-weight: 900;
}

.product-description {
  color: #343434;
}

.price {
  font-size: 1.6rem;
}

.product-btns {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.learn-more {
  color: #424141;
  margin-right: 2rem;
}

/* MODAL STYLES */
.cart-modal {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  position: fixed;
  z-index: 9999;
  font-size: 1.4rem;
  padding: 1rem;
  border-radius: 2rem;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease-out;
  padding: 0.5rem 1rem;
  background-color: rgb(232, 234, 232);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.347),
    0 1px 3px rgba(0, 0, 0, 0.05);
    color: #000;
}

.item-added,
.item-plus-one,
.item-removed {
  background-color: rgb(232, 234, 232);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.347),
    0 1px 3px rgba(0, 0, 0, 0.05);
    color: #000;
}

.total-items-in-cart {
  background-color: var(--motif-color);
  width: 20px;
  position: absolute;
  border-radius: 30px;
  top: 20px;
  right: 0;
  transform: translateX(-250%);
  color: #000;
  font-size: 1rem;
  text-align: center;
}

/* SEARCH WRAPPER */
.search-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #fff;
  z-index: 1000; /* Ensures it renders over page content */

  /* Move off-screen above the top of the viewport */
  transform: translateY(-100%);

  /* Animate position changes smoothly */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
}

/* Add this class via JavaScript to trigger the slide-down */
.search-wrapper.active {
  transform: translateY(0);
}

.search-input {
  margin-top: 100px;
  width: 70%;
  display: flex;
}

#search-form {
  width: 100%;
}

#search-form input {
  font-size: 1.6rem;
  padding: 0.5rem 1rem;
  width: 100%;
  border-top-left-radius: 2rem;
  border-bottom-left-radius: 2rem;
  border: 1px solid black;
  border-right: none;
}

.search-submit-btn {
  width: 40px;
  border: 1px solid black;
  border-top-right-radius: 2rem;
  border-bottom-right-radius: 2rem;
}

.trending-searches {
  display: flex;
  width: 60%;
  gap: 2rem;
  justify-content: center;
}

.trend-title {
  font-weight: 900;
}

.trend {
  color: #999;
}

.search-row {
  width: 100%;
  display: flex;
}

.search-row-img-text {
  text-align: center;
}

.search-row-wrapper {
  width: 15%;
}

.search-row-img {
  width: 100%;
}

@media (max-width: 768px) {
  html {
    overflow-x: hidden;
  }

  main {
    position: relative;
  }

  header {
    height: 90vh;
  }

  .shopfront-video {
    height: 90vh;
  }

  .product-row-link,
  .category-row.thirds > .product-row-link {
    width: 40%;
    margin-bottom: 1rem;
  }

  .product-block {
    flex-direction: column;
  }

  .product-block-img {
    width: 100%;
  }

  .total-items-in-cart {
    background-color: var(--motif-color);
    width: 20px;
    position: absolute;
    border-radius: 30px;
    top: 20px;
    right: 30px;
    transform: translateX(-100%);
    color: #e6e6e6;
    font-size: 1rem;
  }

  .products {
    width: 100%;
    height: 100%;
    padding: 1rem;
  }
  .products .item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    position: relative;
  }

  .item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    background-color: none !important;
    border-radius: 0 10px 10px 0;
    padding: 10px;
    gap: 10px;
  }

  .cart {
    width: 100%;
    height: calc(100dvh - 90px);
  }

  .cart-modal {
    font-size: 1rem;
  }
}
