/* ========== Page scaffolding ========== */
main {
  max-width: 1100px;
  margin: 2rem auto 4rem;
  padding: 0 1rem;
}

h1 {
  text-align: center;
  font-size: 2.25rem;
  margin: 1rem 0 1.25rem;
  color: #6b5737;           /* cocoa/brown to match your header */
}

/* Progress steps */
.checkout-steps {
  display: flex;
  justify-content: center;
  margin: 0 0 1.25rem;
}
.checkout-steps ol {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  color: #7b6a4b;
  font-weight: 600;
}
.checkout-steps li {
  position: relative;
  padding-left: 1.75rem;
  opacity: 0.7;
}
.checkout-steps li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: -0.05rem;
  font-size: 1.25rem;
}
.checkout-steps li.done { opacity: 0.8; }
.checkout-steps li.current {
  opacity: 1;
  color: #5e4b2a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========== Layout panels ========== */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.panel {
  background: #fffdf9;
  border: 1px solid #e9e0d1;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(107, 87, 55, 0.08);
}
.panel h2 {
  margin-top: 0;
  font-size: 1.25rem;
  color: #5e4b2a;
}
.panel h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
  color: #6b5737;
}

/* Payment notice (inline style can be removed in HTML) */
.payment-notice {
  border: 1px solid #e9e0d1 !important;
  background: #fffdf9 !important;
  color: #5a554b !important;
  box-shadow: 0 8px 24px rgba(107, 87, 55, 0.06);
}

/* ========== Form ========== */
#checkoutForm {
  display: grid;
  gap: 0.9rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

label {
  font-size: 0.92rem;
  color: #6a5a3c;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #e4dac8;
  background: #fffefe;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-size: 0.98rem;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

input::placeholder, textarea::placeholder {
  color: #b8ad98;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #c7b293;
  box-shadow: 0 0 0 3px rgba(199,178,147,.25);
  background: #fffdf7;
}

/* ========== Order summary ========== */
.order-items {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.order-items li {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.5rem;
  border: 1px dashed #e9e0d1;
  border-radius: 12px;
  background: #fff;
}

.order-items img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee1cb;
}

.order-items .name {
  font-weight: 600;
  color: #4c3f25;
}

.order-items .price {
  font-weight: 700;
  color: #5e4b2a;
}

.order-totals {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.order-totals p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  color: #5b4c31;
}
.order-totals .total {
  margin-top: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid #e9e0d1;
  font-size: 1.05rem;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid #cdbb9f;
  background: linear-gradient(180deg, #d3c1a4, #bfa683);
  color: #2f2616;
  font-weight: 700;
  cursor: pointer;
  transition: transform .06s ease, filter .2s ease, opacity .2s ease;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.btn-secondary {
  background: #fffdf9;
  border-color: #d7c7ab;
}

.actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
  .order-items li {
    grid-template-columns: 50px 1fr auto;
  }
}
@media (max-width: 520px) {
  .field-row {
    grid-template-columns: 1fr;
  }
  .checkout-steps ol {
    gap: .6rem;
    font-size: .95rem;
  }
}
/* === King Knots earthy theme overrides === */

:root{
  --bg:#f7f3f0;         /* warm paper */
  --text:#5a4631;       /* cocoa */
  --muted:#6b5841;      /* deeper cocoa */
  --brand:#a8997e;      /* khaki gold */
  --brand-600:#7a674a;  /* toasted brown */
  --accent:#c0392b;     /* brick (errors) */
  --border:#e6ded3;     /* warm border */
  --card:#ffffff;       /* white cards */
  --shadow:0 8px 24px rgba(122,103,74,.12);
}

/* Global font + background */
html, body{
  font-family:'Quicksand', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial;
  background:var(--bg);
  color:var(--text);
}

/* Header / ribbon */
.header{
  background:var(--brand);
  color:#fff;
  box-shadow:0 2px 5px rgba(122,94,58,.2);
  border-bottom:1px solid rgba(0,0,0,.06);
}
.logo{ color:#fff; }
nav.primary a{
  color:#fff;
  border-radius:999px;
}
nav.primary a:hover{ background:var(--brand-600); color:#fff; }
nav.primary a[aria-current="page"]{ background:var(--brand-600); color:#fff; }

/* Panels & cards */
.panel{
  background:var(--card);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}

/* Buttons */
.btn{
  background:var(--brand);
  color:#fff;
  font-weight:700;
  box-shadow:0 4px 10px rgba(168,153,126,.4);
  border:1px solid transparent;
}
.btn:hover{
  background:var(--brand-600);
  transform:translateY(-1px);
  box-shadow:0 6px 14px rgba(122,103,74,.35);
}
.btn.secondary{
  background:#fff;
  color:var(--text);
  border-color:var(--border);
  box-shadow:none;
}
.btn.secondary:hover{ background:#f0e8d6; }

/* Order items */
.item{
  background:#fff;
  border:1px solid var(--border);
}
.item .price{ color:#5a4631; }
.remove{ color:var(--muted); }
.remove:hover{ color:#c0392b; }

/* Text accents */
.note,.inline-note{ color:var(--muted); }

/* Totals separator */
.totals{ border-top:1px dashed var(--border); }

.checkout-container {
  padding: 120px 20px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

/* Panels */
.checkout-panel,
.checkout-summary {
  background: white;
  padding: 35px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

/* Left Side */
.checkout-description {
  margin: 20px 0 30px;
  color: #6b5841;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Button Upgrade */
.btn-primary {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 50px;
  background-color: #a8997e;
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 18px rgba(168,153,126,0.5);
}

.btn-primary:hover {
  background-color: #7a674a;
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(168,153,126,0.6);
}

/* Right Side */
.checkout-summary h2 {
  margin-bottom: 20px;
}

.checkout-items {
  margin-bottom: 20px;
}

.item-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.checkout-totals {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.checkout-totals .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.checkout-totals .total {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 10px;
}

/* Footer spacing */
footer {
  margin-top: 60px;
  text-align: center;
  color: #6b5841;
}

.checkout-item {
  margin-bottom: 18px;
}

.checkout-item-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.checkout-item-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #eee;
}

.checkout-item-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkout-item-name {
  font-weight: 600;
}

.checkout-item-qty {
  font-size: .85rem;
  color: #6b5841;
  margin-top: 4px;
}

.checkout-item-price {
  font-weight: 700;
  font-size: 1rem;
}

.checkout-item:not(:last-child){
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 16px;
}