/* Product Browser Page */
.browser-page-wrapper {
  width: 100%;
  min-height: calc(100vh - 200px);
}

.browser-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px;
}

/* Browser Tabs */
.browser-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 32px;
  padding: 6px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  border: 1px solid #e2e8f0;
}

.browser-tab {
  padding: 12px 32px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.browser-tab:hover {
  color: #1e40af;
  background: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.browser-tab.active {
  background: white;
  color: #1e40af;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.15);
  text-decoration: none;
}

.browser-header {
  text-align: center;
  margin-bottom: 24px;
}

.browser-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: #0a0a0a;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.browser-header h1 em {
  font-style: normal;
  color: #1e40af;
  font-weight: 700;
}

.browser-header p {
  font-size: 15px;
  color: #64748b;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}

.browser-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

/* Sidebar */
.browser-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Mobile filter toggle - hidden on desktop */
.mobile-filter-toggle {
  display: none;
}

.sidebar-search {
  display: block;
  position: relative;
  overflow: hidden;
}

.sidebar-search input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #334155;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s;
}

.sidebar-search input:hover {
  border-color: #1e40af;
}

.sidebar-search input:focus {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.sidebar-search input::placeholder {
  color: #94a3b8;
}

/* Filters Box */
.browser-filters {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 2px solid #e2e8f0;
  flex-shrink: 0;
}

.filters-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0;
}

.filters-header .btn-clear-filters {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.filters-header .btn-clear-filters:hover {
  background-color: #f1f5f9;
  color: #334155;
}

.filters-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.filters-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #fafafa;
  flex-shrink: 0;
}

.filters-footer .btn-clear {
  width: 100%;
}

.filter-group {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  padding: 8px 0;
  user-select: none;
}

.filter-header:hover {
  color: #1e40af;
}

.filter-label {
  flex: 1;
}

.filter-header .selected-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #6b7280;
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  flex-shrink: 0;
}

/* Hide badge when filter group is expanded (show only on lowest visible level) */
.filter-header.expanded .selected-badge,
.filter-header.expanded .count {
  display: none;
}

.btn-clear .clear-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #6b7280;
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  margin-left: 8px;
}

.category-header .selected-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #6b7280;
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-label {
  flex: 1;
}

.filter-toggle {
  font-size: 12px;
  width: 16px;
  display: inline-block;
  transition: transform 0.2s;
}

.filter-header.expanded .filter-toggle {
  transform: rotate(90deg);
}

.filter-content {
  margin-top: 12px;
  transition: all 0.2s;
}

.filter-content.collapsed {
  display: none;
}

.filter-search {
  margin-bottom: 12px;
}

.filter-search input {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  transition: border-color 0.2s, background-color 0.2s;
}

.filter-search input:focus {
  outline: none;
  border-color: #ff6b2c;
  background: #fff;
}

.filter-search input::placeholder {
  color: #94a3b8;
}

.category-functions {
  transition: all 0.2s;
}

.category-functions.collapsed {
  display: none;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
  color: #334155;
  transition: color 0.2s;
}

.checkbox-label:hover {
  color: #1e40af;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1e40af;
}

/* Flat filter list for modules/accessories (no expandable category) */
.filter-list-flat {
  padding: 12px 16px;
}

.filter-list-flat .checkbox-label {
  padding: 6px 0;
}

.cert-filter-icon {
  height: 22px;
  width: auto;
  margin-right: 8px;
  vertical-align: middle;
}

.function-category {
  margin-bottom: 12px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 13px;
  color: #334155;
  transition: all 0.2s;
}

.category-header:hover {
  background: #e8e9f5;
  color: #2e368f;
}

.category-header .toggle {
  font-size: 10px;
  width: 14px;
  transition: transform 0.2s;
}

.category-header.expanded .toggle {
  transform: rotate(90deg);
}

/* Hide count badges when category is expanded (show on lowest visible level only) */
.category-header.expanded .count,
.category-header.expanded .selected-badge {
  display: none;
}

.category-functions {
  padding-left: 12px;
  margin-top: 8px;
}

.category-functions.collapsed {
  display: none;
}

/* Subcategory nesting */
.function-subcategory {
  margin-bottom: 8px;
}

.subcategory-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f1f5f9;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  font-size: 12px;
  color: #475569;
  transition: all 0.2s;
}

.subcategory-header:hover {
  background: #e2e8f0;
  color: #1e40af;
}

.subcategory-header .toggle {
  font-size: 8px;
  width: 12px;
  transition: transform 0.2s;
}

.subcategory-header.expanded .toggle {
  transform: rotate(90deg);
}

