/* Product Browser Page */
.browser-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px;
  min-height: calc(100vh - 200px);
}

/* 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;
}

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

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

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

.browser-header h1 {
  font-size: 42px;
  font-weight: 800;
  color: #0a0a0a;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

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

.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;
}

.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 {
  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-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: 24px;
  padding-bottom: 20px;
  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;
}

.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;
  transition: transform 0.2s;
}

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

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

.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;
}

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

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

.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-functions {
  padding-left: 24px;
  margin-top: 8px;
}

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

/* 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;
}

/* 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;
}

.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-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;
  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;
}

.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;
}

.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;
}

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

.product-desc {
  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-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;
  }

  .browser-filters {
    position: static;
    max-height: none;
  }

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

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

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

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

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

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

  .browser-layout {
    gap: 20px;
  }

  .browser-sidebar {
    position: static;
  }

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

  .browser-filters {
    border-radius: 8px;
  }

  .filters-header {
    padding: 16px;
  }

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

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

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

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

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

/* 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;
  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;
}

.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: 12px;
}

.function-support-header .function-name {
  flex: 1;
  font-weight: 500;
  color: #0a0a0a;
}

.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;
  padding: 8px 12px;
  background: white;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 6px;
}

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

.function-modules-list .module-item {
  font-size: 12px;
  color: #1e40af;
  text-decoration: none;
  padding: 4px 8px;
  background: #eff6ff;
  border-radius: 4px;
  font-weight: 500;
}

.function-modules-list .module-item:hover {
  background: #dbeafe;
  text-decoration: none;
}

.function-modules-list .module-item.built-in {
  color: #64748b;
  background: #f1f5f9;
}

/* 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;
}

/* No Image Placeholder */
.product-card-image.no-image {
  background: #f1f5f9;
}

.product-card-image .placeholder-icon {
  opacity: 0.6;
}

/* 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 {
  background: #dbeafe;
  color: #1e40af;
}

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

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

.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;
}

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