/* import fonts */
@import url("https://fonts.googleapis.com/css2?family=Quicksand&:wght@200..800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Phetsarath:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");

/* VARIABLES */
:root {
  --bg-color: #fff;
  --link-color: #000;
  --link-size: 1.1rem;
  --motif-color: rgb(105, 205, 251);
  font-family: sans-serif;
}

.english-font {
  font-family: "Quicksand";
}

.lao-font {
  font-family: "Phetsarath", sans-serif;
}

/* General CSS */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  font-size: 1rem;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

a {
  text-decoration: none;
  color: #fff;
}

body {
  position: relative;
  /* overflow-x: hidden; */
  width: 100%;
}

.welcome-modal {
  background-color: #f8f8f8;
  position: absolute;
  z-index: 2000;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem;
  border-radius: .2rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  display: none;
}

.welcome-logo-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.welcome-logo-container img {
  width: 30%;
}

.welcome-modal a {
  color: #fff;
  background-color: rgb(34, 34, 34);
  width: 30%;
  display: block;
  margin: 0 auto;
  text-align: center;
  padding: .5rem 1rem;
  border-radius: .2rem;
  margin-bottom: .5rem;
}

.welcome-modal hr {
  border: .1px solid rgb(34, 34, 34);
  margin-bottom: 1rem;
}

.close-btn-container {
  display: flex;
  justify-content: end;
  color: red;
}

.welcome {
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 1rem;
}

.welcome-text {
  font-size: 1.2rem;
  margin-bottom: .5rem;
}

.welcome-text.thanks {
  text-align: center;
}

/* 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 {
  display: block;
  margin: 0 auto;
  width: 80%;
  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: start;
  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;
  transition: all 0.3s ease-in-out;
}

.product-row-link:hover,
.search-row-img-wrapper:hover {
  filter: brightness(85%);
}

.product-row-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.2rem;
}

.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 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: 35%;
}

#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-weight: bold;
  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(222, 224, 222);
  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 !important;
  font-size: 1rem;
  text-align: center;
  font-family: "Quicksand", sans-serif;
}

/* 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,
#orderForm input {
  font-size: 1.6rem;
  padding: 0.5rem 1rem;
  width: 100%;
  border-top-left-radius: 0.2rem;
  border-bottom-left-radius: 0.2rem;
  border: 1px solid black;
  border-right: none;
}

.search-submit-btn,
#orderForm button {
  width: 40px;
  border: 1px solid black;
  border-top-right-radius: 0.2rem;
  border-bottom-right-radius: 0.2rem;
}

.orderForm {
  justify-content: center !important;
  font-size: 1.1rem !important;
}

.trending-searches {
  display: flex;
  width: 60%;
  gap: 2rem;
  justify-content: center;
}

.trend-title {
  font-weight: 900;
}

.trend {
  color: #999;
}

.trend:hover {
  text-decoration: underline;
}

.search-row {
  width: 100%;
  display: flex;
}

.search-row-img-wrapper {
  transition: all 0.3s ease-in-out;
}

.search-row-img-text {
  text-align: center;
  color: #000;
}

.search-row-wrapper {
  width: 15%;
}

.search-row-img {
  width: 100%;
}

.home-link {
  background-color: var(--motif-color);
  color: #fff;
  font-size: 1.6rem;
  margin: 2rem 0;
  padding: 0.5rem 1rem;
  border-radius: 0.2rem;
  transition: all 0.3s ease-in-out;
}

.home-link:hover {
  filter: brightness(85%);
}

@media (max-width: 1033px) {
  header {
    height: 50vh;
  }

  .welcome-modal {
     top: 25%;
  }

  .product-block {
    height: 40vh;
  }
}

@media (max-width: 768px) {
  html {
    overflow-x: hidden;
  }

  main {
    position: relative;
  }

  header {
    height: 90vh;
  }

  .welcome-modal {
     top: 60%;
     width: 95%;
  }

  .welcome {
    font-size: 1.3rem;
  }

  .welcome-text {
    font-size: 1rem;
  }

  .welcome-modal a {
    width: 60%;
  }

  .search-input {
    margin-top: 60px;
    width: 90%;
  }

  #orderForm input {
    border-top-right-radius: 0rem;
    border-bottom-right-radius: 0rem;
  }

  .trending-searches {
    font-size: 0.9rem;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .search-row {
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
  }

  .search-row-img-wrapper {
    width: 33.3%;
  }

  .search-row-img {
    display: block;
  }

  .search-row-img-text {
    display: none;
  }

  .shopfront-video {
    height: 90vh;
  }

  .product-row-link,
  .category-row.thirds > .product-row-link {
    width: 45%;
    margin-bottom: 1rem;
    text-align: center;
  }

  .category-wrapper {
    width: 90%;
  }

  .category-wrapper h2 {
    margin: 2rem 0;
  }

  .category-row {
    margin-bottom: 0;
  }

  .product-block {
    flex-direction: column;
    height: 100%;
  }

  .product-block-img {
    width: 100%;
  }

  .total-items-in-cart {
    background-color: var(--motif-color);
    width: 20px;
    position: absolute;
    border-radius: 30px;
    top: 20px;
    right: 20px;
    transform: translateX(-100%);
    color: #e6e6e6;
    font-size: 1rem;
  }

  .cart {
    width: 100%;
    height: calc(100dvh - 90px);
  }

  .cart-modal {
    width: 65%;
    justify-content: center;
    text-align: center;
  }
}
