/* ─── Page-specific variable ─── */
:root {
  --qw:  360px;   /* quote panel width */
  --bg:  #f4f7fa; /* page background (not defined in style.css) */
}

/* ═══════════════════════════════════════════════════════════
   PAGE SHELL
   Left: main content (hero + results)
   Right: sticky quote panel (full viewport height)
═══════════════════════════════════════════════════════════ */
.sr-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--qw);
  min-height: 100vh;
}

/* ─── Quote panel — sticky from very top ─── */
.sr-quote-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--white);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sr-panel-header {
  padding: 22px 24px 20px;
  background: var(--slate);
  border-top: 4px solid var(--steel);
  flex-shrink: 0;
}
.sr-panel-title {
  font-family: var(--f-head);
  font-size: 1.2rem; font-weight: 800;
  letter-spacing: .02em; color: var(--white);
  margin: 0 0 4px;
}
.sr-panel-sub {
  margin: 0; font-size: .75rem;
  color: rgba(255,255,255,.4); letter-spacing: .04em; line-height: 1.5;
}

.sr-panel-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

/* Quote items */
.sr-quote-items {
  display: grid; gap: 10px; margin-bottom: 20px; min-height: 48px;
}
.sr-quote-items:empty::after {
  content: 'No items added yet.';
  display: block;
  font-size: .82rem; color: var(--mid);
  padding: 16px 0; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--r);
}
.sr-quote-item {
  border: 1px solid var(--line);
  border-left: 3px solid var(--steel);
  padding: 11px 13px;
  border-radius: 0 var(--r) var(--r) 0;
}
.sr-quote-item strong {
  font-family: var(--f-head); font-size: .95rem; font-weight: 700; color: var(--slate);
  display: block; margin-bottom: 4px;
}
.sr-quote-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start;
}
.sr-quote-item-meta { font-size: .78rem; color: var(--mid); line-height: 1.5; }
.sr-quote-item-tools { margin-top: 10px; }
.sr-remove {
  border: 1px solid var(--line); background: var(--white);
  padding: 5px 8px; cursor: pointer; border-radius: 4px;
  color: var(--mid); font-size: .82rem; transition: all .18s; flex-shrink: 0;
}
.sr-remove:hover { border-color: var(--red); color: var(--red); }

.sr-qty-wrap {
  display: inline-grid;
  gap: 4px;
  min-width: 52px;
}

.sr-qty-wrap--quote {
  display: grid;
  width: 96px;
}

.sr-qty-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mid);
}

.sr-qty-input {
  width: 52px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 8px;
  font-family: var(--f-body);
  font-size: .85rem;
  color: var(--ink);
  background: var(--white);
  text-align: center;
}

.sr-qty-wrap--quote .sr-qty-input {
  width: 96px;
}

.sr-qty-input:focus {
  outline: none;
  border-color: var(--steel);
}

/* Form */
.sr-form { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.sr-field { display: grid; gap: 5px; }
.sr-field label { font-size: .75rem; font-weight: 600; color: var(--mid); letter-spacing: .04em; }
.sr-field input,
.sr-field textarea,
.sr-field select {
  width: 100%; border: 1px solid var(--line); border-radius: 4px;
  padding: 9px 11px; font-family: var(--f-body); font-size: .875rem;
  color: var(--ink); background: var(--white); outline: none; transition: border-color .2s;
}
.sr-field input:focus, .sr-field textarea:focus { border-color: var(--steel); }
.sr-field textarea { min-height: 72px; resize: vertical; }
.sr-field-help { font-size: .72rem; color: var(--mid); line-height: 1.5; margin-top: 4px; }
.sr-submit {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--red); color: var(--white); border: 2px solid var(--red);
  border-radius: var(--r); padding: 12px 20px; font-family: var(--f-body);
  font-size: .875rem; font-weight: 700; letter-spacing: .04em;
  cursor: pointer; width: 100%; transition: background .2s, border-color .2s;
}
.sr-submit:hover { background: var(--red-dark); border-color: var(--red-dark); }
.sr-form-note { font-size: .72rem; color: var(--mid); text-align: center; line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT AREA
═══════════════════════════════════════════════════════════ */
.sr-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ─── Hero (dark, inside main column, no nav) ─── */
.sr-hero {
  background: var(--slate);
  position: relative;
  overflow: hidden;
  padding: 52px 36px;
  flex-shrink: 0;
}

/* Grid texture */
.sr-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(26,111,168,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,111,168,.06) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
}
/* Radial glow top-right */
.sr-hero::after {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,111,168,.16) 0%, transparent 65%);
  pointer-events: none;
}

.sr-hero-content { position: relative; z-index: 1; }

/* Back link */
.sr-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
  margin-bottom: 20px; transition: color .2s;
}
.sr-back:hover { color: rgba(255,255,255,.75); }

