@font-face {
  font-family: "Rubik";
  src: url("/fonts/Rubik-VariableFont_wght.ttf");
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: "Rubik", sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
}

a {
  color: #000;
  text-decoration: none;
}

li {
  list-style: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: #aaa;
}

footer {
  align-items: center;
  background-color: #aaa;
  display: flex;
  justify-content: center;
  text-align: center;
  margin-top: auto;
  padding: 1rem;
}

.btn {
  background-color: #ccc;
  border: none;
  border-radius: 0.5rem;
  color: #000;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
}

#title {
  align-items: center;
  display: flex;
  font-size: 3rem;
  font-weight: bold;
  justify-content: center;
  padding-top: 1rem;
  width: 100%;
}

/* Checkout Button ¨styl */
#checkout {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #4caf50;
  color: white;
  border: none;
  cursor: pointer;
  text-align: center;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

#checkout:hover {
  background-color: #388e3c;
}

.navbar {
  height: 10vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  gap: 4rem;
  position: relative;
}

.navbar-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.navbar-logo {
  font-size: 2rem;
}

.navbar-item {
  transition: 0.7s ease;
}

.navbar-item:hover {
  transform: scale(1.2);
}

.navbar-item-shifted {
  transition: 0.7s ease;
}

.navbar-item-shifted:hover {
  transform: scale(1.2);
}

.shopreg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-left: auto;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: #000;
}

#register-in-nav {
  display: none;
}

.container {
  display: flex;
  margin: 0 6rem;
  gap: 3rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.sidepanel,
.novinky {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidepanel {
  width: 30%;
}

.novinky {
  width: 70%;
}

.no-scroll {
  overflow: hidden;
}

.catalog-container {
  display: flex;
  flex-direction: row;
  margin: 3rem 6rem 3rem 6rem;
  border-radius: 1rem;
  border: none;
}

.kategorie {
  display: flex;
  flex-direction: column;
  width: 20%;
  padding: 1rem;
  background-color: #ccc;
  border: none;
  border-radius: 1rem 0 0 1rem;
  gap: 1rem;
}

.kategorie-menu {
  list-style: none;
  padding: 0;
}

.kategorie-item {
  padding: 10px 0;
  font-size: 1.2em;
}

.subkategorie-menu {
  list-style: none;
  padding: 0;
  padding-left: 20px;
}

.subcategory {
  padding: 5px 0;
  font-size: 1em;
}

.kategorie-item button,
.subcategory button {
  color: #000;
  text-decoration: none;
  border: none;
  background: none;
  outline: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.subcategory button {
  color: #333333;
}

.produkty {
  display: flex;
  flex-direction: column;
  width: 80%;
  padding: 1rem;
  background-color: #aaa;
  border: none;
  border-radius: 0 1rem 1rem 0;
  gap: 1rem;
  height: 70vh;
  min-height: 83vh;
}

.produkt {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 20px;
  margin: 10px;
  text-align: center;
  width: 200px;
  height: 320px;
}

.produkt-obrazek img {
  width: 100%;
  height: auto;
}

.produkt-nazev,
.produkt-cena {
  margin-top: 10px;
}

.produkty {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  height: 100%;
}

.rounded-image {
  border-radius: 10px;
}

.produkt-buy button {
  background-color: #2f6b31;
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 10px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-top: 10px;
}

.produkt-buy button:hover {
  background-color: #163417;
  transform: scale(1.1);
}

@media only screen and (max-width: 756px) {
  #title {
    font-size: 2rem;
  }

  .container {
    flex-direction: column;
    margin: 0 2rem;
  }

  .sidepanel,
  .novinky {
    width: 100%;
  }

  .sidepanel {
    margin-bottom: 3rem;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .navbar-menu {
    position: absolute;
    left: -100%;
    top: 10vh;
    gap: 0;
    flex-direction: column;
    background-color: #aaa;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding-bottom: 1rem;
    padding-top: 1rem;
  }

  .navbar-item {
    margin: 1rem 0;
  }

  .navbar-menu.active {
    left: 0;
  }

  #register {
    display: none;
  }
  .navbar {
    gap: 2rem;
  }
}

@media screen and (max-width: 768px) {
  .catalog-container {
    flex-direction: column;
    margin: 1rem;
  }

  .kategorie,
  .produkty {
    width: 100%;
  }

  .produkty {
    border-radius: 0 0 1rem 1rem;
  }

  .kategorie {
    border-radius: 1rem 1rem 0 0;
    justify-content: center;
    align-items: center;
  }

  .subcategory {
    padding: 3px 0;
    font-size: 0.9em;
  }

  .subkategorie-menu {
    padding-left: 10px;
  }

  .produkt {
    width: 100%;
    max-width: 300px;
    height: 420px;
    margin: 10px auto;
  }

  .produkty {
    grid-template-columns: repeat(auto-fill, minmax(100%, 2fr));
  }
}

@media only screen and (max-width: 756px) {
  #cart-items {
    grid-template-columns: 1fr;
    padding: 5rem;
  }

  #cart-items li {
    grid-template-columns: 1fr 3fr 1fr 1fr;
  }
}
