/* John's Woodworking - base styles */
:root {
  --wood-dark: #3e2723;
  --wood: #6d4c2f;
  --wood-light: #a9744f;
  --cream: #faf6f0;
  --text: #2b2420;
  --muted: #6b6259;
  --accent: #c9742c;
  --border: #e3d9cc;
  --success: #4a7c59;
  --danger: #b3361d;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.55;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
a { color: var(--wood-dark); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--wood-dark); line-height: 1.2; }
h1 { font-size: 2.4rem; margin: 0 0 16px; }
h2 { font-size: 1.8rem; margin: 0 0 16px; }
h3 { font-size: 1.25rem; margin: 0 0 8px; }
p { margin: 0 0 16px; }

/* Header */
.site-header { background: var(--wood-dark); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.logo-mark {
  background: var(--accent); color: #fff; font-weight: bold; font-family: Georgia, serif;
  width: 38px; height: 38px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.logo-text { font-family: Georgia, serif; font-size: 1.2rem; letter-spacing: .3px; }
.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.main-nav a { color: #f1e7da; padding: 10px 14px; border-radius: 6px; font-size: 0.95rem; }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(255,255,255,0.12); }
.main-nav a.nav-cta { background: var(--accent); color: #fff; }
.main-nav a.nav-cta:hover { background: #b3651f; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff !important; padding: 14px 26px;
  border-radius: 6px; font-weight: 600; border: none; cursor: pointer; font-size: 1rem;
}
.btn:hover { background: #b3651f; }
.btn-secondary { background: var(--wood-dark); }
.btn-secondary:hover { background: #2a1c17; }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-outline { background: transparent; border: 2px solid var(--wood-dark); color: var(--wood-dark) !important; }
.btn-danger { background: var(--danger); }

/* Hero */
.hero {
  background: linear-gradient(120deg, rgba(62,39,35,.88), rgba(109,76,47,.78)), url('/images/site/hero.svg') center/cover;
  color: #fff; padding: 110px 0 90px; text-align: center;
}
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.2rem; max-width: 640px; margin: 0 auto 28px; color: #f1e7da; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Sections */
section { padding: 64px 0; }
.section-alt { background: #fff; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 800px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; background: #eee; }
.card-body { padding: 18px 20px; }
.card-body .price { color: var(--accent); font-weight: 700; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; text-align: center; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step-num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--wood-dark); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-weight: 700;
}

/* Forms */
form .field { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.hint { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=file],
select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 1rem; font-family: inherit; background: #fff;
}
textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 700px) { .field-row { grid-template-columns: 1fr; } }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 32px; max-width: 760px; margin: 0 auto; }
.required { color: var(--danger); }
.alert { padding: 14px 18px; border-radius: 6px; margin-bottom: 20px; }
.alert-success { background: #e7f3ea; color: var(--success); border: 1px solid #bfe0c8; }
.alert-error { background: #fbeae6; color: var(--danger); border: 1px solid #f1c6ba; }

/* Footer */
.site-footer { background: var(--wood-dark); color: #e9ded0; margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 40px 0 20px; }
.footer-inner a { color: #f1e7da; }
.footer-copy { padding: 16px 0 28px; font-size: 0.85rem; color: #b6a995; border-top: 1px solid rgba(255,255,255,.1); }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

/* Admin */
.admin-bar { background: var(--wood-dark); color: #fff; padding: 14px 0; }
.admin-bar .container { display: flex; justify-content: space-between; align-items: center; }
.admin-bar a { color: #f1e7da; }
table.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
table.admin-table th, table.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.95rem; }
table.admin-table th { background: #f5efe6; }
.status-badge { padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.status-new { background: #fde8d4; color: #95541a; }
.status-quoted { background: #dde8fb; color: #2b4f9c; }
.status-sent { background: #dcf0e1; color: var(--success); }
.line-items-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.line-items-table th, .line-items-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.line-items-table input { width: 100%; }
.totals-box { max-width: 320px; margin-left: auto; }
.totals-box div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals-box .grand { font-weight: 700; font-size: 1.15rem; border-top: 2px solid var(--wood-dark); margin-top: 6px; padding-top: 10px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 850px) { .two-col { grid-template-columns: 1fr; } }
.detail-box { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.detail-box dl { margin: 0; }
.detail-box dt { font-weight: 700; margin-top: 12px; font-size: 0.85rem; text-transform: uppercase; color: var(--muted); }
.detail-box dd { margin: 2px 0 0; }
.login-box { max-width: 380px; margin: 80px auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 32px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  #navList { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--wood-dark); flex-direction: column; padding: 10px 20px; }
  #navList.open { display: flex; }
  .header-inner { position: relative; }
}
