:root {
  --ink: #17211b;
  --muted: #627267;
  --line: #d9e2da;
  --paper: #fbfcf8;
  --field: #ffffff;
  --leaf: #2f6d3d;
  --leaf-dark: #214f2e;
  --gold: #b8822f;
  --sky: #d9ecf2;
  --rose: #ede1dd;
  --shadow: 0 18px 45px rgba(35, 57, 41, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:not(.is-chat-ready) iframe[src*="tawk.to"],
body:not(.is-chat-ready) iframe[title*="chat" i] {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 248, 0.92);
  backdrop-filter: blur(14px);
}

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

.brand-logo {
  display: block;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  max-width: 54px;
  max-height: 54px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

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

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.top-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.top-nav a {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}

.quote-button,
.chat-nav-button,
.band-action,
.contact-form button,
.chat-details-form button,
.sku-actions button {
  border: 0;
  border-radius: 6px;
  background: var(--leaf);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
}

.quote-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}

.chat-nav-button {
  padding: 12px 14px;
  background: var(--gold);
}

.quote-button span {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
}

.eyebrow,
.breadcrumb,
.sku-path {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 0.95;
}

.catalog-heading {
  padding: 28px clamp(18px, 4vw, 48px) 0;
}

.catalog-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.search-field {
  display: grid;
  gap: 8px;
  width: min(560px, 100%);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.search-field input,
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  outline: 0;
}

.search-field input {
  height: 46px;
  padding: 0 14px;
}

.search-field input:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(47, 109, 61, 0.15);
}

.metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
}

.metrics span,
.result-count {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--paper);
}

.catalog-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 0;
  min-height: 760px;
}

.catalog-menu {
  border-right: 1px solid var(--line);
  background: #f4f7f1;
}

.menu-heading {
  position: sticky;
  top: 72px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #f4f7f1;
  font-weight: 850;
}

.menu-heading button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  color: var(--leaf-dark);
  cursor: pointer;
  font-weight: 800;
}

.tree-menu {
  display: grid;
  gap: 2px;
  padding: 12px;
}

.tree-item {
  display: grid;
  gap: 2px;
}

.tree-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  min-height: 38px;
}

.tree-children {
  display: grid;
  gap: 2px;
}

.tree-children[hidden] {
  display: none;
}

.tree-toggle,
.tree-toggle-spacer {
  width: 28px;
  height: 28px;
}

.tree-toggle {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.tree-toggle:hover {
  background: #fff;
  color: var(--leaf-dark);
}

.tree-toggle[aria-expanded="true"] {
  color: var(--leaf-dark);
  transform: rotate(90deg);
}

.tree-node {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.tree-node span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-node small {
  color: var(--muted);
  font-weight: 750;
}

.tree-node[data-level="1"] {
  padding-left: 0;
  font-weight: 850;
}

.tree-node[data-level="2"] {
  padding-left: 16px;
}

.tree-node[data-level="3"] {
  padding-left: 32px;
}

.tree-node[data-level="4"] {
  padding-left: 48px;
}

.tree-node:hover,
.tree-node.is-active {
  background: #fff;
  box-shadow: inset 3px 0 0 var(--leaf);
}

.catalog-results {
  padding: clamp(18px, 3vw, 36px);
}

.results-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}

.results-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.folder-description {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.sku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.sku-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(35, 57, 41, 0.08);
}

.image-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #e7ede5;
}

.primary-image,
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.primary-image.sold-out-image {
  object-fit: contain;
  padding: 18px;
}

.gallery-controls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.gallery-button,
.gallery-count {
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(23, 33, 27, 0.78);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.gallery-button {
  min-width: 58px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
  pointer-events: auto;
}

.gallery-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.gallery-count {
  display: grid;
  place-items: center;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 850;
}

.sku-body {
  padding: 16px;
}

.sku-body h3 {
  margin-bottom: 12px;
  font-size: 1.22rem;
}

.sku-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.sku-meta span {
  min-width: 0;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
  min-height: 58px;
}

.thumb {
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  background: #eef3ed;
  cursor: pointer;
}

.thumb.is-selected {
  border-color: var(--leaf);
}

.sku-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.sku-actions button {
  min-height: 40px;
}

.sku-actions .secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--leaf-dark);
}

