.hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
  position: relative;
}

.category-panel,
.member-panel,
.quick-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-panel {
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: visible;
  position: relative;
  z-index: auto;
}

.category-tree,
.category-primary-row {
  display: grid;
  gap: 8px;
}

.panel-title {
  font-weight: 800;
  padding-bottom: 8px;
}

.category-panel button,
.category-panel a {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
  text-align: left;
  border-color: transparent;
  background: var(--soft);
  color: inherit;
  text-decoration: none;
}

.category-primary-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-panel .category-parent {
  min-height: 44px;
  padding: 7px 8px;
}

.category-panel .category-parent span {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-tree [data-category-all] {
  display: none !important;
}

.category-panel button small,
.category-panel a small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.category-drilldown {
  display: grid;
  gap: 12px;
}

.category-drilldown-header {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.category-drilldown-header button {
  width: fit-content;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--green);
  border-color: var(--line);
  background: #fff;
}

.category-drilldown-header div {
  display: grid;
  gap: 3px;
}

.category-drilldown-header strong {
  font-size: 17px;
}

.category-drilldown-header span,
.category-empty {
  color: var(--muted);
  font-size: 13px;
}

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

.category-panel .category-secondary-link {
  min-width: 0;
  min-height: 44px;
  justify-content: space-between;
  padding: 8px 10px;
  border-color: var(--line);
  background: #fff;
}

.category-secondary-link span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.category-secondary-link:hover,
.category-secondary-link:focus-visible {
  border-color: var(--green);
  color: var(--green);
  background: #eef8f4;
}

.category-panel button.is-active,
.category-panel a.is-active,
.brand-strip button.is-active {
  border-color: var(--green);
  color: var(--green);
  background: #eef8f4;
}

.category-panel button.is-active small {
  color: var(--green);
}

.hero-main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  padding: 26px;
  border-radius: 8px;
  background: #0b3d35;
  color: #fff;
}

.hero-main::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(11, 61, 53, 0.86), rgba(20, 82, 105, 0.58));
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-grid.is-loading {
  opacity: 0.62;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.product-card img,
.product-row img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: end;
}

.hero-copy p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-copy h1 {
  margin: 0 0 22px;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions button,
.quick-panel button,
.drawer-form button,
.modal-card > button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
}

#quick-quote-button {
  background: var(--red);
}

.quick-panel {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 16px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.quick-panel textarea {
  width: 100%;
  min-height: 128px;
  margin: 12px 0;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.member-panel {
  padding: 16px;
  display: grid;
  gap: 18px;
}

#member-card {
  display: grid;
  gap: 8px;
}

#member-card span {
  color: var(--muted);
}

#member-card button {
  border: 0;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  min-height: 40px;
  font-weight: 700;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.status-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--soft);
}

.status-grid b {
  display: block;
  font-size: 22px;
}

.brand-strip,
.scene-grid,
.catalog-head {
  margin-top: 18px;
}

