/**
 * HD CLC — Product catalog page visual polish
 * Aligns [hdclc_product_catalog] with home/about design language.
 * Load after system-ui.css. Visual only — no logic changes.
 */
.hdclc-catalog {
  --hd-green: #176b3a;
  --hd-green-dark: #0f4d29;
  --hd-dark: #22362a;
  --hd-muted: #53665a;
  --hd-line: #d9e3dc;
  --hd-bg: #f4f7f5;
  --hd-white: #fff;
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 0 20px 48px !important;
  font-family: "Roboto", Arial, Helvetica, sans-serif !important;
}

/* Kill stray theme empty boxes / gray bars around catalog */
.hdclc-catalog > :empty,
.hdclc-catalog .hdclc-catalog-hero > :empty,
.hdclc-catalog .hdclc-catalog-group-head > :empty {
  display: none !important;
}

.hdclc-catalog .hdclc-catalog-hero::before,
.hdclc-catalog .hdclc-catalog-hero::after,
.hdclc-catalog .hdclc-catalog-group-head::before,
.hdclc-catalog .hdclc-catalog-group-head::after,
.hdclc-catalog .hdclc-step-title::before,
.hdclc-catalog .hdclc-step-title::after {
  content: none !important;
  display: none !important;
}

/* ========== HERO ========== */
.hdclc-catalog .hdclc-catalog-hero {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 24px !important;
  align-items: stretch !important;
  padding: 32px 28px !important;
  margin: 0 0 8px !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #f7faf8 0%, #fff 55%) !important;
  box-shadow: 0 8px 28px rgba(23, 107, 58, .06) !important;
  border-bottom: 1px solid var(--hd-line) !important;
}

@media (min-width: 860px) {
  .hdclc-catalog .hdclc-catalog-hero {
    grid-template-columns: 1.4fr 0.85fr !important;
    align-items: center !important;
    padding: 36px 32px !important;
  }
}

.hdclc-catalog .hdclc-catalog-eyebrow {
  display: inline-block !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: var(--hd-green) !important;
  background: transparent !important;
  border: 0 !important;
}

.hdclc-catalog .hdclc-catalog-hero h1 {
  margin: 0 0 12px !important;
  font-size: clamp(26px, 3.2vw, 36px) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  color: var(--hd-dark) !important;
}

.hdclc-catalog .hdclc-catalog-hero p {
  margin: 0 0 16px !important;
  max-width: 540px;
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: var(--hd-muted) !important;
}

.hdclc-catalog .hdclc-catalog-trust {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 16px !important;
  margin-top: 4px !important;
}

.hdclc-catalog .hdclc-catalog-trust span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--hd-dark) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.hdclc-catalog .hdclc-catalog-hero-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 18px !important;
  background: #fff !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(23, 107, 58, .05) !important;
  min-width: 0 !important;
  width: 100% !important;
  flex: none !important;
}

.hdclc-catalog .hdclc-catalog-quote-link,
.hdclc-catalog .hdclc-catalog-call {
  min-height: 46px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.hdclc-catalog .hdclc-catalog-quote-link {
  background: var(--hd-green) !important;
  border-color: var(--hd-green) !important;
}

.hdclc-catalog .hdclc-catalog-quote-link:hover {
  background: var(--hd-green-dark) !important;
}

.hdclc-catalog .hdclc-catalog-call {
  background: #fff !important;
  border: 1.5px solid var(--hd-green) !important;
  color: var(--hd-green) !important;
}

.hdclc-catalog .hdclc-catalog-call:hover {
  background: #e8f5ee !important;
}

.hdclc-catalog .hdclc-cart-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--hd-green) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.hdclc-catalog .hdclc-catalog-quote-link .hdclc-cart-count {
  background: rgba(255,255,255,.95) !important;
}

/* ========== TOOLBAR ========== */
.hdclc-catalog .hdclc-catalog-toolbar {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 12px !important;
  align-items: center !important;
  margin: 20px 0 8px !important;
  padding: 16px !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: 12px !important;
  background: var(--hd-bg) !important;
  box-shadow: none !important;
}

@media (min-width: 720px) {
  .hdclc-catalog .hdclc-catalog-toolbar {
    grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.7fr) auto !important;
  }
}

.hdclc-catalog .hdclc-search-wrap,
.hdclc-catalog .hdclc-filter-wrap {
  display: block !important;
  margin: 0 !important;
  width: 100% !important;
}

