main {
  width: 1000px;
  margin: auto;
  max-width: 100%;
}

.product img {
  width: 200px;
  height: 200px;
}

.product {
  margin: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  text-align: center;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.product_left {
  margin-top: 16px;
  margin-bottom: 16px;
  width: 400px;
}

.init-price {
  font-weight: bold;
  color: #e44d26;
}

.stock {
  color: green;
}

.product_right {
  width: 400px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.product button {
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  margin-top: 8px;
}

.math_button {
  color: white;
  background-color: #333;
}

.math_button:hover {
  background-color: #f0a500;
  transition: 0.2s;
  cursor: pointer;
}

.amount_of_items {
  background-color: #333;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  margin-top: 8px
}


.delete_from_cart_button {
  color: #333;
  background-color: rgb(242, 242, 242);
  margin-right: 20px;
}

.delete_from_cart_button:hover {
  background-color: rgb(255, 40, 40);
  color: white;
  transition: 0.2s;
  cursor: pointer;
}

.totalSum_container {
  display: flex;
  justify-content: flex-end;
  margin-right: 20px;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.continue_button {
  background-color: green;
  border: none;
  border-radius: 16px;
  padding: 10px 20px;
  color: white;
  margin-left: 20px;
}

.continue_button:hover {
  cursor: pointer;
  transition: 0.2s;
  background-color: rgb(0, 201, 0);
}

.empty_cart_container {
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.empty_cart {
  text-align: center;
  font-size: 24px;
}

.empty_cart_container button {
  border: none;
  padding: 10px 16px;
  color: rgb(0, 0, 0);
  background-color: #e2e2e2;
  margin-top: 20px;
  border-radius: 10px;
  transition: 0.2s;
  font-size: 20px;
}

.empty_cart_container button:hover {
  background-color: #cccccc;
  color: rgb(0, 0, 0);
}

@media (max-width: 768px) {

  main {
    max-width: 90%;
    margin: 0 auto;
  }

  .products_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
  }

  .product {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 340px;
    padding: 10px;
    gap: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
  }

  .product img {
    width: 120px;
    height: 120px;
    object-fit: contain;
  }

  .product_left {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .product_right {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }

  /* tlačítka + a - jako malá kulatá kolečka */
  .math_button {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333;
    color: white;
  }

  .math_button:hover {
    background-color: #f0a500;
  }

  /* počet kusů bez pozadí */
  .amount_of_items {
    color: black;
    padding: 0;
    font-size: 14px;
    margin: 0;
    min-width: 30px;
    text-align: center;
    background: none;
    border: none;
  }

  /* hlavní tlačítko pod řádkem */
  .totalSum_container {
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
  }

  .totalSum_container p {
    margin-bottom: 12px;
    font-size: 16px;
  }

  .totalSum_container .continue_button {
    width: 100%;
    max-width: 300px;
    /* aby nebylo úplně přes celou šířku */
    margin-top: 16px;
    /* víc mezery nad tlačítkem */
    padding: 14px 0;
    /* větší tlačítko */
    font-size: 16px;
    border-radius: 20px;
  }

  .delete_from_cart_button {
    padding: 6px 12px;
    /* zachováme velikost X */
    font-size: 14px;
    margin-left: 6px;
    background-color: rgb(242, 242, 242);
    border-radius: 10px;
  }

  .init-price,
  .stock,
  .price {
    font-size: 14px;
  }

  /* skrytí první ceny */
  .first-price {
    display: none;
  }

  .empty_cart_container {
    width: 100%;
    padding: 10px;
    text-align: center;
  }

  .empty_cart_container button {
    width: 80%;
    font-size: 18px;
    padding: 10px;
  }
}