:root {
  --wood-dark: #6a4932;
  --wood-mid: #8c6241;
  --wood-light: #c79a6a;
  --cream: #f7efe3;
  --ink: #2e241d;
  --border: rgba(46, 36, 29, 0.14);
  --shadow: rgba(46, 36, 29, 0.08);
  --ok: #2f6d43;
  --warn: #7f3d1f;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Georgia, "Times New Roman", serif; color: var(--ink); background: var(--cream); }
body {
  background: linear-gradient(rgba(255,255,255,0.04), rgba(0,0,0,0.04)), repeating-linear-gradient(90deg, #6e4b34 0 18px, #7e573b 18px 36px, #8e6444 36px 58px, #744f35 58px 70px);
}
.site-shell { min-height: 100vh; background: linear-gradient(rgba(247,239,227,0.93), rgba(247,239,227,0.96)); }
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); background: rgba(247,239,227,0.94); backdrop-filter: blur(8px); }
.nav-wrap { max-width: 1180px; margin: 0 auto; padding: 14px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.brand { background: transparent; border: none; font-size: 1.15rem; font-weight: 700; color: #5a3928; cursor: pointer; padding: 8px 10px 8px 0; text-align: left; }
.main-nav { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.main-nav button, .pill, .link-pill {
  border: 1px solid rgba(90,57,40,0.22);
  background: linear-gradient(180deg, #ead6bc, #d8b48f);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.main-nav button:hover, .pill:hover, .link-pill:hover { filter: brightness(1.03); }
.pill.alt { background: rgba(255,255,255,0.8); }
button:disabled { cursor: not-allowed; opacity: 0.6; }
.content { max-width: 1180px; margin: 0 auto; padding: 26px 18px 48px; }
.page { display: none; }
.page.active { display: block; }
.hero-grid, .info-grid, .cart-layout, .product-layout, .form-grid, .dashboard-grid { display: grid; gap: 18px; }
.hero-grid { grid-template-columns: 1.3fr 0.9fr; margin-bottom: 22px; }
.info-grid { grid-template-columns: repeat(3, 1fr); }
.wood-panel, .wood-display {
  background: linear-gradient(rgba(255,255,255,0.35), rgba(255,255,255,0.45)), repeating-linear-gradient(180deg, #c89664 0 18px, #b98454 18px 34px, #a46f43 34px 52px, #bf8d5f 52px 70px);
}
.hero-card { min-height: 310px; display: flex; flex-direction: column; justify-content: center; }
.card, .hero-card, .sub-card {
  background-color: rgba(255,255,255,0.76);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 28px var(--shadow);
}
.sub-card { margin-top: 18px; }
.section-head { margin-bottom: 18px; }
.product-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-card { background: rgba(255,255,255,0.76); border: 1px solid var(--border); border-radius: 20px; padding: 16px; box-shadow: 0 8px 22px var(--shadow); }
.product-visual, .wood-display { height: 210px; border-radius: 18px; border: 1px solid rgba(90,57,40,0.18); }
.product-layout { grid-template-columns: 1fr 1fr; }
.product-button { background: none; border: none; padding: 0; cursor: pointer; width: 100%; }
.product-title-button { background: none; border: none; color: #5a3928; font: inherit; font-weight: 700; padding: 0; text-align: left; cursor: pointer; }
.price { font-size: 1.18rem; font-weight: 700; }
.eyebrow { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }
.button-row, .field-inline { display: flex; gap: 10px; align-items: center; }
.field-inline.wrap { flex-wrap: wrap; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
input[type="number"], input[type="text"], input[type="email"] {
  width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid rgba(90,57,40,0.22); border-radius: 12px; background: rgba(255,255,255,0.95); font: inherit; color: var(--ink);
}
label { display: inline-block; margin-bottom: 6px; font-weight: 700; }
.cart-layout { grid-template-columns: 1.3fr 0.7fr; }
.cart-items { display: grid; gap: 12px; }
.cart-item {
  display: grid; grid-template-columns: 1.2fr auto auto auto; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: 16px; padding: 14px; background: rgba(255,255,255,0.74);
}
.summary-box { display: grid; gap: 10px; }
.summary-line { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px dashed rgba(46,36,29,0.14); }
.summary-line:last-child { border-bottom: none; }
.note, .hint, .message { font-size: 0.95rem; }
.note, .message { border: 1px solid var(--border); background: rgba(90,57,40,0.06); padding: 12px 14px; border-radius: 14px; }
.message.ok { color: var(--ok); border-color: rgba(47,109,67,0.24); background: rgba(47,109,67,0.08); }
.message.warn { color: var(--warn); border-color: rgba(127,61,31,0.24); background: rgba(127,61,31,0.08); }
.hidden { display: none; }
.admin-grid { display: grid; gap: 12px; margin-top: 16px; }
.admin-row {
  display: grid; grid-template-columns: 1.4fr 0.6fr 0.6fr; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: 16px; padding: 12px; background: rgba(255,255,255,0.74);
}
.dashboard-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.metric { border: 1px solid var(--border); border-radius: 18px; padding: 18px; background: rgba(255,255,255,0.78); }
.metric strong { display: block; font-size: 1.55rem; margin-top: 6px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); }
.sticky-card { position: sticky; top: 92px; align-self: start; }
.narrow { max-width: 700px; }
.center-card { margin: 10vh auto 0; text-align: center; }
.simple-page { min-height: 100vh; }
@media (max-width: 980px) {
  .hero-grid, .info-grid, .product-grid, .product-layout, .cart-layout, .form-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .cart-item, .admin-row { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
}
@media (max-width: 640px) {
  .nav-wrap { align-items: stretch; }
  .main-nav { margin-left: 0; }
  .main-nav button, .pill, .link-pill { width: 100%; }
  .button-row, .field-inline { flex-direction: column; align-items: stretch; }
  .content { padding: 18px 14px 34px; }
  .card, .hero-card, .sub-card { padding: 18px; border-radius: 18px; }
  h1 { font-size: 1.9rem; }
}