/* Filter tags */
.sr-filter-tags {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
}
.sr-filter-label {
  font-size: .65rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.35); margin-right: 4px;
}
.sr-filter-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(26,111,168,.22); border: 1px solid rgba(26,111,168,.38);
  color: rgba(255,255,255,.82); font-size: .75rem; font-weight: 600;
  padding: 5px 11px; border-radius: 3px;
}
.sr-filter-tag-x { font-size: .68rem; opacity: .55; cursor: pointer; transition: opacity .15s; }
.sr-filter-tag-x:hover { opacity: 1; }

/* Result count / title */
.sr-hero-title {
  font-family: var(--f-head);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800; line-height: 1.05;
  color: var(--white); letter-spacing: -.3px; margin-bottom: 10px;
}
.sr-hero-title em { font-style: normal; color: var(--steel); }

.sr-hero-sub {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: .84rem; color: rgba(255,255,255,.58); line-height: 1.6;
}
.sr-hero-divider { width: 1px; height: 12px; background: rgba(255,255,255,.18); flex-shrink: 0; }

.sr-ask-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.2); border-radius: 4px;
  padding: 6px 13px; transition: all .2s;
}
.sr-ask-link:hover { color: var(--white); border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.06); }

/* ─── Results area ─── */
.sr-results-area {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

/* Summary bar */
.sr-summary-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 16px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: .82rem; color: var(--mid);
}
.sr-summary-count strong { color: var(--ink); }
.sr-sort-select {
  border: 1px solid var(--line); border-radius: 4px;
  padding: 6px 28px 6px 10px; font-family: var(--f-body); font-size: .78rem;
  color: var(--ink); background: var(--white); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23607080' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; outline: none; cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   PRODUCT GROUP CARD
═══════════════════════════════════════════════════════════ */
.sr-group {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--steel);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Dark category header */
.sr-group-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px 24px 16px;
  background: var(--slate);
  position: relative; overflow: hidden;
}
.sr-group-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 30px 30px; pointer-events: none;
}
.sr-group-header::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 10%; height: 100%;
  background: var(--steel); opacity: .22;
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%);
}
.sr-group-header-copy { position: relative; z-index: 1; }
.sr-group-kicker {
  font-size: .62rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--steel); margin-bottom: 3px;
}
.sr-group-title {
  font-family: var(--f-head); font-size: 1.4rem; font-weight: 800;
  color: var(--white); letter-spacing: .01em; line-height: 1.1; margin-bottom: 4px;
}
.sr-group-desc {
  font-size: .78rem; color: rgba(255,255,255,.58); line-height: 1.6; max-width: 480px;
}
.sr-group-meta {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.sr-group-count-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .65rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.38);
}

/* Strong overrides against Elementor global site settings */
body .sr-shell .sr-hero-title,
body .sr-shell .sr-hero-title em,
body .sr-shell .sr-group-title,
body .sr-shell .sr-group-desc,
body .sr-shell .sr-panel-title,
body .sr-shell .sr-panel-sub {
  text-shadow: none !important;
}

body .sr-shell .sr-hero-title {
  color: var(--white) !important;
}

body .sr-shell .sr-hero-title em {
  color: var(--steel) !important;
}

body .sr-shell .sr-group-title,
body .sr-shell .sr-panel-title {
  color: var(--white) !important;
}

body .sr-shell .sr-group-desc,
body .sr-shell .sr-panel-sub {
  color: rgba(255,255,255,.58) !important;
}

body .sr-shell .sr-back {
  color: rgba(255,255,255,.62) !important;
}

body .sr-shell .sr-back:hover {
  color: rgba(255,255,255,.86) !important;
}

body .sr-shell .sr-hero-sub {
  color: rgba(255,255,255,.58) !important;
}

body .sr-shell .sr-cat-link {
  color: var(--white) !important;
  border-color: rgba(255,255,255,.2) !important;
  background: rgba(255,255,255,.04) !important;
  box-shadow: none !important;
}

body .sr-shell .sr-cat-link:hover {
  color: var(--white) !important;
  border-color: rgba(255,255,255,.42) !important;
  background: rgba(255,255,255,.08) !important;
}

body .sr-shell .sr-add-btn,
body .sr-shell .sr-submit {
  background: var(--red) !important;
  color: var(--white) !important;
  border-color: var(--red) !important;
  box-shadow: none !important;
}

body .sr-shell .sr-add-btn:hover,
body .sr-shell .sr-submit:hover {
  background: var(--red-dark) !important;
  color: var(--white) !important;
  border-color: var(--red-dark) !important;
}

body .sr-shell .sr-remove {
  background: var(--white) !important;
  color: var(--mid) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}

body .sr-shell .sr-remove:hover {
  color: var(--red) !important;
  border-color: var(--red) !important;
  background: var(--white) !important;
}

body .sr-shell .sr-ask-link {
  color: rgba(255,255,255,.76) !important;
  border-color: rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.04) !important;
}