.hdclc-catalog .hdclc-product-search,
.hdclc-catalog .hdclc-product-filter {
  width: 100% !important;
  min-height: 44px !important;
  padding: 10px 14px !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-size: 14px !important;
  color: var(--hd-dark) !important;
  box-shadow: none !important;
}

.hdclc-catalog .hdclc-product-search:focus,
.hdclc-catalog .hdclc-product-filter:focus {
  outline: none !important;
  border-color: var(--hd-green) !important;
  box-shadow: 0 0 0 3px rgba(23, 107, 58, .12) !important;
}

.hdclc-catalog .hdclc-product-result-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 1px solid var(--hd-line) !important;
  color: var(--hd-green) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

/* ========== GROUP HEAD ========== */
.hdclc-catalog .hdclc-catalog-group {
  margin-top: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.hdclc-catalog .hdclc-catalog-group-head {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px 20px !important;
  margin-bottom: 18px !important;
  padding: 0 0 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--hd-line) !important;
  background: transparent !important;
}

.hdclc-catalog .hdclc-section-eyebrow {
  display: inline-block !important;
  margin: 0 0 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: var(--hd-green) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.hdclc-catalog .hdclc-catalog-group-head h2 {
  margin: 0 0 6px !important;
  font-size: clamp(20px, 2.5vw, 26px) !important;
  font-weight: 800 !important;
  color: var(--hd-dark) !important;
  letter-spacing: -0.02em !important;
}

.hdclc-catalog .hdclc-catalog-group-head p {
  margin: 0 !important;
  max-width: 560px;
  font-size: 14px !important;
  color: var(--hd-muted) !important;
  line-height: 1.5 !important;
}

.hdclc-catalog .hdclc-catalog-count {
  display: inline-flex !important;
  align-items: center !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  background: #e8f5ee !important;
  border: 0 !important;
  color: var(--hd-green) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

/* ========== WAREHOUSE STEP ========== */
.hdclc-catalog .hdclc-warehouse-step,
.hdclc-catalog .hdclc-spec-step {
  margin: 8px 0 20px !important;
  padding: 20px !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: 14px !important;
  background: var(--hd-bg) !important;
  box-shadow: none !important;
}

.hdclc-catalog .hdclc-step-title {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  margin-bottom: 16px !important;
}

.hdclc-catalog .hdclc-step-number {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  background: var(--hd-green) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.hdclc-catalog .hdclc-step-title h3 {
  margin: 0 0 4px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--hd-dark) !important;
}

.hdclc-catalog .hdclc-step-title p {
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--hd-muted) !important;
  line-height: 1.45 !important;
}

.hdclc-catalog .hdclc-warehouse-grid {
  display: grid !important;
  gap: 12px !important;
}

@media (min-width: 700px) {
  .hdclc-catalog .hdclc-warehouse-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.hdclc-catalog .hdclc-warehouse-option {
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  padding: 18px 18px 16px !important;
  border: 1.5px solid var(--hd-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease !important;
}

.hdclc-catalog .hdclc-warehouse-option:hover {
  border-color: #b8d4c4 !important;
  box-shadow: 0 6px 18px rgba(23, 107, 58, .08) !important;
  transform: translateY(-1px) !important;
}

.hdclc-catalog .hdclc-warehouse-option.is-selected {
  border-color: var(--hd-green) !important;
  border-width: 2px !important;
  box-shadow: 0 8px 22px rgba(23, 107, 58, .12) !important;
  background: #fff !important;
}

.hdclc-catalog .hdclc-warehouse-option strong,
.hdclc-catalog .hdclc-warehouse-option .hdclc-warehouse-title {
  display: block !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--hd-dark) !important;
  margin-bottom: 4px !important;
}

.hdclc-catalog .hdclc-warehouse-address,
.hdclc-catalog .hdclc-warehouse-hint {
  display: block !important;
  font-size: 13px !important;
  color: var(--hd-muted) !important;
  line-height: 1.45 !important;
}

.hdclc-catalog .hdclc-warehouse-variant-count {
  display: inline-flex !important;
  margin-top: 10px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  background: #e8f5ee !important;
  color: var(--hd-green) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border: 0 !important;
}

.hdclc-catalog .hdclc-warehouse-choose {
  display: inline-flex !important;
  margin-top: 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--hd-green) !important;
}

.hdclc-catalog .hdclc-warehouse-note {
  margin: 14px 0 0 !important;
  font-size: 13px !important;
  color: var(--hd-muted) !important;
  line-height: 1.45 !important;
}

.hdclc-catalog .hdclc-selected-warehouse {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 16px !important;
  padding: 14px 16px !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
}

.hdclc-catalog .hdclc-selected-label {
  display: block !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: var(--hd-green) !important;
  margin-bottom: 2px !important;
}

.hdclc-catalog .hdclc-change-warehouse {
  min-height: 40px !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  border: 1.5px solid var(--hd-green) !important;
  background: #fff !important;
  color: var(--hd-green) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

.hdclc-catalog .hdclc-change-warehouse:hover {
  background: #e8f5ee !important;
}

/* ========== PRODUCT CARDS ========== */
.hdclc-catalog .hdclc-product-grid {
  display: grid !important;
  gap: 16px !important;
  grid-template-columns: 1fr !important;
}

@media (min-width: 640px) {
  .hdclc-catalog .hdclc-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 980px) {
  .hdclc-catalog .hdclc-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.hdclc-catalog .hdclc-product-card {
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(23, 107, 58, .04) !important;
  overflow: hidden !important;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease !important;
}

.hdclc-catalog .hdclc-product-card:hover {
  border-color: #b8d4c4 !important;
  box-shadow: 0 10px 28px rgba(23, 107, 58, .1) !important;
  transform: translateY(-2px) !important;
}

.hdclc-catalog .hdclc-product-media,
.hdclc-catalog .hdclc-product-media-custom {
  aspect-ratio: 16 / 10 !important;
  background: #e8f0eb !important;
  overflow: hidden !important;
}

.hdclc-catalog .hdclc-product-media img,
.hdclc-catalog .hdclc-product-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.hdclc-catalog .hdclc-product-placeholder,
.hdclc-catalog .hdclc-panel-art {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  min-height: 140px !important;
  background: linear-gradient(145deg, #e8f5ee, #d5ebe0) !important;
  color: var(--hd-green) !important;
  text-align: center !important;
  padding: 16px !important;
}

.hdclc-catalog .hdclc-product-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 18px 18px 20px !important;
  background: #fff !important;
  flex: 1 !important;
}

.hdclc-catalog .hdclc-product-category {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: var(--hd-green) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.hdclc-catalog .hdclc-product-content h3 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: var(--hd-dark) !important;
}

.hdclc-catalog .hdclc-product-content h3 a {
  color: inherit !important;
  text-decoration: none !important;
}

.hdclc-catalog .hdclc-product-sku,
.hdclc-catalog .hdclc-variant-meta {
  font-size: 12px !important;
  color: var(--hd-muted) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.hdclc-catalog .hdclc-product-content > p {
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--hd-muted) !important;
  line-height: 1.45 !important;
}

.hdclc-catalog .hdclc-product-price {
  margin: 4px 0 2px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.hdclc-catalog .hdclc-product-price strong {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--hd-green) !important;
  letter-spacing: -0.02em !important;
}

.hdclc-catalog .hdclc-product-price small,
.hdclc-catalog .hdclc-contact-price {
  font-size: 13px !important;
  color: var(--hd-muted) !important;
  font-weight: 500 !important;
}

.hdclc-catalog .hdclc-product-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  gap: 10px !important;
  margin-top: auto !important;
  padding-top: 8px !important;
}

.hdclc-catalog .hdclc-qty-label {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--hd-muted) !important;
}

.hdclc-catalog .hdclc-qty-label input,
.hdclc-catalog .hdclc-product-actions input[type="number"],
.hdclc-catalog .hdclc-product-actions select {
  min-height: 40px !important;
  min-width: 88px !important;
  padding: 8px 10px !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-size: 14px !important;
}

.hdclc-catalog .hdclc-add-to-list {
  flex: 1 1 auto !important;
  min-height: 42px !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--hd-green) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background .15s ease !important;
}