.brand-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.brand-strip button {
  white-space: nowrap;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.scene-grid button {
  display: grid;
  gap: 8px;
  text-align: left;
  padding: 18px;
  min-height: 104px;
  background: #fff;
}

.scene-grid strong {
  font-size: 18px;
}

.scene-grid span {
  color: var(--muted);
}

.home-link-hub {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.home-link-hub > div {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.home-link-hub strong {
  color: var(--ink);
}

.home-link-hub a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.home-link-hub a:hover {
  text-decoration: underline;
}

.catalog-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.search-panel {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.search-result-head,
.search-assist,
.result-filters {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-result-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
}

.search-breadcrumb {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.search-breadcrumb a {
  color: var(--green);
  text-decoration: none;
}

.search-breadcrumb strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.match-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--green);
  background: #e8f7f2;
  font-size: 12px;
  font-weight: 800;
}

.search-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.search-assist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  color: var(--muted);
}

.search-assist.is-empty {
  min-height: 86px;
  align-content: center;
  justify-content: center;
  background: #f8fbfa;
}

.search-assist button:first-of-type {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.result-filters {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.filter-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.filter-row:last-child {
  border-bottom: 0;
}

.filter-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-inline {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-separator {
  color: var(--muted);
}

.filter-brand .filter-options {
  max-height: 92px;
  overflow: auto;
}

.tag-filter {
  min-width: 0;
}

.result-filters select,
.result-filters input {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.filter-price-row input {
  width: 132px;
}

.filter-extra-row select {
  width: 160px;
}

#clear-result-filters {
  min-width: 78px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 38px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.filter-options label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 24px;
  padding: 2px 4px;
  color: var(--ink);
  font-size: 12px;
}

.filter-options input {
  width: 14px;
  min-height: 14px;
  padding: 0;
}

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

.filter-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 38px;
  color: var(--ink);
  font-size: 13px;
}

.filter-check input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.catalog-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.view-toggle {
  display: flex;
  gap: 6px;
}

.view-toggle button.is-active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.catalog-head p,
.catalog-head h2 {
  margin: 0;
}

.catalog-head p {
  color: var(--green);
  font-weight: 700;
}

.catalog-head h2 {
  margin-top: 4px;
  font-size: 26px;
  letter-spacing: 0;
}

.product-grid {
  min-height: 280px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.product-grid.view-list {
  grid-template-columns: 1fr;
  gap: 10px;
}

.product-grid.view-list .skeleton {
  min-height: 150px;
}

.product-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) 150px 180px 160px;
  gap: 16px;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) 150px 180px 160px;
  gap: 16px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.product-list-head + .product-row {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.product-row[data-card-detail],
.product-card[data-card-detail],
.recommend-card[data-product-detail],
.compact-product[data-product-detail] {
  cursor: pointer;
}

.product-row[data-card-detail]:focus-visible,
.product-card[data-card-detail]:focus-visible,
.recommend-card[data-product-detail]:focus-visible,
.compact-product[data-product-detail]:focus-visible {
  outline: 3px solid rgba(201, 22, 35, 0.25);
  outline-offset: 2px;
}

.product-row-detail {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.product-row img {
  width: 124px;
  height: 124px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.product-row-main,
.product-row-price,
.product-row-stock,
.product-row-actions,
.product-row-title,
.product-row-meta {
  min-width: 0;
}

.product-row-main {
  display: grid;
  gap: 10px;
}

.product-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.product-native-link {
  color: inherit;
  text-decoration: none;
}

.product-row-title strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-row-title strong span {
  color: var(--red);
  margin-right: 2px;
}

.product-row-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.product-row-meta span {
  overflow-wrap: anywhere;
}

.product-row-price,
.product-row-stock,
.product-row-actions {
  display: grid;
  gap: 8px;
  align-content: center;
  justify-items: start;
}

.product-row-price strong {
  color: var(--red);
  font-size: 22px;
}

.product-row-price span,
.product-row-stock span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.product-row-stock strong {
  color: var(--muted);
  font-size: 14px;
}

.product-row-actions {
  justify-items: stretch;
}

.product-row-actions input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.product-row-actions button,
.product-row-actions .product-detail-link {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.product-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}

.product-row-actions button:first-of-type {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
  font-weight: 800;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 178px auto;
  min-width: 0;
}

.product-card img {
  width: 100%;
  height: 178px;
  object-fit: cover;
  background: #e7eeeb;
}

body.listing-mode .product-grid.view-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.listing-mode .product-grid.view-grid .product-card {
  grid-template-rows: 142px auto;
}

body.listing-mode .product-grid.view-grid .product-card img {
  height: 142px;
}

.product-info {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.product-brand {
  overflow: hidden;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-title {
  min-height: 44px;
  display: -webkit-box;
  overflow: hidden;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.price {
  color: var(--red);
  font-weight: 800;
  font-size: 20px;
}

.source {
  color: var(--amber);
  font-size: 12px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-actions button,
.card-actions .product-detail-link {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.card-actions button:last-child,
.card-actions .product-detail-link:last-child {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.search-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 210px;
  padding: 34px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.search-empty strong {
  font-size: 22px;
}

.search-empty span {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.55;
}

.search-empty div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.search-empty button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
}

.search-empty button:first-child {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

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

@media (max-width: 520px) {
  .category-secondary-grid {
    grid-template-columns: 1fr;
  }
}

.product-card:hover,
.product-row:hover {
  border-color: rgba(201, 22, 35, 0.45);
}

.recommend-card img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 6px;
}
