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

/* Page base */
html, body {
  height: 100%;
}

body {
  background-color: #F4E3C2;
  font-family: "Lucida Bright", Georgia, serif;
  line-height: 1.6;
  color: #6B3F2B;
}

/* Wrapper */
#wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: #EEDCB5;
  color: #BF7154;
  box-shadow: 5px 5px 5px #CBB7A2;
  overflow-x: hidden;
}

/* Header styling */
header {
  background-color: rgba(125, 155, 140, 0.6);
  padding: 20px;
  text-align: center;
}

/* Headings */
h1 {
  background-color: #CFC5C6;
  font-size: 4.5em;
  padding: 20px 20px 10px 220px;
  height: 110px;
  color: #d6a28f;
  text-shadow: 3px 3px 3px #b9a492;
  margin-bottom: 0;
}

h2, h3, h4 {
  margin: 20px 0 10px 0;
  color: #b66b49;
}

/* Main content panel area */
main {
  background-color: #C9C0B9;
  padding: 20px;
  min-height: 300px;
  overflow: auto;
}

/* Paragraphs */
p {
  font-size: 1.2em;
  line-height: 1.4em;
  margin: 15px;
}

/* Buttons */
input[type="submit"],
button[type="submit"],
.submit-btn {
  display: inline-block;
  padding: 12px 22px;
  background-color: #BF7154;
  color: #fff;
  border: 2px solid #A35F45;
  border-radius: 999px;
  font-family: "Lucida Bright", Georgia, serif;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.12);
  text-decoration: none;
  margin-top: 10px;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.submit-btn:hover {
  background-color: #A35F45;
}

input[type="submit"]:active,
button[type="submit"]:active,
.submit-btn:active {
  transform: translateY(1px);
}

/* Error box */
#errorBox {
  color: #6e2e2e;
  border: 1px solid rgba(110, 46, 46, 0.3);
  background-color: rgba(255,255,255,0.7);
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
}

/* Simple form spacing consistency */
form {
  margin-top: 10px;
}

/* Make label + field sit on the same line and shrink spacing */
form#billShip fieldset label {
  float: left;
  clear: none;
  width: 170px;
  text-align: right;
  margin: 0 10px 8px 0;
  font-size: 14px;
  line-height: 1.2;
  color: rgb(57, 44, 28);
}

/* Field sizing so the line fits */
form#billShip input[type="text"],
form#billShip select {
  float: left;
  width: 210px;
  height: 34px;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 6px;
  box-sizing: border-box;
  margin: 0 0 8px 0;
}

/* Reduce legend heading size a bit */
fieldset legend,
fieldset h2 {
  font-size: 1.1em;
}

/* Match fieldset padding for both Shipping and Billing */
form#billShip fieldset,
#shipping fieldset,
#billing fieldset {
  padding: 35px 5px 10px;
}

/* Overrides global styles.css label/input sizing for order_submit */
#billShip fieldset label {
  float: left;
  min-width: 0;
  width: 165px;
  font-size: 14px;
  margin: 0 10px 8px 0;
  font-weight: normal;
}

#billShip input[type="text"],
#billShip select {
  float: left;
  min-width: 0;
  width: 215px;
  height: 34px;
  font-size: 14px;
  margin: 0 0 8px 0;
}

/* Prevent the flex form layout from breaking label/input rows */
#billShip {
  display: block;
}

/* Shipping and Billing labels — unified */
#shipping fieldset label,
#shipping label,
#billing label {
  float: left;
  clear: none !important;
  min-width: 0 !important;
  width: 170px;
  text-align: right;
  margin: 0 10px 8px 0;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.2;
}

/* Shipping and Billing fields — unified */
#shipping input[type="text"],
#shipping select,
#billing input[type="text"],
#billing select {
  float: left;
  clear: none !important;
  min-width: 0 !important;
  width: 215px;
  height: 34px;
  font-size: 14px;
  padding: 8px 10px;
  margin: 0 40px 8px 0; /* margin-right added for column pair spacing */
  box-sizing: border-box;
}

/* --- Fix checkbox row: "Same as Shipping Address" --- */
#billing #useShip {
  display: inline;
  float: none;
  clear: both;
  margin: 0 6px 10px 0;
  width: auto;
  height: auto;
}

#billing #cbLabel {
  display: inline;
  float: none;
  clear: none;
  position: static;
  width: auto;
  text-align: left;
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: normal;
}

/* Clearfix after checkbox label to push name fields below */
#billing #cbLabel::after {
  content: "";
  display: block;
  clear: both;
  width: 100%;
}

/* All billing field labels start on a fresh line */
#billing > label[for="firstnameBill"],
#billing > label[for="lastnameBill"],
#billing > label[for="address1Bill"],
#billing > label[for="address2Bill"],
#billing > label[for="cityBill"],
#billing > label[for="stateBill"],
#billing > label[for="countryBill"],
#billing > label[for="codeBill"] {
  clear: none; /* Removed clear: both — now handled by unified label rule above */
}