body .sr-shell .sr-ask-link:hover {
  color: var(--white) !important;
  border-color: rgba(255,255,255,.48) !important;
  background: rgba(255,255,255,.08) !important;
}
.sr-group-count-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(26,111,168,.45); font-size: .68rem; font-weight: 700; color: var(--white);
}
.sr-group-action { position: relative; z-index: 1; flex-shrink: 0; }
.sr-cat-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 600; letter-spacing: .04em;
  color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.18);
  border-radius: 4px; padding: 7px 14px; transition: all .2s;
}
.sr-cat-link:hover { color: var(--white); border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.07); }

/* ─── Product list (one per row, horizontal layout) ─── */
.sr-products {
  display: flex;
  flex-direction: column;
}

/* Horizontal product card */
.sr-product-card {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  grid-template-rows: 1fr;
  border-bottom: 1px solid var(--line);
  min-height: 130px;
  transition: background .18s;
}
.sr-product-card:last-child { border-bottom: none; }
.sr-product-card:hover { background: #fafcfe; }

/* Image cell */
.sr-product-img-link {
  display: block;
  overflow: hidden;
  background: var(--bg);
  border-right: 1px solid var(--line);
  position: relative;
}
.sr-product-img-link img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s var(--ease);
}
.sr-product-card:hover .sr-product-img-link img { transform: scale(1.04); }

/* Placeholder image */
.sr-ph {
  width: 100%; height: 100%; min-height: 130px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8eef4 0%, #d8e4ed 100%);
  color: #8a9aac; font-size: .62rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; gap: 6px; text-align: center;
}
.sr-ph-icon { font-size: 1.8rem; opacity: .3; }

/* Info cell */
.sr-product-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.sr-product-title-link {
  font-family: var(--f-head);
  font-size: 1.1rem; font-weight: 700;
  color: var(--slate); line-height: 1.2;
  transition: color .18s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sr-product-title-link:hover { color: var(--steel); }
.sr-product-desc {
  font-size: .8rem; color: var(--mid); line-height: 1.6;
}

/* Spec match tags */
.sr-product-match {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px;
}
.sr-match-tag {
  display: inline-flex; align-items: center;
  font-size: .62rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--steel);
  background: var(--steel-lt); border: 1px solid var(--steel-bd);
  padding: 2px 7px; border-radius: 3px;
}

/* Action cell */
.sr-product-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-left: 1px solid var(--line);
  flex-shrink: 0;
}
.sr-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--f-body); font-size: .75rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--steel); background: var(--white);
  border: 1.5px solid var(--steel-bd); border-radius: 4px;
  padding: 9px 16px; cursor: pointer; white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s;
}
.sr-add-btn:hover { background: var(--steel); color: var(--white); border-color: var(--steel); }
.sr-add-btn.is-added { background: var(--steel-lt); border-color: var(--steel-bd); color: var(--steel); }

/* Keyword-search additions shared by the header overlay and results page. */
.sr-searchbox-form {
  display: flex;
  align-items: center;
  width: min(560px, 100%);
  margin: 18px 0 16px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 7px;
  background: rgba(255, 255, 255, .08);
}
.sr-searchbox-input {
  min-width: 0;
  flex: 1 1 auto;
  height: 42px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  font: 500 .9rem/1.2 var(--f-body);
}
.sr-searchbox-input::placeholder { color: rgba(255, 255, 255, .62); }
.sr-searchbox-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 4px;
  background: var(--steel);
  color: var(--white);
  cursor: pointer;
}
.sr-searchbox-submit:hover,
.sr-searchbox-submit:focus-visible { background: #155d8d; }

.sr-crossref-area,
.sr-more-results-area {
  margin: 18px 0 0;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}
.sr-keyword-extra__heading {
  margin-bottom: 12px;
  color: var(--slate);
  font: 700 .9rem/1.2 var(--f-head);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.sr-keyword-extra__links { display: grid; gap: 8px; }
.sr-keyword-extra__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--steel);
  font: 500 .84rem/1.4 var(--f-body);
  text-decoration: none;
}
.sr-keyword-extra__link:hover,
.sr-keyword-extra__link:focus-visible { border-color: var(--steel-bd); background: var(--steel-lt); }
.sr-keyword-extra__link span { color: var(--mid); font-size: .76rem; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  :root { --qw: 320px; }
}
@media (max-width: 1060px) {
  .sr-shell { grid-template-columns: 1fr; }
  .sr-quote-panel {
    position: static;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 640px) {
  .sr-hero { padding: 36px 20px; }
  .sr-results-area { padding: 16px; }
  .sr-product-card { grid-template-columns: 120px 1fr; }
  .sr-product-action { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); justify-content: flex-start; }
  .sr-group-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .sr-searchbox-form { width: 100%; }
  .sr-crossref-area, .sr-more-results-area { padding: 16px; }
  .sr-keyword-extra__link { align-items: flex-start; flex-direction: column; gap: 4px; }
}
