:root {
  color-scheme: light;
  --accent: #b6862c;
  --accent-dark: #6f511d;
  --ink: #202326;
  --muted: #68717d;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --line: #ded8cc;
  --shadow: 0 18px 50px rgba(64, 48, 24, 0.12);
  --radius: 8px;
  --gap: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(260px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0;
}

.brand small,
.top-nav a,
.status,
.account-status,
.eyebrow,
.factory-band span,
.product-meta,
.product-description,
.dialog-header p {
  color: var(--muted);
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.top-nav a {
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--accent-dark);
}

.header-actions,
.hero-actions,
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.solid-button,
.ghost-button {
  min-height: 38px;
  border: 1px solid var(--accent);
  padding: 9px 14px;
  text-decoration: none;
}

.solid-button {
  background: var(--accent);
  color: #fff;
}

.solid-button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.ghost-button {
  background: transparent;
  color: var(--accent-dark);
}

.ghost-button:hover {
  background: rgba(182, 134, 44, 0.08);
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.hero {
  min-height: clamp(420px, 70vh, 640px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.7fr);
  gap: 34px;
  align-items: center;
  padding: 54px 44px 34px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  margin: 18px 0 0;
  max-width: 660px;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 28px;
}

.hero-showcase {
  position: relative;
  min-height: 420px;
}

.showcase-piece {
  position: absolute;
  border: 1px solid rgba(182, 134, 44, 0.28);
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 42% 38%, rgba(255, 255, 255, 0.96) 0 12%, transparent 13%),
    radial-gradient(circle at 50% 50%, transparent 0 34%, #d5aa54 35% 43%, #8a611d 44% 48%, transparent 49%),
    linear-gradient(135deg, #fff6d8, #c7922d 48%, #74511b);
}

.showcase-piece.large {
  inset: 20px 40px 44px 20px;
}

.showcase-piece.small {
  right: 0;
  bottom: 0;
  width: 44%;
  aspect-ratio: 1 / 1;
}

.factory-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.factory-band div {
  display: grid;
  gap: 4px;
  padding: 18px 28px;
  background: var(--panel);
}

.control-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.control-strip label {
  min-width: 180px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.catalog-sidebar {
  position: sticky;
  top: 67px;
  min-height: calc(100vh - 67px);
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.sidebar-head,
.section-head,
.dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.sidebar-head h2,
.section-head h2,
.dialog-header h2 {
  margin: 0;
}

.category-tree {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.category-group {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.category-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 7px 0;
  text-align: left;
}

.category-button.active {
  color: var(--accent-dark);
  font-weight: 700;
}

.category-children {
  display: grid;
  gap: 2px;
  padding-left: 12px;
}

.catalog-main,
.inquiry-section {
  padding: 28px;
}

.section-head {
  margin-bottom: 18px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--gap);
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
}

.product-visual,
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 44%, transparent 0 28%, rgba(182, 134, 44, 0.92) 29% 38%, rgba(91, 64, 25, 0.95) 39% 43%, transparent 44%),
    linear-gradient(135deg, #fff9e8, #ead09a);
  color: var(--accent-dark);
}

.product-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.product-body h3 {
  margin: 0;
  font-size: 17px;
}

.product-meta,
.product-description {
  margin: 0;
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-specs span {
  border: 1px solid var(--line);
  padding: 4px 7px;
  color: var(--muted);
}

.product-card .solid-button {
  margin: 0 14px 14px;
}

.inquiry-section {
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.inquiry-form {
  display: grid;
  gap: 14px;
}

.inquiry-cart {
  display: grid;
  gap: 8px;
}

.inquiry-item {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(220px, 1fr) 96px auto;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  padding: 10px;
}

.inquiry-item strong,
.inquiry-item span {
  display: block;
}

.inquiry-item span {
  color: var(--muted);
}

.inquiry-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wide {
  grid-column: 1 / -1;
}

.modal-dialog {
  width: min(780px, calc(100vw - 32px));
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 0;
}

.modal-dialog::backdrop {
  background: rgba(20, 18, 14, 0.48);
}

.dialog-header {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-header p {
  margin: 4px 0 0;
}

.form-grid,
.modal-dialog .form-actions {
  padding: 18px;
}

.modal-dialog .form-actions {
  justify-content: flex-start;
  padding-top: 0;
}

.status.error {
  color: #b42318;
}

body[data-density="compact"] {
  --gap: 10px;
}

body[data-density="compact"] .hero {
  min-height: 420px;
}

body[data-density="compact"] .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

body[data-density="spacious"] {
  --gap: 24px;
}

body[data-density="spacious"] .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

body[data-card-style="image-led"] .product-body {
  min-height: 190px;
}

body[data-card-style="spec-led"] .product-visual,
body[data-card-style="spec-led"] .product-card img {
  aspect-ratio: 4 / 3;
}

body[data-hero-style="trade"] .hero {
  min-height: 440px;
  grid-template-columns: minmax(0, 1fr);
}

body[data-hero-style="trade"] .hero-showcase {
  display: none;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 36px 22px 24px;
  }

  .hero-showcase {
    min-height: 280px;
  }

  .factory-band,
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .factory-band,
  .inquiry-grid,
  .form-grid,
  .inquiry-item {
    grid-template-columns: 1fr;
  }

  .catalog-main,
  .inquiry-section,
  .control-strip {
    padding: 18px;
  }
}
