/* ========== Global Styles ========== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #dff2e1;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========== Header & Footer ========== */
/* Sticky Header */
header {
  position: sticky;       /* Sticky at top */
  top: 0;
  width: 100%;
  background-color: #004d00;
  color: #fff;
  text-align: center;
  padding: 1em 0;
  z-index: 1000;          /* stay above other elements */
  transition: all 0.3s ease; /* smooth transitions */
}

/* Shrink effect on scroll */
header.shrink {
  padding: 0.5em 0;       /* reduce padding */
  background-color: #003300; /* optional darker color */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* subtle shadow */
}

header h1 {
  margin: 0;
  font-size: 2rem;
  transition: font-size 0.3s ease;
}

header.shrink h1 {
  font-size: 1.5rem;      /* smaller title on scroll */
}

footer {
  margin-top: auto;
  background-color: #004d00;
  text-align: center;
  color: #fff;
}

/* ========== Navigation ========== */
header nav {
  display: flex;
  justify-content: center; /* Center the nav links */
  flex-wrap: wrap;         /* Wrap links on smaller screens */
  gap: 1em;                /* Space between links */
  margin-top: 0.5em;
}

nav a {
  color: #fff;
  margin: 0 1em;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

nav a:hover {
  text-decoration: underline;
}


/* ====== Responsive Navigation ====== */
@media (max-width: 600px) {
  header nav {
    flex-direction: column;
    align-items: center;
  }

  header nav a {
    width: 90%;
    text-align: center;
  }
}
/* ========== Headings ========== */
h1, h2, h3 {
  text-align: center;
  margin-top: 1em;
}

/* ========== Product Layout ========== */
.product-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 2em auto;
  padding: 0 1em;
}

/* Product Card Styling */
.product {
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  background-color: #fff;
  width: 300px;
  text-align: center;
  padding: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ========== Buttons ========== */
button {
  background-color: #008000;
  color: #fff;
  border: none;
  padding: 0.75em 1.5em;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
  background-color: #006600;
  transform: scale(1.05);
}

/* ========== Cart & Checkout Section ========== */
#cart, #checkout {
  margin: 2em auto;
  max-width: 600px;
  background: #fff;
  padding: 1.5em;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#cart-items {
  list-style: none;
  padding: 0;
}

#cart-items li {
  padding: 5px 0;
  border-bottom: 1px solid #ddd;
}

/* ========== Table Styling ========== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
}

table, th, td {
  border: 1px solid #000;
}

th, td {
  padding: 10px;
  text-align: left;
}

th {
  background-color: #004d00;
  color: white;
}

/* ========== Responsive Design ========== */
@media (max-width: 600px) {
  .product-group {
    flex-direction: column;
    align-items: center;
  }

  .product {
    width: 90%;
  }

  #cart, #checkout {
    width: 90%;
    padding: 1em;
  }
}
/* Checkout Form */
#checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  font-size: 1rem;
}

#checkout-form label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.3em;
}

#checkout-form input[type="text"],
#checkout-form input[type="tel"],
#checkout-form input[type="email"],
#checkout-form input[type="number"],
#checkout-form textarea,
#checkout-form select {
  width: 100%;
  padding: 0.6em 0.8em;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 1rem;
}

#checkout-form textarea {
  resize: vertical;
  min-height: 80px;
}

#checkout-form fieldset {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1em;
}

#checkout-form legend {
  font-weight: bold;
  padding: 0 0.5em;
}

#checkout-form button[type="submit"] {
  width: 50%;
  margin: 1em auto 0;
  background-color: #28a745;
  color: #fff;
  padding: 0.75em 1.5em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#checkout-form button[type="submit"]:hover {
  background-color: #218838;
  transform: scale(1.05);
}

/* EFT fields spacing */
#eft-fields {
  margin-top: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

/* Hint text */
#checkout-form .hint {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.3em;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  #checkout-form button[type="submit"] {
    width: 100%;
  }
}