.sku-actions .is-selected {
  background: var(--gold);
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px 18px;
  color: #b83a30;
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 3.8rem);
  font-weight: 950;
}

.empty-state img {
  width: min(520px, 100%);
  border-radius: 8px;
}

.commercial-band,
.contact-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 48px);
  border-top: 1px solid var(--line);
}

.commercial-band {
  background: var(--leaf-dark);
  color: #fff;
}

.commercial-band p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.commercial-band code {
  color: #fff;
}

.band-action {
  flex: 0 0 auto;
  padding: 13px 16px;
  background: #fff;
  color: var(--leaf-dark);
  text-decoration: none;
}

.contact-band {
  align-items: start;
  background: #fff;
}

.contact-band > div {
  max-width: 520px;
}

.contact-copy {
  color: var(--muted);
  line-height: 1.6;
}

.contact-form {
  display: grid;
  gap: 12px;
  width: min(520px, 100%);
}

.inquiry-items {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--paper);
}

.inquiry-items-heading,
.inquiry-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inquiry-items-heading button,
.inquiry-item button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--leaf-dark);
  cursor: pointer;
  font-weight: 800;
}

.inquiry-items-heading button {
  padding: 6px 10px;
}

.inquiry-list {
  display: none;
  gap: 8px;
}

.inquiry-items.has-items .inquiry-list {
  display: grid;
}

.inquiry-items.has-items .inquiry-total {
  display: flex;
}

.inquiry-items.has-items .empty-inquiry {
  display: none;
}

.empty-inquiry {
  margin: 0;
  color: var(--muted);
}

.inquiry-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.inquiry-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inquiry-item strong,
.inquiry-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inquiry-item small {
  color: var(--muted);
  font-weight: 750;
}

.inquiry-item button {
  flex: 0 0 auto;
  padding: 7px 9px;
  font-size: 0.82rem;
}

.inquiry-total {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--ink);
  font-weight: 850;
}

.inquiry-total strong {
  color: var(--leaf-dark);
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 750;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--leaf-dark);
  font-size: 0.92rem;
  font-weight: 750;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
}

.contact-form button {
  min-height: 44px;
}

.chat-details-dialog {
  width: min(440px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(23, 33, 27, 0.24);
}

.chat-details-dialog::backdrop {
  background: rgba(23, 33, 27, 0.38);
}

.chat-details-form {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.chat-details-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.chat-details-heading h2 {
  margin: 0;
  font-size: 1.45rem;
}

.chat-details-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--leaf-dark);
}

.chat-details-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 750;
}

.chat-details-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--field);
  color: var(--ink);
  outline: 0;
}

.chat-details-form input:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(47, 109, 61, 0.15);
}

.chat-details-status {
  min-height: 20px;
  margin: 0;
  color: var(--leaf-dark);
  font-size: 0.9rem;
  font-weight: 750;
}

.chat-details-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chat-details-form > button[type="submit"],
.chat-details-actions button {
  min-height: 44px;
}

.chat-details-actions .chat-details-cancel {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--leaf-dark);
}

@media (max-width: 900px) {
  .site-header,
  .toolbar,
  .commercial-band,
  .contact-band {
    align-items: stretch;
    flex-direction: column;
  }

  .top-nav {
    margin-left: 0;
  }

  .catalog-shell {
    grid-template-columns: 1fr;
  }

  .catalog-menu {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .menu-heading {
    position: static;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 2.55rem;
  }

  .top-nav {
    display: none;
  }

  .chat-nav-button {
    display: none;
  }

  .results-heading {
    display: grid;
  }

  .sku-grid {
    grid-template-columns: 1fr;
  }
}
