:root {
  --primary-brown: #6B4423;
  --light-cream: #FFF7ED;
  --soft-pink: #F0E0D6;
  --accent-gold: #FFD580;
  --dark-text: #3E2C1C;
  --highlight: #FFE8C7;
  --white: #ffffff;
}

/* TEMPORARY DEBUGGING AID: Give colors to identify bounds */
/* REMOVE THESE LINES AFTER DEBUGGING */
/*
html {
  background-color: lightblue;
}
body {
  background-color: lightgreen;
}
*/
/* END TEMPORARY DEBUGGING AID */


html, body {
  margin: 0;
  padding: 0;
  font-family: 'Quicksand', sans-serif;
  background: var(--light-cream);
  color: var(--dark-text);
  height: auto;
  min-height: 0;
  overflow-x: hidden;
}

body {
    /* Revert body to a standard block element flow, we'll control container positioning */
    /* Removed align-items, justify-content, padding-top/bottom from here */
    /* We'll handle top/bottom spacing via the container's margin */
}


.container {
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 40px;
  max-width: 900px;
  width: 90%;
  margin: 40px auto; /* Keep 40px top/bottom for general spacing */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.logo {
  max-width: 200px;
  margin-bottom: 10px;
  border-radius: 50%;
}

h1 {
  font-family: 'Pacifico', cursive;
  font-size: 2.8em;
  color: var(--primary-brown);
  text-align: center;
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  font-size: 1em;
  margin-bottom: 30px;
  color: var(--dark-text);
}

.product-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
  width: 100%;
}

.product-card {
  flex: 1 1 calc(50% - 20px);
  max-width: calc(50% - 20px);
  box-sizing: border-box;
  border: 1px solid #ccc;
  padding: 15px;
  text-align: center;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.product-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-5px);
}

.product-card h2 {
  font-family: 'Pacifico', cursive;
  color: var(--primary-brown);
  font-size: 1.6em;
  margin: 10px 0;
}

.product-card img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.price {
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark-text);
}

.quantity-control {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  width: 100%;
  padding-top: 10px;
}

.quantity-control button {
  background: var(--accent-gold);
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.quantity-control button:hover {
  background-color: #e6c273;
}

.quantity-control input {
  width: 45px;
  text-align: center;
  padding: 5px;
  border-radius: 6px;
  border: 1px solid var(--primary-brown);
  -moz-appearance: textfield;
}

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.order-form {
  width: 100%;
  max-width: 600px;
  padding-bottom: 40px; /* Space below the button for larger screens */
}

.order-form h2 {
  font-family: 'Pacifico', cursive;
  font-size: 2em;
  text-align: center;
  color: var(--primary-brown);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--highlight);
  font-size: 1em;
  box-sizing: border-box;
}

/* Styling for the new select dropdown */
.form-group select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--highlight);
    font-size: 1em;
    box-sizing: border-box;
    background-color: var(--white);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13.6-6.4H18.9c-6.5%200-12.8%203.5-16.1%209.7-3.3%206.1-2.9%2013.8.9%2019.8l128.8%20141.9c4.2%204.6%2010.5%207.2%2017.2%207.2s13-2.6%2017.2-7.2l128.8-141.9c3.8-6 .2-13.7-3.1-19.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
}

.form-group select:focus {
    border-color: var(--primary-brown);
    outline: none;
}


.form-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: calc(50% - 10px);
}

.total-section {
  margin-top: 20px;
  font-size: 1.3em;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  border-top: 2px dashed var(--primary-brown);
  padding-top: 10px;
}

button[type="submit"] {
  background: var(--primary-brown);
  color: white;
  font-size: 1.2em;
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 25px;
  width: 100%;
  transition: background-color 0.2s ease;
}

button[type="submit"]:hover {
  background: #523119;
}

.alert-message {
  margin-top: 20px;
  padding: 10px;
  text-align: center;
  border-radius: 6px;
  display: none; /* Keep as default, will show with .show class */
  height: auto; /* Allow height to adjust */
  overflow: hidden; /* Hide overflow if text too long before wrapping */
}

.alert-message.show {
  display: block;
}

.alert-message.success {
  background-color: #d4edda;
  color: #155724;
}

.alert-message.error {
  background-color: #f8d7da;
  color: #721c24;
}

@media (max-width: 768px) {
  .product-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .form-row .form-group {
    min-width: 100%;
  }
}

@media (max-width: 600px) {
  html, body {
    height: auto !important;
    overflow-y: auto !important;
    min-height: 0 !important;
  }

  body {
    /* Revert body to a standard block element flow, we'll control container positioning */
    /* Removed align-items, justify-content, padding-top/bottom from here */
    /* We'll handle top/bottom spacing via the container's margin */
  }


  .container {
    padding: 20px;
    margin: 20px auto;
    gap: 15px;
    min-height: unset !important;
    height: auto !important;
  }

  .product-section {
      gap: 15px;
  }

  .product-card {
      margin-bottom: 15px;
  }

  .logo {
    max-width: 150px;
  }

  h1 {
    font-size: 2em;
  }

  .subtitle {
    font-size: 0.9em;
    margin-bottom: 20px;
  }

  .order-form {
    padding-bottom: 20px !important;
    margin-bottom: 0 !important;
  }

  /* Explicitly hide the alert message on mobile when not active */
  .alert-message {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}