:root {
  --background: rgb(13, 13, 13);

  --element: rgb(34, 32, 34);
  --element-border: rgb(83, 68, 83);

  --in-stock: rgb(187, 129, 158);
  --not-in-stock: rgb(189, 171, 180);


  --button: rgb(187, 129, 158);
  --accent-button: rgb(135, 49, 135);
  --secondary-button: rgb(50, 45, 50);

  --text: rgb(255, 255, 255);
  --accent-text: rgb(247, 184, 247);
  --muted-text: rgb(106, 99, 105);
}

h1,
h2,
h3,
p {
  padding: 0px;
  margin: 0px;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  padding: 20px;
  background: var(--background);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-width: 200px;
  transition: 0.3s;
  min-height: 100vh;

}

a {
  text-decoration: none;
  color: white;

}


#expanded-menu {
  height: 0px;
  overflow: hidden;
  display: grid;
  transition: 0.3s;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100%;
  align-items: center;
  z-index: 30;
}


#expanded-menu.visible {
  height: fit-content;
  padding: 10px;
  padding-top: 20px;
  gap: 5px;
  transition: 0.3s;
  z-index: 30;
}

#expanded-menu button {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.246);
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 20px 10px;
  border-radius: 2px;

}


#expanded-menu a:last-child button {
  border-radius: 2px 15px 15px 2px;
}

#expanded-menu a:first-child button {
  border-radius: 15px 2px 2px 15px;
}

#expanded-menu a {
  width: 100%;

}



#expanded-menu a i {
  font-size: 1em;
}

main {
  width: 100%;
  max-width: 1000px;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  padding-top: 50px;
  transition: 0.3s;
  min-height: calc(100vh - 77px);

  display: flex;
  flex-direction: column;
  gap: 20px;
}


.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 20px;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  background-color: rgba(13, 13, 13, 0.8);
  flex-direction: column;
}

.main-menu {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1em;
  margin-top: 2em;
  width: 100%;
}

.grid-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  grid-column: 1 / -1;
  padding-top: 2em;
}

.grid-header button {
  background-color: var(--background);
  color: var(--button);
}


.card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--background);
  color: var(--text);

}

.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  transform: scale(1.1);
  z-index: 0;
  opacity: 0.4;
}

.card-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.card .product-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: white;

}

.card button {
  width: 30%;
}

.card button.unavailable {
  display: none;
  background-color: var(--not-in-stock);
  cursor: not-allowed;
}

.card-menu {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  flex-direction: row;
  gap: 5px;
  padding: 10px;
  padding-top: 0px;
}


.in-stock,
.not-in-stock {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  box-sizing: border-box;
  border-radius: 10px;
  font-size: 0.8em;
  gap: 5px;



}

.in-stock {
  border: 2px solid var(--in-stock);
  color: var(--in-stock);
  width: 70%;
}

.not-in-stock {
  border: 2px solid var(--not-in-stock);
  color: var(--not-in-stock);
  width: 100%;
}

.card-info {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 5px;
  align-items: center;
  padding: 10px;
  text-wrap: wrap;
  text-align: start;
  height: 50px;

}

button {
  padding: 10px 20px;
  border-radius: 10px;
  background-color: var(--button);
  color: var(--text);
  outline: none;
  border: none;
  cursor: pointer;

}

button:hover {
  filter: brightness(1.05);

}

.hide-items {
  padding: 15px 0px;
  text-align: end;
}

.top-menu button {
  background-color: rgba(255, 255, 255, 0.246);
  color: white;


  border-radius: 15px;
}

#expand-toggle {
  border-bottom-right-radius: 2px;
  border-top-right-radius: 2px;
}

#cart {
  border-bottom-left-radius: 2px;
  border-top-left-radius: 2px;
}


#image-preview {
  display: block;
  max-width: 150px;
  border: 2px solid var(--element);
  border-radius: 5px;
}


#product-form {
  display: flex;
  flex-direction: column;
}

#preview-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 95%;
  padding: 10px;
  height: 100vh;
  transform: translateY(100%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background-color: var(--background);

  box-sizing: border-box;
  max-width: 1000px;
  transition: 0.3s;

}

#preview-container.open {
  transform: translateY(77px);
}


#add-cart-btn {
  width: 100%;
}

#cant-cart-btn {
  width: 100%;
  background-color: var(--not-in-stock);
  cursor: not-allowed;
  color: black;
}

#close-preview {
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  height: 40px;
  width: 100%;
  color: var(--button);
  background-color: transparent;

}

#preview-container img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 10px;
}

.image-wrapper {
  position: relative;
  width: 100%;
  max-height: 400px;
  overflow: hidden;
  border-radius: 10px;
}

.preview-image-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  transform: scale(1.1);
  opacity: 0.4;
  pointer-events: none;

}

#prev-img {
  position: relative;
  z-index: 4;
}

.preview-container {
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.item-data {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 10px;
  margin: 10px 0px;
  padding: 10px 0px;
  overflow: hidden;
}

#preview-container button {
  z-index: 3;
}


.item-data span {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}




.about {
  margin-top: 2em;
}


.footer {

  margin-top: auto;
  bottom: 20px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.246);
  color: white;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;

}

.footer-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  text-align: center;
}

.footer-brand h2 {
  margin: 0;
  font-size: 1.5rem;
  grid-row: span 3;
}

.footer-links {
  display: flex;
  flex-direction: row;

  gap: 1.5em;
  font-size: 1rem;
}

.footer-links a,
.footer-social a {
  color: white;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-links a:hover,
.footer-social a:hover {
  opacity: 0.7;
}

.footer-social i {
  font-size: 1.5rem;
}


#user-alert-container {
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100vw;
  height: 100vh;
  display: none;

  align-items: center;
  justify-content: center;
  z-index: 20;
  overflow: hidden;
  pointer-events: none;
}

#user-alert {
  display: none;
  padding: 10px 20px;
  background-color: transparent;
  border: 2px solid var(--in-stock);
  color: var(--in-stock);
  border-radius: 10px;
  background-color: rgba(13, 13, 13, 0.664);
  backdrop-filter: blur(5px);

}





/* cart */




@media only screen and (max-width: 500px) {
  body {
    margin: 0px;
    padding: 20px;
    transition: 0.3s;
  }

  main {
    padding: 0px;
    padding-top: 50px;
    transition: 0.3s;
  }
}

@media only screen and (max-width: 400px) {
  .footer-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    text-align: center;
  }

  .footer-brand h2 {
    margin: 0;
    font-size: 1.5rem;
    grid-row: span 3;
  }

  .footer-brand {
    display: flex;
    align-items: start;
    flex-direction: column;
    height: 100%;
  }

  .footer-links {
    display: flex;
    flex-direction: column;

    gap: 1.5em;
    font-size: 1rem;
  }
}