/* Hide count badges when subcategory is expanded (show on lowest visible level only) */
.subcategory-header.expanded .count,
.subcategory-header.expanded .selected-badge {
  display: none;
}

.subcategory-label {
  flex: 1;
}

.subcategory-header .selected-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #6b7280;
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.subcategory-functions {
  padding-left: 16px;
  margin-top: 4px;
}

.subcategory-functions.collapsed {
  display: none;
}

.function-item {
  font-size: 13px;
  padding: 6px 0;
}

/* Certification filter icons */
.cert-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cert-filter-icon {
  height: 18px;
  width: auto;
  object-fit: contain;
}

/* Function Search */
.function-search {
  margin-bottom: 12px;
}

.function-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  transition: all 0.2s;
}

.function-search input:hover {
  border-color: #cbd5e1;
}

.function-search input:focus {
  outline: none;
  border-color: #1e40af;
  background: white;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.function-search input::placeholder {
  color: #94a3b8;
}

.filter-content .no-results {
  padding: 16px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  font-style: italic;
}

.count {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

/* Hide empty count spans until client populates them */
.count:empty {
  display: none;
}

/* Depth Filter */
.depth-filter-info {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
  font-style: italic;
}

.checkbox-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1e40af;
}

.btn-clear {
  width: 100%;
  padding: 12px 20px;
  background: white;
  color: #334155;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
  text-align: center;
}

.btn-clear:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fef2f2;
}