.hdclc-catalog .hdclc-add-to-list:hover {
  background: var(--hd-green-dark) !important;
}

/* ========== BOTTOM BAR ========== */
.hdclc-catalog .hdclc-catalog-bottom {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin: 28px 0 8px !important;
  padding: 16px 18px !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 4px 16px rgba(23, 107, 58, .05) !important;
}

.hdclc-catalog .hdclc-catalog-bottom strong {
  display: block !important;
  font-size: 15px !important;
  color: var(--hd-dark) !important;
}

.hdclc-catalog .hdclc-catalog-bottom small {
  font-size: 12px !important;
  color: var(--hd-muted) !important;
}

.hdclc-catalog .hdclc-catalog-empty {
  margin: 16px 0 !important;
  padding: 20px !important;
  text-align: center !important;
  border: 1px dashed var(--hd-line) !important;
  border-radius: 12px !important;
  color: var(--hd-muted) !important;
  background: var(--hd-bg) !important;
}

/* Embedded list / form spacing */
.hdclc-catalog .hdclc-shared-list,
.hdclc-catalog .hdclc-rfq-form {
  margin-top: 24px !important;
}

@media (max-width: 599px) {
  .hdclc-catalog {
    padding: 0 14px 36px !important;
  }
  .hdclc-catalog .hdclc-catalog-hero {
    padding: 22px 18px !important;
  }
  .hdclc-catalog .hdclc-warehouse-step,
  .hdclc-catalog .hdclc-spec-step {
    padding: 16px !important;
  }
}

