:root {
  --paper: #f3eee4;
  --paper-deep: #e7dfd0;
  --ink: #241c15;
  --muted: #6a5d52;
  --walnut: #3d2418;
  --timber: #8a5434;
  --glow: #e7a23a;
  --glow-soft: #f4ddb0;
  --card: #fffaf3;
  --line: #dfd3c2;
  --good: #246143;
  --bad: #8d2f2f;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --shadow: 0 18px 40px rgba(61, 36, 24, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(231, 162, 58, 0.18), transparent 50%),
    var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
}
body.office { background: #efe8dc; }
img { max-width: 100%; display: block; }
a { color: var(--timber); }
a:hover { color: var(--walnut); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0 0 0.8rem; }
button, input, select, textarea { font: inherit; color: inherit; }
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 12px; top: 12px; background: white; padding: 8px 12px; z-index: 5; }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 7vw;
  background: var(--walnut);
  color: #f6efe4;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { width: 46px; height: 46px; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 560; }
.brand span { display: block; color: var(--glow-soft); font-size: 0.82rem; }
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: #f6efe4; text-decoration: none; }
.nav a:hover { color: var(--glow); }
.cart-link { border: 1px solid rgba(246, 239, 228, 0.35); border-radius: 999px; padding: 6px 12px; }

.wrap { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 40px; align-items: center; padding: 64px 0 28px; }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); margin: 0 0 12px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.hero-mark { justify-self: end; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.section { padding: 18px 0 42px; }
.section h2 { font-size: 2rem; margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column;
  min-height: 100%;
}
.card:hover { border-color: #c9b49a; }
.card .photo, .photo {
  aspect-ratio: 1;
  background: linear-gradient(180deg, #f7f1e6, #e7dccb);
  display: grid; place-items: center;
}
.card .photo img, .photo img { width: 100%; height: 100%; object-fit: cover; }
.card .meta, .meta { padding: 12px 14px 16px; }
.card h3, .meta h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 0 0 4px; letter-spacing: 0; }
.price { font-variant-numeric: tabular-nums; }
.quiet { color: var(--muted); font-size: 0.92rem; }
.site-footer { padding: 28px 7vw 40px; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer strong { color: var(--ink); }

.shop-layout { display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding: 28px 0 48px; }
.filters { display: flex; flex-direction: column; gap: 8px; }
.filters a { text-decoration: none; color: var(--ink); }
.filters a.on { color: var(--timber); font-weight: 650; }
.search { display: flex; gap: 8px; margin-bottom: 16px; }
input[type="search"], input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  background: white;
  border: 1px solid #d3c6b4;
  border-radius: 12px;
  padding: 10px 12px;
}
textarea { min-height: 110px; resize: vertical; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 18px; }

.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding: 32px 0 56px; }
.product-page h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 8px 0; }
.desc { white-space: pre-wrap; }

.btn, button.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--walnut); color: #f8f1e6; text-decoration: none;
  border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer;
}
.btn.secondary { background: transparent; color: var(--walnut); border: 1px solid var(--walnut); }
.btn.danger { background: var(--bad); }
.btn.small { padding: 7px 12px; font-size: 0.92rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.flash, .errors {
  background: var(--glow-soft);
  border: 1px solid #e2c27a;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 16px 0;
}
.errors { background: #f8e4e0; border-color: #e3b2aa; }
.banner {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #f8f1e6;
  border: 1px solid var(--line);
}
.banner.warn { background: #f8e4e0; border-color: #e3b2aa; }
.banner.good { background: #e5f2ea; border-color: #b7d8c4; }
.meter { height: 14px; background: var(--paper-deep); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--timber), var(--glow)); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.stat b { display: block; font-family: var(--serif); font-size: 1.5rem; }

table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }

.office-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side {
  background: var(--walnut); color: #f6efe4; padding: 22px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.side a { color: #f6efe4; text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.side a:hover, .side a.on { background: rgba(255,255,255,0.08); }
.side .brand { margin-bottom: 12px; }
.office-main { padding: 28px 28px 60px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field.inline { flex-direction: row; align-items: center; }
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.wide { grid-column: 1 / -1; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 8px; background: var(--paper-deep); font-size: 0.82rem; }
.pill.on { background: #e5f2ea; }
.pill.off { background: #f8e4e0; }

.invoice { width: min(820px, calc(100% - 28px)); margin: 24px auto 48px; background: white; padding: 32px; border: 1px solid var(--line); }
.invoice-top { display: flex; justify-content: space-between; gap: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0; }
.stamp { font-family: var(--serif); font-size: 2rem; margin: 0; }
.cancelled { color: var(--bad); }

.login-card { width: min(420px, calc(100% - 32px)); margin: 10vh auto; }

@media (max-width: 900px) {
  .hero, .product-page, .shop-layout, .office-shell, .stats, .form-grid, .two, .grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .hero-mark { display: none; }
  .site-header, .office-main { padding-left: 16px; padding-right: 16px; }
  .side { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .nav { gap: 10px; }
}
@media print {
  .no-print, .site-header, .site-footer { display: none !important; }
  body { background: white; }
  .invoice { border: 0; margin: 0; width: auto; }
}
