:root {
  --ink: #111614;
  --muted: #66706c;
  --line: #ded8cb;
  --paper: #fbfaf6;
  --paper-2: #f2f5f1;
  --panel: #ffffff;
  --accent: #315765;
  --accent-2: #b88a42;
  --danger: #aa3f34;
  --shadow: 0 18px 44px rgba(28, 34, 31, 0.12);
  --radius: 8px;
  font-family: Inter, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

img {
  display: block;
  max-width: 100%;
}

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

button,
a {
  color: inherit;
}

.site-header,
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 48px);
  background: rgba(251, 250, 246, 0.94);
  border-bottom: 1px solid rgba(33, 40, 37, 0.08);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #ffe3a2;
  background: #15130d;
  border-radius: 6px;
  font-weight: 800;
}

.brand-lockup strong {
  display: block;
  font-size: 18px;
}

.brand-lockup small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nav-links,
.admin-top-actions,
.header-tools,
.hero-actions,
.card-actions,
.drawer-actions,
.load-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links a {
  padding: 10px 8px;
  color: #26302c;
  text-decoration: none;
  font-size: 14px;
}

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.lang-switcher button,
.icon-button,
.text-action {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.lang-switcher button {
  min-width: 34px;
  height: 32px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
}

.lang-switcher .is-active {
  color: #fff;
  background: var(--accent);
}

.admin-link,
.primary-link,
.ghost-link,
.header-quote,
.product-card button,
.category-card button {
  min-height: 40px;
  border-radius: 7px;
  border: 1px solid var(--line);
  cursor: pointer;
  text-decoration: none;
}

.admin-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #27404a;
  background: rgba(255, 255, 255, 0.72);
}

.primary-link,
.header-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  color: #15130d;
  background: #f5d989;
  border-color: #f5d989;
  font-weight: 800;
}

.header-quote {
  color: #fff;
  background: #15130d;
  border-color: #15130d;
}

.header-quote b {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  color: #15130d;
  background: #f5d989;
  border-radius: 999px;
  font-size: 12px;
}

.compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.full {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: #15130d;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 12, 11, 0.78), rgba(10, 12, 11, 0.4), rgba(10, 12, 11, 0.16));
}

.hero-content {
  position: relative;
  display: grid;
  align-content: center;
  width: min(820px, calc(100% - 40px));
  min-height: 690px;
  margin-left: clamp(22px, 8vw, 110px);
  padding: 76px 0 54px;
  color: #fff;
}

.hero-label,
.section-kicker {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(46px, 7vw, 84px);
  line-height: 0.98;
}

.hero-copy {
  max-width: 720px;
  margin: 24px 0 30px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
}

.hero-stats {
  display: grid;
  max-width: 760px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 44px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(0, 0, 0, 0.22);
}

.hero-stats div {
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats dt {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 700;
}

.hero-stats dd {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 900;
}

.section {
  padding: clamp(64px, 8vw, 104px) clamp(18px, 5vw, 76px);
}

.section-heading {
  max-width: 880px;
  margin: 0 auto 36px;
  text-align: center;
}

.section-heading.compact {
  margin-bottom: 28px;
}

.section-heading h2,
.product-section-head h2,
.company h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.section-heading p:not(.section-kicker),
.product-section-head p,
.company-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  min-width: 0;
}