/* =========================================================
   Remove stray gray boxes / empty theme decorations
   (Flatsome / theme leftovers that break plugin layouts)
   ========================================================= */

/* Empty nodes inside catalog */
.hdclc-catalog > :empty,
.hdclc-catalog :empty:not(img):not(input):not(br):not(hr):not(td):not(th):not(iframe):not(svg):not(path):not(span.hdclc-cart-count):not(.hdclc-step-number) {
  display: none !important;
}

/* Common Flatsome / UX Builder ghost elements around shortcode pages */
.page-content > .row:has(.hdclc-catalog) > .col:empty,
.page-content > .row:has(.hdclc-home) > .col:empty,
.page-content > .row:has(.hdclc-about) > .col:empty,
.page-content > .row:has(.hdclc-contact-page) > .col:empty,
.entry-content > .row:has(.hdclc-catalog) > .col:empty,
.col:has(> .hdclc-catalog) > :not(.hdclc-catalog):empty,
.col:has(> .hdclc-home) > :not(.hdclc-home):empty {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Tiny decorative squares (theme icon placeholders, empty buttons) */
.hdclc-catalog button:empty,
.hdclc-catalog a:empty:not([aria-label]),
.hdclc-catalog span:empty:not(.hdclc-cart-count):not(.hdclc-step-number),
.hdclc-catalog div:empty:not([data-warehouse-step]):not([hidden]) {
  display: none !important;
}

/* Hide Flatsome section/row chrome if leaked into content */
.hdclc-catalog .ux-shape,
.hdclc-catalog .ux-shape-wrapper,
.hdclc-catalog .section-title-container:empty,
.hdclc-catalog .is-dash,
.hdclc-home .ux-shape,
.hdclc-about .ux-shape,
.hdclc-contact-page .ux-shape {
  display: none !important;
}

/* Neutralize absolute/floating gray chips sitting above hero */
.hdclc-catalog .hdclc-catalog-hero > span:empty,
.hdclc-catalog .hdclc-catalog-hero > i:empty,
.hdclc-catalog .hdclc-catalog-hero > b:empty,
.hdclc-catalog .hdclc-catalog-hero > div:empty {
  display: none !important;
}

/* Theme list markers that render as gray boxes before headings */
.hdclc-catalog h1::before,
.hdclc-catalog h2::before,
.hdclc-catalog h3::before,
.hdclc-catalog .hdclc-catalog-eyebrow::before,
.hdclc-home h1::before,
.hdclc-home h2::before,
.hdclc-about h1::before,
.hdclc-about h2::before,
.hdclc-contact-page h1::before,
.hdclc-contact-page h2::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
  border: 0 !important;
}

/* Parent page: hide empty siblings immediately before plugin root */
.entry-content > *:empty + .hdclc-catalog,
.entry-content > *:empty + .hdclc-home,
.entry-content > *:empty + .hdclc-about,
.entry-content > *:empty + .hdclc-contact-page {
  margin-top: 0 !important;
}

.entry-content > p:empty,
.entry-content > div:empty:not([class]):not([id]),
.entry-content > span:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}
