body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f9f9f9;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: green;
    padding: 15px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.navbar nav a {
    color: white;
    text-decoration: none;
    margin: 0 20px;
    font-weight: bold;
    padding: 10px 15px;
    transition: all 0.3s ease-in-out;

}

.navbar nav a:hover {
    background-color: white;
    color: green;
    border-radius: 5px;
    padding: 10px 15px;
}

.navbar nav .dropdown {
    position: relative;
    display: inline-block;
}

.navbar nav .dropbtn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 10px 15px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}

.navbar nav .dropdown:hover .dropdown-content {
    display: block;
}

.navbar nav .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 999;
    border-radius: 5px;
    overflow: hidden;
}

.navbar nav .dropdown-content a {
    color: green;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: bold;
    background-color: white;
}

.navbar nav .dropdown-content a:hover {
    background-color: #f1f1f1;
}

.cart-button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: green;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
}



.cart-button:hover {
    background-color: darkgreen;
}

.products {
    font-size: 20px;
    text-align: center;
    padding: 100px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-bar {
  padding: 20px;
  display: flex;
  justify-content: center;
}

.filter-row {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 600px;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.product {
    width: 220px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
}

.product:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
}

.product-image img {
    width: 150px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
  }  

.product h3 {
    font-size: 18px;
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
}

.product p {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}

.product button {
    background-color: green;
    color: white;
    border: none;
    padding: 12px 25px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.product button:hover {
    background-color: white;
    color: green;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal, .cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

#categoryDropdown, #searchInput {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
}

#categoryDropdown {
  max-width: 200px;
  background-color: #fff;
}

#searchInput {
  flex: 1;
}

.modal-content, .cart-modal-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    width: 300px;
    text-align: center;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}



.modal input, .modal select, .cart-modal-content button {
    width: 40%;
    margin: 10px 0;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.cart-modal-content h3 {
    font-size: 20px;
    color: #333;
}

.cart-modal-content button {
    padding: 10px;
    margin-top: 10px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cart-modal-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    width: 500px;
    text-align: center;
    animation: fadeIn 0.4s ease-in-out;
    max-height: 70vh;
    overflow-y: auto;
}

.cart-modal-content button:first-of-type {
    background: green;
    color: white;
    border: none;
}

.cart-modal-content button:first-of-type:hover {
    background: darkgreen;
}

.close-btn {
    background: red;
    color: white;
    border: none;
}

.close-btn:hover {
    background: darkred;
}

.modal-content button {
    background-color: green;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-content button:hover {
    background-color: darkgreen;
    transform: translateY(-2px);
}

.modal-content .close-btn {
    background-color: red;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-content .close-btn:hover {
    background-color: darkred;
    transform: translateY(-2px);
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 140px;
    margin-top: 5px;
    margin-left: auto;
    margin-right: auto;
}
  
.quantity-wrapper input {
    text-align: center;
    width: 120px;
    height: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.cart-modal-content .cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.cart-modal-content .cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 20px;
}

.cart-modal-content .cart-item-details {
    flex-grow: 1;
}

.cart-modal-content .cart-item button {
    background-color: red;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.cart-modal-content .cart-item button:hover {
    background-color: darkred;
}

#cartTotal {
    margin-top: 20px;
    font-size: 1.2em;
    font-weight: bold;
    text-align: right;
}

#cartTotal p {
    margin: 0;
}

.rating {
    color: gold;
    font-size: 1em;
    margin: 5px 0;
    font-weight: bold;
  }  

#paymentMethod {
    width: 150px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
    background-color: white;
    color: #333;
    font-family: Arial, sans-serif;
}

label[for="address"] {
    font-size: 16px;
    color: black;
    margin-bottom: 5px;
    display: block;
    text-align: left;
}

#address {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 5px;
    box-sizing: border-box;
    resize: vertical;
}

#address::placeholder {
    color: #aaa;
    font-style: italic;
}

#redeemCode {
    width: 260px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
  }

label[for="redeemCode"] {
    display: block;
    font-size: 16px;
    color: black;
    margin-top: 20px;
    text-align: left;
}

button[onclick="checkout()"] {
    background-color: green;
    color: white;
}

button[onclick="checkout()"]:hover {
    background-color: darkgreen;
}

/*//*/

.modal-content {
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 25px;
  border-radius: 20px;
  background-color: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  animation: fadeIn 0.3s ease-in-out;
  align-items: center;
}

.modal-product {
  display: flex;
  gap: 20px;
  width: 100%;
}

.modal-product .product-image img {
  width: 180px;
  height: 180px;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.modal-product .product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
}

.modal-product .product-details h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #2e7d32;
}

.modal-product .product-details p {
  margin: 0;
  font-size: 15px;
  color: #555;
}

.modal-product .product-details p span {
  font-weight: bold;
}

.quantity-wrapper {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  background-color: #2e7d32;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.qty-btn:hover {
  background-color: #1b5e20;
}

#quantity {
  width: 50px;
  height: 30px;
  text-align: center;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.modal-product .product-details button {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #388e3c;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-product .product-details button:hover {
  background-color: #2e7d32;
}

.modal-product .product-details .close-btn {
  background-color: #c62828;
}

.modal-product .product-details .close-btn:hover {
  background-color: #b71c1c;
}

.homepage-title-wrapper {
    text-align: center;
    margin: 50px auto 30px;
}

.homepage-latest-title {
    font-size: 32px;
    color: #2e7d32;
    margin-bottom: 10px;
    font-weight: bold;
}

.view-more-button {
    display: inline-block;
    font-size: 16px;
    padding: 10px 24px;
    background-color: #388e3c;
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.view-more-button:hover {
    background-color: #2e7d32;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}