/* Products Grid Area */
.browser-products {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  min-height: 600px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.results-count {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
}

.results-sort {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-sort label {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

.results-sort select {
  padding: 8px 32px 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.results-sort select:hover {
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.results-sort select:focus {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.products-grid > * {
  height: 100%;
}

/* Product Card */
.product-card {
  position: relative;
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

/* Product Image (SSR version) */
.product-image {
  width: 100%;
  height: 180px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Product Info (SSR version) */
.product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
  color: #0a0a0a;
  line-height: 1.3;
  margin: 0 0 8px 0;
}

.product-card .product-description {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.product-card:hover {
  border-color: #1e40af;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
  transform: translateY(-4px);
}

.product-card-image {
  width: 100%;
  height: 180px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: 48px;
  position: relative;
}


.product-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card-meta .family-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  gap: 2px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  color: #475569;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 0 8px 0 5px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  white-space: nowrap;
}

.product-card-meta .family-badge img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.product-card-meta .family-badge span {
  line-height: 1;
  letter-spacing: 0.2px;
}

.product-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.product-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #0a0a0a;
  line-height: 1.3;
  margin: 0;
}

/* Title row with series badge */
.product-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Series badge - inline with product name (legacy) */
.series-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.series-badge img {
  height: 18px;
  width: auto;
}

.series-badge span {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.3px;
  margin-left: -1px;
}

/* Series badge - in meta section (styled like other badges) */
.series-badge-meta {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  gap: 4px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  color: #475569;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 0 10px 0 6px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  white-space: nowrap;
}

.series-badge-meta img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.series-badge-meta span {
  line-height: 1;
  letter-spacing: 0.2px;
}

.product-card-price {
  font-size: 16px;
  font-weight: 700;
  color: #0a0a0a;
  white-space: nowrap;
}

.product-card-price.call-for-price {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.product-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.product-case,
.product-depth {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1;
  color: #475569;
  font-weight: 500;
  background: #f1f5f9;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

/* Certification badges overlay on product image */
.product-certs-overlay {
  position: absolute;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}

.product-certs-overlay.product-certs-left {
  left: 8px;
}

.product-certs-overlay.product-certs-right {
  right: 8px;
}

.product-certs-overlay img {
  height: 24px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.15s;
}

.product-certs-overlay.product-certs-left img {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.product-certs-overlay.product-certs-right img {
  height: 28px;
}

/* Country of origin badge - styled like case/depth badges */
.product-country-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1;
  color: #475569;
  font-weight: 500;
  background: #f1f5f9;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

/* Last changed badge - subtle timestamp display */
.product-last-changed {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1;
  color: #94a3b8;
  font-weight: 400;
  padding: 0 8px;
}

.product-card:hover .product-certs-overlay img {
  opacity: 1;
}

.product-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 12px;
}

.product-functions {
  margin: 12px 0;
}

.product-functions strong {
  font-size: 13px;
  color: #334155;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.function-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.function-list li {
  padding: 4px 0;
  font-size: 12px;
  color: #64748b;
}

.function-provider-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.function-provider-list li {
  padding: 4px 0;
  font-size: 13px;
  color: #0a0a0a;
  line-height: 1.5;
}

.function-provider-list .function-name {
  font-weight: 500;
  color: #0a0a0a;
}

.function-provider-list .function-with {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
  margin: 0 6px;
}

.function-provider-list .module-names {
  font-size: 13px;
  color: #64748b;
}

.function-provider-list .module-link {
  color: #1e40af;
  text-decoration: none;
  font-weight: 500;
}

.function-provider-list .module-link:hover {
  text-decoration: underline;
}

.function-provider-list .built-in-text {
  color: #64748b;
  font-weight: 500;
}

/* Input modules section - collapsible */
.input-modules-section {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  overflow: hidden;
}

.input-modules-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.input-modules-summary:hover {
  background: #f1f5f9;
}

.input-modules-summary .expand-icon {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.2s;
}

.input-modules-section.expanded .expand-icon {
  transform: rotate(90deg);
}

.input-modules-summary .summary-text {
  font-size: 12px;
  font-weight: 500;
  color: #475569;
}

.input-modules-detail {
  display: none;
  border-top: 1px solid #e2e8f0;
  background: white;
}

.input-modules-section.expanded .input-modules-detail {
  display: block;
}

.input-module-item {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.input-module-item:last-child {
  border-bottom: none;
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.module-header .module-link {
  font-size: 13px;
  font-weight: 600;
  color: #1e40af;
  text-decoration: none;
}

.module-header .module-link:hover {
  text-decoration: underline;
}

.module-header .module-name.built-in {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.module-header .channel-count {
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: #64748b;
  padding: 2px 6px;
  border-radius: 4px;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  padding-left: 4px;
}

.channel-row .channel-qty {
  font-weight: 600;
  color: #475569;
  min-width: 20px;
}

.channel-row .channel-name {
  color: #64748b;
}

.function-list li {
  padding: 4px 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.more-functions {
  margin-top: 8px;
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
}

.product-outputs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.output-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #f0fdf4;
  color: #10b981;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 80px 40px;
  color: #94a3b8;
}

.empty-state svg {
  margin-bottom: 24px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 15px;
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 1024px) {
  .browser-layout {
    grid-template-columns: 1fr;
  }

  .browser-sidebar {
    position: static;
  }

  /* Mobile filter toggle button */
  .mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
  }

  .mobile-filter-toggle:hover {
    border-color: #1e40af;
    color: #1e40af;
  }

  .mobile-filter-toggle svg {
    flex-shrink: 0;
  }

  .mobile-filter-toggle .filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #1e40af;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    margin-left: auto;
  }

  /* Filters panel - collapsible */
  .browser-filters {
    display: none;
    border-radius: 8px;
    margin-top: 12px;
  }

  .browser-filters.open {
    display: flex;
  }

  .filters-scroll {
    max-height: 400px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .browser-page {
    padding: 20px 16px;
  }

  /* Browser tabs - horizontal scroll on mobile */
  .browser-tabs {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    padding: 6px 16px;
    border-radius: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .browser-tabs::-webkit-scrollbar {
    display: none;
  }

  .browser-tab {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .browser-header {
    margin-bottom: 16px;
  }

  .browser-header h1 {
    font-size: 18px;
  }

  .browser-header p {
    font-size: 14px;
  }

  .browser-layout {
    gap: 16px;
  }

  .browser-sidebar {
    position: static;
  }

  .sidebar-search input {
    padding: 10px 14px;
    font-size: 16px; /* Prevents iOS zoom */
  }

  .filters-header {
    padding: 16px;
  }

  .filters-header h2 {
    font-size: 16px;
  }

  .filters-scroll {
    padding: 16px;
    max-height: 50vh;
  }

  .filters-footer {
    padding: 12px 16px;
  }

  /* Results header */
  .results-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
  }

  .results-count {
    font-size: 14px;
  }

  .results-sort {
    justify-content: space-between;
  }

  .results-sort select {
    flex: 1;
    max-width: 200px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .browser-products {
    padding: 16px;
    border-radius: 8px;
  }

  /* Compact product cards on mobile */
  .product-card-image {
    height: 140px;
  }

  .product-card-content {
    padding: 12px;
  }

  .product-card h3 {
    font-size: 14px;
  }

  .product-card-price {
    font-size: 14px;
  }

  .product-desc {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .product-card-meta {
    gap: 4px;
  }

  .product-case,
  .product-depth,
  .series-badge-meta {
    height: 24px;
    font-size: 10px;
    padding: 0 6px;
  }

  .product-certs-overlay img {
    height: 18px;
  }
}

/* Small mobile - single column */
@media (max-width: 480px) {
  .browser-page {
    padding: 16px 12px;
  }

  .browser-tabs {
    margin-left: -12px;
    margin-right: -12px;
    padding: 6px 12px;
  }

  .browser-tab {
    padding: 8px 16px;
    font-size: 13px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-card-image {
    height: 160px;
  }

  .product-card-content {
    padding: 16px;
  }

  .product-card h3 {
    font-size: 16px;
  }

  .browser-products {
    padding: 12px;
  }

  .filters-scroll {
    max-height: 60vh;
  }
}

/* Pagination */
.pagination {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 8px 14px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #334155;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #1e40af;
  color: #1e40af;
  background: #eff6ff;
}

.pagination-btn.active {
  background: #1e40af;
  border-color: #1e40af;
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: #94a3b8;
  padding: 0 4px;
}

/* Unified function support section */
.function-support-section {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.function-support-item {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.function-support-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.4;
}

.function-support-item.has-modules .function-support-header {
  cursor: pointer;
  transition: background 0.15s;
}

.function-support-item.has-modules .function-support-header:hover {
  background: #f1f5f9;
}

.function-support-header .support-check {
  color: #16a34a;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1.4;
  display: flex;
  align-items: center;
}

.function-support-header .function-name {
  flex: 1;
  font-weight: 500;
  color: #0a0a0a;
  line-height: 1.4;
  display: flex;
  align-items: center;
}

.function-support-header .built-in-badge {
  font-size: 11px;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.function-support-header .module-count {
  font-size: 11px;
  color: #64748b;
}

.function-support-header .expand-icon {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.2s;
}

.function-support-item.expanded .expand-icon {
  transform: rotate(90deg);
}

.function-modules-list {
  display: none;
  flex-direction: column;
  padding: 0;
  background: white;
  border-top: 1px solid #e2e8f0;
}

.function-support-item.expanded .function-modules-list {
  display: flex;
}

.function-modules-list .module-row {
  font-size: 13px;
  color: #334155;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.function-modules-list .module-row:last-child {
  border-bottom: none;
}

.function-modules-list .module-row:hover {
  background: #f8fafc;
}

/* Display Support Section (blue accent, expandable like function-support) */
.display-support-section {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.display-support-item {
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  overflow: hidden;
}

.display-support-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #eff6ff;
  font-size: 13px;
  line-height: 1.4;
}

.display-support-item.has-displays .display-support-header {
  cursor: pointer;
  transition: background 0.15s;
}

.display-support-item.has-displays .display-support-header:hover {
  background: #dbeafe;
}

.display-support-header .display-check {
  color: #2563eb;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.display-support-header .display-info {
  flex: 1;
  font-weight: 500;
  color: #1e40af;
}

.display-support-header .display-count {
  font-size: 11px;
  color: #3b82f6;
}

.display-support-header .expand-icon {
  font-size: 10px;
  color: #3b82f6;
  transition: transform 0.2s;
}

.display-support-item.expanded .expand-icon {
  transform: rotate(90deg);
}

.display-options-list {
  display: none;
  flex-direction: column;
  padding: 0;
  background: white;
  border-top: 1px solid #bfdbfe;
}

.display-support-item.expanded .display-options-list {
  display: flex;
}

.display-options-list .display-row {
  font-size: 13px;
  color: #334155;
  padding: 10px 12px;
  border-bottom: 1px solid #eff6ff;
}

.display-options-list .display-row:last-child {
  border-bottom: none;
}

.display-options-list .display-row:hover {
  background: #f8fafc;
}

/* Product Detail - Input Support Info (Collapsible) */
.input-support-info {
  margin: 20px 0;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  overflow: hidden;
}

.input-support-info .support-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.input-support-info .support-header:hover {
  background: #dcfce7;
}

.input-support-info .support-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #166534;
}

.input-support-info .support-check {
  color: #16a34a;
  flex-shrink: 0;
}

.input-support-info .support-expand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-support-info .module-count {
  font-size: 12px;
  color: #64748b;
}

.input-support-info .expand-chevron {
  color: #64748b;
  transition: transform 0.2s;
}

.input-support-info.expanded .expand-chevron {
  transform: rotate(180deg);
}

.input-support-info .support-modules {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
}

.input-support-info.expanded .support-modules {
  display: flex;
}

.input-support-info .support-module-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #dcfce7;
}

.input-support-info .module-name {
  font-weight: 600;
  color: #1e40af;
  text-decoration: none;
}

.input-support-info .module-name:hover {
  text-decoration: underline;
}

.input-support-info .module-name.built-in {
  color: #475569;
}

.input-support-info .channel-badge {
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: #64748b;
  padding: 2px 6px;
  border-radius: 4px;
}

.input-support-info .channel-details {
  width: 100%;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* Product Detail - Variants Info (Collapsible) */
.variants-info {
  margin: 20px 0;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  overflow: hidden;
}

.variants-info .variants-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.variants-info .variants-header:hover {
  background: #dbeafe;
}

.variants-info .variants-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1e40af;
}

.variants-info .variants-icon {
  color: #3b82f6;
  flex-shrink: 0;
}

.variants-info .variants-expand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.variants-info .expand-chevron {
  color: #64748b;
  transition: transform 0.2s;
}

.variants-info.expanded .expand-chevron {
  transform: rotate(180deg);
}

.variants-info .variants-list {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
}

.variants-info.expanded .variants-list {
  display: flex;
}

.variants-info .variant-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: 6px;
  border: 1px solid #dbeafe;
  text-decoration: none;
  transition: all 0.15s;
}

.variants-info .variant-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.variants-info .variant-name {
  font-weight: 600;
  color: #1e40af;
  min-width: 100px;
}

.variants-info .variant-description {
  flex: 1;
  font-size: 13px;
  color: #475569;
}

.variants-info .variant-price {
  font-size: 14px;
  font-weight: 600;
  color: #059669;
}

/* Skeleton Loading States */
.product-card.skeleton {
  pointer-events: none;
}

.skeleton-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin: 12px 16px;
}

.skeleton-title {
  height: 20px;
  width: 70%;
}

.skeleton-desc {
  height: 14px;
  width: 90%;
}

.skeleton-price {
  height: 16px;
  width: 50%;
}

.filter-skeleton {
  height: 120px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Accessory Cards */
.accessory-card {
  cursor: default;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.accessory-card .product-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.accessory-card-price {
  font-size: 16px;
  font-weight: 700;
  color: #0a0a0a;
  white-space: nowrap;
}

.accessory-card-price.call-for-price {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.accessory-code {
  display: inline-flex;
  align-items: center;
  height: 24px;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
  background: #e2e8f0;
  padding: 0 8px;
  border-radius: 4px;
  font-family: monospace;
}

.accessory-category {
  display: inline-flex;
  align-items: center;
  height: 24px;
  font-size: 11px;
  color: #1e40af;
  font-weight: 500;
  background: #eff6ff;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid #dbeafe;
}

.btn-add-accessory {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #1e40af;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-accessory:hover {
  background: #1e3a8a;
}

.btn-add-accessory.added {
  background: #16a34a;
}

.btn-add-accessory svg {
  flex-shrink: 0;
}

/* Quantity Selector */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.qty-selector .qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f8fafc;
  color: #475569;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-selector .qty-btn:hover {
  background: #e2e8f0;
}

.qty-selector .qty-btn:active {
  background: #cbd5e1;
}

.qty-selector .qty-input {
  width: 40px;
  height: 32px;
  border: none;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  -moz-appearance: textfield;
}

.qty-selector .qty-input::-webkit-outer-spin-button,
.qty-selector .qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-selector .qty-display {
  width: 40px;
  height: 32px;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

/* Accessory/Module Actions Layout */
.accessory-actions,
.module-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}

/* Product Card Image */
.accessory-card .product-card-image,
.module-card .product-card-image {
  width: 100%;
  height: 180px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px;
  position: relative;
}

.accessory-card .product-card-image > img,
.module-card .product-card-image > img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}


/* Accessory Card Notes */
.accessory-card-notes {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin: 4px 0 8px 0;
}

/* Actions area - prevent clicks from navigating */
.accessory-actions,
.module-actions {
  position: relative;
  z-index: 1;
}

/* In-cart mode for actions area */
.accessory-actions.in-cart-mode,
.module-actions.in-cart-mode {
  background: #eff6ff;
  border-radius: 6px;
  padding: 8px 10px;
}

.cart-qty-control {
  display: flex;
  align-items: center;
  gap: 2px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px;
}

.cart-qty-control .qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
}

.cart-qty-control .qty-btn:hover {
  background: #f1f5f9;
}

.cart-qty-input {
  width: 40px;
  height: 28px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #1e40af;
  -moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.in-cart-label {
  font-size: 13px;
  color: #3b82f6;
  font-weight: 500;
  margin-left: 4px;
}

.btn-remove-from-cart {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  margin-left: auto;
}

.btn-remove-from-cart:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Module Cards */
.module-card {
  cursor: default;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.module-card .product-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.module-card-price {
  font-size: 16px;
  font-weight: 700;
  color: #0a0a0a;
  white-space: nowrap;
}

.module-card-price.call-for-price {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.module-type-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  font-size: 10px;
  font-weight: 600;
  padding: 0 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.module-type-badge.input_module,
.module-type-badge.input-module {
  background: #dbeafe;
  color: #1e40af;
}

.module-type-badge.output_analog,
.module-type-badge.output-analog {
  background: #dcfce7;
  color: #166534;
}

.module-type-badge.output_serial,
.module-type-badge.output-serial {
  background: #fef3c7;
  color: #92400e;
}

.module-type-badge.output_relay,
.module-type-badge.output-relay {
  background: #fce7f3;
  color: #9d174d;
}

.module-description {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin: 8px 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-add-module {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #1e40af;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-module:hover {
  background: #1e3a8a;
}

.btn-add-module.added {
  background: #16a34a;
}

.btn-add-module svg {
  flex-shrink: 0;
}

/* Product Cards as Links */
a.product-card {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

a.product-card:hover {
  text-decoration: none;
}

a.product-card .product-card-content h3 {
  transition: color 0.2s;
}

a.product-card:hover .product-card-content h3 {
  color: #1e40af;
}

/* Search Filter Warning */
.search-filter-warning {
  margin-bottom: 16px;
}

.filter-warning-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 14px;
  color: #92400e;
}

.filter-warning-content svg {
  flex-shrink: 0;
  color: #d97706;
}

.filter-warning-content span {
  flex: 1;
}

.filter-warning-content.showing-all {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.filter-warning-content.showing-all svg {
  color: #16a34a;
}

.btn-show-all-results,
.btn-apply-filters {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-show-all-results {
  background: #1e40af;
  color: white;
}

.btn-show-all-results:hover {
  background: #1e3a8a;
}

.btn-apply-filters {
  background: #166534;
  color: white;
}

.btn-apply-filters:hover {
  background: #14532d;
}

@media (max-width: 640px) {
  .filter-warning-content {
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-warning-content span {
    flex: 1 1 100%;
    order: 1;
  }

  .filter-warning-content svg {
    order: 0;
  }

  .btn-show-all-results,
  .btn-apply-filters {
    order: 2;
    flex: 1;
    text-align: center;
  }
}

/* Meter Card Configure Button */
.meter-card-actions {
  margin-top: auto;
  padding-top: 16px;
  position: relative;
  z-index: 2;
}

.btn-configure-meter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-configure-meter:hover {
  background: #c7d2fe;
  border-color: #a5b4fc;
  text-decoration: none;
}

/* ===========================================
   SSR-Specific Styles
   =========================================== */

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 24px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  color: #cbd5e1;
}

.breadcrumbs a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: #1e40af;
}

.breadcrumbs li:last-child span {
  color: #334155;
  font-weight: 500;
}

/* Browser Intro Text */
.browser-intro {
  font-size: 16px;
  color: #64748b;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

.browser-intro strong {
  color: #1e40af;
  font-weight: 600;
}

/* Filter Links (SSR link-based filters) */
.filter-link {
  display: block;
  padding: 8px 12px;
  margin: 2px 0;
  color: #334155;
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.15s;
  cursor: pointer;
}

.filter-link:hover {
  background: #f1f5f9;
  color: #1e40af;
}

.filter-link.active {
  background: #e0e7ff;
  color: #1e40af;
  font-weight: 600;
}

/* Hide checkmark prefix for checkbox filters - checkbox shows state instead */
.filter-link.checkbox-filter.active::before {
  content: '';
}

.filter-link:not(.checkbox-filter).active::before {
  content: '✓ ';
}

/* Checkbox Filter Styles */
.filter-link.checkbox-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-link.checkbox-filter input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #1e40af;
  cursor: pointer;
}

.filter-link.checkbox-filter .filter-label-text {
  flex: 1;
}

.filter-link.checkbox-filter.cert-filter {
  gap: 8px;
}

.filter-link.checkbox-filter.cert-filter .cert-filter-icon {
  margin-right: 4px;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.no-results p {
  font-size: 16px;
  margin-bottom: 24px;
}

/* Error Page */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.error-content {
  max-width: 500px;
  text-align: center;
}

.error-code {
  display: block;
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.error-page h1 {
  font-size: 32px;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 16px;
}

.error-page p {
  font-size: 17px;
  color: #64748b;
  margin-bottom: 32px;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .error-code {
    font-size: 80px;
  }

  .error-page h1 {
    font-size: 24px;
  }
}

/* Product Config Summary (on detail pages) */
.product-config-summary {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 15px;
  color: #0369a1;
  line-height: 1.6;
  margin-bottom: 24px;
}

.product-config-summary strong {
  color: #0c4a6e;
}

/* Product Options (on detail pages) */
.product-options {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid #e2e8f0;
}

.product-options h2 {
  font-size: 24px;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 24px;
}

.option-group {
  margin-bottom: 32px;
}

.option-group h3 {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}

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

.option-item {
  padding: 8px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.15s;
}

.option-item.selected {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #1e40af;
}

.option-name {
  font-weight: 600;
}

.option-detail {
  color: #64748b;
  font-size: 12px;
  display: block;
  margin-top: 2px;
}

.option-more {
  padding: 8px 16px;
  color: #64748b;
  font-size: 14px;
  font-style: italic;
}

/* Product Specs Table */
.product-specs {
  margin-top: 40px;
}

.product-specs h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 16px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th,
.specs-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.specs-table th {
  font-weight: 600;
  color: #64748b;
  width: 40%;
}

.specs-table td {
  color: #334155;
}

/* Product Detail Layout */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-image-area {
  background: #fafafa;
  border-radius: 12px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  align-self: start;
}

.product-main-image {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.product-info-area {
  padding: 20px 0;
}

.product-title {
  font-size: 32px;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 12px;
  line-height: 1.2;
}

/* Product meta badges row (series, case, depth) */
.product-meta-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

/* Series badge in product detail meta row */
.product-meta-badges .series-badge-meta {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  gap: 4px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  color: #475569;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 0 10px 0 6px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  white-space: nowrap;
}

.product-meta-badges .series-badge-meta img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.product-meta-badges .series-badge-meta span {
  line-height: 1;
  letter-spacing: 0.2px;
}

/* Case and depth badges in product detail */
.product-case-badge,
.product-depth-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1;
  color: #475569;
  font-weight: 500;
  background: #f1f5f9;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.product-price-area {
  margin-bottom: 24px;
}

.product-price {
  font-size: 28px;
  font-weight: 700;
  color: #1e40af;
}

.price-note {
  display: block;
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

.product-actions {
  margin-bottom: 32px;
}

.btn-configure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
}

.product-description {
  font-size: 15px;
  color: #475569;
  line-height: 1.7;
}

/* Product Meta on cards */
.product-meta {
  display: flex;
  gap: 12px;
  margin: 8px 0;
  font-size: 12px;
  color: #64748b;
}

.product-case,
.product-depth {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-main-image {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .breadcrumbs ol {
    font-size: 13px;
  }

  .browser-header h1 {
    font-size: 17px;
  }

  .product-title {
    font-size: 24px;
  }

  .product-price {
    font-size: 24px;
  }

  .error-actions {
    flex-direction: column;
  }

  .modules-table,
  .specs-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .options-list {
    grid-template-columns: 1fr;
  }
}

/* Client-side search container (injected by JS) */
.search-container {
  margin-bottom: 16px;
}

.search-container input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #334155;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s;
}

.search-container input:hover {
  border-color: #1e40af;
}

.search-container input:focus {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-container input::placeholder {
  color: #94a3b8;
}

/* Results header with sort */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-sort label {
  font-size: 14px;
  color: #64748b;
}

.results-sort select {
  padding: 8px 32px 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.results-sort select:hover {
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.results-sort select:focus {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Module Info Badges on Product Cards */
.product-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.module-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  font-size: 11px;
  font-weight: 600;
  color: #1e40af;
  background: #eff6ff;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid #dbeafe;
  cursor: help;
}

.module-badge.builtin {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

/* =================================
   Module & Accessory Detail Pages
   ================================= */

/* Module type badges */
.module-type-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 0 12px;
  border-radius: 4px;
}

.module-type-badge.input-module {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.module-type-badge.output-analog {
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #fed7aa;
}

.module-type-badge.output-serial {
  color: #6b21a8;
  background: #f3e8ff;
  border: 1px solid #e9d5ff;
}

.module-type-badge.output-relay {
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

/* Accessory badges */
.accessory-code-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  color: #1e40af;
  background: #eff6ff;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid #dbeafe;
  font-family: monospace;
}

.accessory-category-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

/* Module/Accessory detail actions */
.module-detail-actions,
.accessory-detail-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-add-module-detail,
.btn-add-accessory-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  background: #1e40af;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-add-module-detail:hover,
.btn-add-accessory-detail:hover {
  background: #1e3a8a;
}

/* Module functions section */
.module-functions-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.module-functions-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0 0 16px 0;
}

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

.function-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.function-name {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.function-qty {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Compatible meters section */
.compatible-meters-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.compatible-meters-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0 0 16px 0;
}

.compatible-meters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.compatible-meter-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
}

.compatible-meter-card:hover {
  border-color: #1e40af;
  background: #eff6ff;
}

.compatible-meter-card .meter-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e40af;
}

.compatible-meter-card .meter-price {
  font-size: 13px;
  color: #64748b;
}

/* Related accessories section */
.related-accessories-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.related-accessories-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0 0 16px 0;
}

.related-accessories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.related-accessory-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
}

.related-accessory-card:hover {
  border-color: #1e40af;
  background: #eff6ff;
}

.related-accessory-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.related-accessory-card .accessory-name {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-align: center;
}

.related-accessory-card .accessory-price {
  font-size: 12px;
  color: #64748b;
}

/* Accessory notes */
.accessory-notes {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  font-size: 13px;
  color: #92400e;
}

/* Product card clickable link overlay */
.product-card .product-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.product-card {
  position: relative;
}

.product-card h3 a {
  position: relative;
  z-index: 2;
  color: inherit;
  text-decoration: none;
}

.product-card h3 a:hover {
  color: #1e40af;
}

.product-card .module-actions,
.product-card .accessory-actions {
  position: relative;
  z-index: 2;
}

/* =================================
   Featured Products Section (Browser)
   ================================= */

/* Featured title - hidden by default, shown only in featured mode */
.browse-featured-title {
  font-size: 20px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0 0 24px 0;
  display: none;
}

/* Featured/All toggle */
.browse-featured-toggle {
  display: none;
  gap: 16px;
  align-items: baseline;
  margin: 0 0 24px 0;
}

.browser-products[data-has-featured="true"].show-all-mode .browse-featured-toggle {
  margin: 0 0 24px 0;
  align-items: center;
}

.browse-featured-toggle .results-sort {
  margin-left: auto;
}

.browse-toggle-btn {
  padding: 0;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  border: none;
  background: none;
  color: #c0c0c0;
  cursor: pointer;
  transition: color 0.15s;
}

.browse-toggle-btn:hover {
  color: #666;
}

.browse-toggle-btn.active {
  color: #0a0a0a;
}

.browser-products[data-has-featured="true"] .browse-featured-toggle {
  display: flex;
}

/* When in featured mode, show featured title, hide non-featured products and results header */
.browser-products[data-has-featured="true"] .browse-featured-title {
  display: block;
}

.browser-products[data-has-featured="true"]:not(.show-all-mode) .product-card:not(.is-featured),
.browser-products[data-has-featured="true"]:not(.show-all-mode) .module-card:not(.is-featured),
.browser-products[data-has-featured="true"]:not(.show-all-mode) .accessory-card:not(.is-featured) {
  display: none;
}

.browser-products[data-has-featured="true"]:not(.filters-active) .results-header {
  display: none;
}

/* When filters are active, show all and hide featured title */
.browser-products.filters-active .product-card:not(.is-featured),
.browser-products.filters-active .module-card:not(.is-featured),
.browser-products.filters-active .accessory-card:not(.is-featured) {
  display: flex;
}

.browser-products.filters-active .browse-featured-title,
.browser-products.filters-active .browse-featured-toggle {
  display: none;
}

.browser-products.filters-active .results-header {
  display: flex !important;
}

/* Product Manuals & Datasheets */
.product-manuals {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.product-manuals-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.product-manuals-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0;
}

.product-manuals-count {
  font-size: 12px;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.product-manuals-chevron {
  color: #94a3b8;
  transition: transform 0.2s;
}

.product-manuals.collapsed .product-manuals-chevron {
  transform: rotate(-90deg);
}

.product-manuals.collapsed .manuals-list {
  display: none;
}

.manuals-list {
  margin-top: 12px;
}

.manuals-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.manuals-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #334155;
  transition: background 0.15s;
}

.manuals-list li a:hover {
  background: #f1f5f9;
}

.manual-icon {
  flex-shrink: 0;
  color: #94a3b8;
}

.manual-title {
  font-weight: 500;
  color: #1e40af;
  flex-shrink: 0;
}

.manual-filename {
  font-size: 12px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-tag {
  font-size: 10px;
  font-weight: 600;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 3px;
  padding: 1px 5px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .browse-featured-title {
    font-size: 18px;
  }
  .browse-toggle-btn {
    font-size: 18px;
  }
}