.category-card button {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 410px;
  grid-template-rows: 220px 1fr;
  overflow: hidden;
  padding: 0;
  text-align: left;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(29, 36, 33, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.category-card button:hover,
.category-card.is-active button {
  transform: translateY(-3px);
  border-color: rgba(49, 87, 101, 0.46);
  box-shadow: var(--shadow);
}

.category-media {
  display: block;
  background: linear-gradient(145deg, #f8f7f1, #e4ebe8);
}

.category-media img {
  width: 100%;
  height: 100%;
  padding: 18px;
  object-fit: contain;
}

.category-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
}

.category-copy small,
.product-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.category-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 25px;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-copy em {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-copy span:last-child {
  margin-top: 6px;
  color: var(--accent-2);
  font-weight: 800;
}

.product-section {
  background: #fff;
  border-top: 1px solid rgba(33, 40, 37, 0.08);
  border-bottom: 1px solid rgba(33, 40, 37, 0.08);
}

.product-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.product-section-head > div {
  max-width: 820px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.search-box {
  display: flex;
  width: min(480px, 100%);
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.result-line {
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: grid;
  grid-template-rows: 240px 1fr;
  min-height: 560px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-media {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: linear-gradient(145deg, #f8f7f1, #e4ebe8);
}

.product-media img {
  width: 100%;
  height: 100%;
  padding: 16px;
  object-fit: contain;
  transition: transform 0.24s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.035);
}

.badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 7px 9px;
  overflow: hidden;
  color: #fff;
  background: rgba(17, 22, 20, 0.78);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-body {
  display: grid;
  align-content: stretch;
  grid-template-rows: auto auto auto auto auto;
  padding: 20px;
}

.product-card h3 {
  display: -webkit-box;
  min-height: 56px;
  margin: 8px 0 10px;
  overflow: hidden;
  font-size: 22px;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card p {
  display: -webkit-box;
  min-height: 72px;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pills span {
  max-width: 100%;
  padding: 7px 9px;
  overflow: hidden;
  color: #34433e;
  background: #e7eee7;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-bottom {
  display: flex;
  align-items: center;
  align-self: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.price {
  color: var(--danger);
  font-size: 22px;
  font-weight: 900;
}

.product-card .card-actions button {
  min-height: 36px;
  padding: 0 12px;
  background: #fff;
}

.load-row {
  justify-content: center;
  margin-top: 28px;
}

.company {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 34px;
  align-items: start;
}

.company-copy,
.contact-panel {
  min-width: 0;
}

.capability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.capability-row span {
  padding: 10px 12px;
  color: #26302c;
  background: #eef3ed;
  border: 1px solid #dbe4da;
  border-radius: 6px;
  font-weight: 800;
}

.contact-panel {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(29, 36, 33, 0.08);
}

.contact-panel h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.contact-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(33, 40, 37, 0.08);
}

.contact-row dt {
  color: var(--muted);
  font-size: 13px;
}

.contact-row dd {
  margin: 0;
  font-weight: 800;
  word-break: break-word;
}

.gallery {
  background: var(--paper-2);
}

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

.gallery-item {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}

.quote-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: grid;
  width: min(420px, 100vw);
  height: 100vh;
  grid-template-rows: auto 1fr auto;
  padding: 24px;
  background: #fff;
  box-shadow: -18px 0 44px rgba(0, 0, 0, 0.16);
  transform: translateX(104%);
  transition: transform 0.22s ease;
}

.quote-drawer.is-open {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: none;
  background: rgba(0, 0, 0, 0.28);
}

.drawer-backdrop.is-open {
  display: block;
}

.drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.drawer-head h2 {
  margin: 0;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.quote-items {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px 0;
}

.quote-item {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.quote-item img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  background: #f4f0e8;
  border-radius: 6px;
}

.quote-item h3 {
  margin: 0;
  font-size: 14px;
}

.quote-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  background: #f8f7f1;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.product-dialog {
  width: min(980px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-dialog::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
}

.dialog-media {
  display: grid;
  min-height: 520px;
  place-items: center;
  background: linear-gradient(145deg, #f8f7f1, #e4ebe8);
}

.dialog-media img {
  width: 100%;
  height: 100%;
  max-height: 560px;
  padding: 28px;
  object-fit: contain;
}

.dialog-copy {
  max-height: 86vh;
  overflow: auto;
  padding: 42px;
}

.dialog-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
}

.dialog-copy p {
  color: var(--muted);
  line-height: 1.75;
}

.detail-price {
  margin: 18px 0;
}

.spec-table,
.variant-table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  font-size: 13px;
}

.spec-table th,
.spec-table td,
.variant-table th,
.variant-table td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.spec-table th,
.variant-table th {
  width: 34%;
  background: #f8f7f1;
}

.variant-table-wrap {
  max-width: 100%;
  overflow: auto;
}

@media (max-width: 1120px) {
  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header,
  .admin-topbar {
    position: static;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .header-tools {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin: 0 auto;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stats div {
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .category-grid,
  .product-grid,
  .company,
  .dialog-layout {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .product-section-head,
  .card-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dialog-media {
    min-height: 320px;
  }

  .dialog-copy {
    padding: 24px;
  }
}
