/* ==========================================================================
   Riegel Fasteners — Additions v2.0
   Append this block to the END of assets/css/style.css
   Zero conflicts with existing classes.
   ========================================================================== */

/* ============================================================
   A. GLOBAL SEARCH BAR — Always visible inline bar
   ============================================================ */

/* Search wrapper — always visible, sits between nav-menu and CTA */
#search-wrapper {
  flex: 1;
  max-width: 420px;
  margin: 0 20px;
  position: relative;
  z-index: 1001;
}

/* Inner input row */
.search-input-row {
  display: flex;
  align-items: center;
  background: var(--bg-light, #f5f5f5);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-full, 50px);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input-row:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 48, 135, 0.10);
  background: var(--white);
}

/* Search icon inside bar */
.search-input-row::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  margin-left: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

#search-input {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--dark);
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  width: 100%;
}

#search-input::placeholder {
  color: var(--gray);
  font-size: 0.85rem;
}

#search-close-btn {
  display: none; /* hidden — clear happens on ESC */
}

/* Show × only when input has value */
#search-input:not(:placeholder-shown) ~ #search-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--gray);
  cursor: pointer;
  padding: 8px 12px;
  font-size: 1.2rem;
  line-height: 1;
}

/* ── Autocomplete Dropdown ── */
#search-dropdown,
#mobile-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
              0 8px 20px rgba(0, 48, 135, 0.10);
  border: 1px solid var(--gray-light);
  overflow: hidden;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  max-height: 480px;
  overflow-y: auto;
}

#search-dropdown.visible,
#mobile-search-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown header */
.search-dropdown-header {
  padding: 10px 16px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  border-bottom: 1px solid var(--gray-light);
  background: var(--bg-light);
}

/* Result row */
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-light);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  position: relative;
}

.search-result-item:last-of-type {
  border-bottom: none;
}

/* E-commerce hover shadow lift */
.search-result-item.hovered,
.search-result-item:hover {
  background: var(--primary-light);
  box-shadow: inset 4px 0 0 var(--primary),
              0 4px 16px rgba(0, 48, 135, 0.10);
  transform: translateX(2px);
  z-index: 1;
}

/* Product thumbnail */
.search-result-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-light);
  border: 1px solid var(--gray-light);
}

.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.search-result-item.hovered .search-result-thumb img {
  transform: scale(1.06);
}

/* Text block */
.search-result-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-result-name {
  font-family: var(--font-headings);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.search-result-desc {
  font-size: 0.76rem;
  color: var(--gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Category pill */
.search-result-cat {
  flex-shrink: 0;
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: capitalize;
  white-space: nowrap;
}

/* No results */
.search-no-result {
  padding: 20px 16px;
  text-align: center;
  color: var(--gray-dark);
  font-size: 0.9rem;
}

.search-no-result small {
  display: block;
  margin-top: 6px;
  font-size: 0.76rem;
  color: var(--gray);
}

/* Dropdown footer */
.search-dropdown-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--gray-light);
  background: var(--bg-light);
  text-align: center;
}

.search-dropdown-footer a {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--primary);
  transition: color var(--transition-fast);
}

.search-dropdown-footer a:hover {
  color: var(--accent);
}

/* ── Mobile search (inside overlay) ── */
.mobile-search-wrap {
  width: 90%;
  max-width: 400px;
  position: relative;
  margin-bottom: 28px;
}

.mobile-search-input-row {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  overflow: visible;
  position: relative;
}

.mobile-search-input-row:focus-within {
  border-color: var(--accent);
  background: rgba(255,255,255,0.18);
}

#mobile-search-input {
  flex: 1;
  padding: 12px 18px;
  font-size: 1rem;
  color: var(--white);
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
}

#mobile-search-input::placeholder {
  color: rgba(255,255,255,0.55);
}

.mobile-search-icon {
  padding: 0 14px;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
}

#mobile-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1060;
}

/* ============================================================
   B. PRODUCT CARD — "New" badge
   ============================================================ */

.product-card-img-wrap {
  position: relative;
}

.product-new-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(255, 98, 0, 0.35);
}

/* ============================================================
   C. HOMEPAGE — "What's New" section
   ============================================================ */

#whats-new-section {
  padding: 80px 0;
  background: var(--white);
}

.whats-new-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 50px;
  flex-wrap: wrap;
  gap: 16px;
}

.whats-new-view-all {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.whats-new-view-all:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Products row */
#whats-new-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

/* Gallery + video row */
.whats-new-media-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Gallery items */
#whats-new-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  grid-column: span 2;
}

.whats-new-gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--gray-light);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.whats-new-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.whats-new-gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.whats-new-gallery-caption {
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--gray-dark);
  font-weight: 500;
  line-height: 1.4;
}

/* Video thumbnail */
#whats-new-video {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.whats-new-video-thumb {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.whats-new-video-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.whats-new-video-thumb:hover img {
  transform: scale(1.04);
}

.whats-new-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform var(--transition-normal);
}

.whats-new-video-thumb:hover .whats-new-play-icon {
  transform: translate(-50%, -50%) scale(1.12);
}

.whats-new-video-title {
  padding: 10px 14px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
  background: var(--white);
  line-height: 1.4;
}

/* ============================================================
   D. LATEST PAGE (latest.html)
   ============================================================ */

/* Section spacing reused from .section */

/* Gallery grid */
#latest-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.latest-gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--gray-light);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.latest-gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.latest-gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.latest-gallery-item:hover img {
  transform: scale(1.05);
}

.latest-gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 48, 135, 0.85) 0%, rgba(0, 48, 135, 0) 100%);
  padding: 32px 16px 16px;
  transform: translateY(0);
}

.latest-gallery-caption {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
}

/* Videos grid */
#latest-videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.latest-video-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--dark);
  box-shadow: var(--shadow-lg);
}

.latest-video-iframe-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.latest-video-iframe-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.latest-video-title {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  background: var(--dark-light);
  line-height: 1.4;
}

/* ============================================================
   E. RESPONSIVE — search + sections
   ============================================================ */

@media (max-width: 1024px) {
  #search-wrapper.active {
    width: 380px;
    max-width: calc(100vw - 240px);
  }
  #whats-new-products {
    grid-template-columns: repeat(2, 1fr);
  }
  #latest-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Search bar — compact version stays in sticky nav on mobile */
  #search-wrapper {
    flex: 1;
    max-width: 100%;
    margin: 0 10px 0 8px;
  }
  #search-input {
    font-size: 0.82rem;
    padding: 8px 10px;
  }
  #search-input::placeholder {
    font-size: 0.78rem;
  }

  .whats-new-media-row {
    grid-template-columns: 1fr;
  }

  #whats-new-gallery {
    grid-column: span 1;
    grid-template-columns: 1fr 1fr;
  }

  #whats-new-products {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .whats-new-header {
    flex-direction: column;
    align-items: flex-start;
  }

  #latest-gallery-grid {
    grid-template-columns: 1fr;
  }

  #latest-videos-grid {
    grid-template-columns: 1fr;
  }

  .latest-gallery-item img {
    height: 200px;
  }
}

@media (max-width: 480px) {
  #whats-new-products {
    grid-template-columns: 1fr;
  }
  #whats-new-gallery {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   F. ABOUT PAGE — Mobile Responsive Fixes
   ============================================================ */

/* Section headings — remove inline font-size */
.about-section-h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  font-family: var(--font-headings);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
}

/* Leadership card — replaces inline div styles */
.about-leadership-card {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 350px;
  width: 100%;
}

.about-leadership-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: block;
}

.about-leadership-name {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 6px;
  font-family: var(--font-headings);
}

.about-leadership-role {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Leadership grid — reversed on desktop (image right, text left) */
.about-preview-grid-rev {
  grid-template-columns: 0.8fr 1.2fr;
}

/* Industries grid — remove the hardcoded 3-col inline style */
.about-industries-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .about-preview-grid-rev {
    grid-template-columns: 1fr;
  }
  .about-leadership-card {
    max-width: 100%;
    margin: 0 auto;
  }
  .about-industries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-section-h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .about-industries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-section-h2 {
    font-size: 1.5rem;
  }
  .about-preview-grid-rev {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .about-leadership-card {
    padding: 28px 20px;
    max-width: 100%;
  }
  .about-leadership-icon {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .about-industries-grid {
    grid-template-columns: 1fr;
  }
  .about-section-h2 {
    font-size: 1.35rem;
  }
}

/* ============================================================
   G. MOBILE NAV — search bar compact sizing
   ============================================================ */
@media (max-width: 480px) {
  #search-wrapper {
    margin: 0 6px 0 4px;
  }
  #search-input {
    font-size: 0.78rem;
    padding: 7px 8px;
  }
  #search-input::placeholder {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Shorten placeholder on very small screens */
  #search-input {
    min-width: 0;
  }
}

/* ==========================================================================
   Accessibility: Skip-to-content link (Enterprise addition)
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--primary);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   H. CATEGORY CARDS - Full Card Clickable (CSS Only)
   ============================================================ */

.category-card {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.category-card:hover .category-link {
  color: var(--accent-dark);
}

.category-card:hover .category-link svg {
  transform: translateX(5px);
}

.category-link svg {
  transition: transform 0.2s ease;
}

/* Prevent link click from triggering card click twice */
.category-link {
  position: relative;
  z-index: 2;
}

/* ============================================================
   I. NAVIGATION DROPDOWN — Products Menu
   ============================================================ */

/* Dropdown container */
.nav-item-dropdown {
  position: relative;
}

/* Dropdown arrow */
.dropdown-arrow {
  font-size: 0.6rem;
  margin-left: 4px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown menu - hidden by default */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 1001;
  border: 1px solid var(--gray-light);
}

/* Show dropdown on hover */
.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown items */
.dropdown-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 20px;
  font-family: var(--font-headings);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark);
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--accent);
}

/* Mobile: Hide dropdown on mobile (keep as simple link) */
@media (max-width: 768px) {
  .nav-item-dropdown {
    position: static;
  }
  
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-left: 20px;
    margin-top: 5px;
  }
  
  .dropdown-menu li a {
    color: var(--gray-light);
    padding: 8px 16px;
    font-size: 0.95rem;
    border-left-color: var(--accent);
  }
  
  .dropdown-menu li a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--accent);
  }
  
  .dropdown-arrow {
    display: none;
  }
}
/* ===== AEO/GEO ADDITION: FAQ Accordion Styles ===== */
.faq-section {
  padding: 60px 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 48, 135, 0.12);
}

.faq-question {
  cursor: pointer;
  list-style: none;
  padding: 18px 48px 18px 20px;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-dark);
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.faq-question:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.faq-item[open] .faq-question::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item[open] .faq-question {
  background-color: var(--primary-light);
}

.faq-answer {
  padding: 0 20px 20px 20px;
  color: var(--gray-dark);
  font-size: 0.96rem;
  line-height: 1.6;
  animation: faqFadeIn 0.25s ease;
}

.faq-answer p {
  margin: 0;
}

@keyframes faqFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .faq-question {
    padding: 14px 40px 14px 16px;
    font-size: 0.94rem;
  }

  .faq-answer {
    padding: 0 16px 16px 16px;
    font-size: 0.92rem;
  }
}
/* ===== END AEO/GEO ADDITION ===== */

/* ===== AEO/GEO ADDITION: Pagination Styles ===== */
.pagination-btn {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary-light) !important;
  border-color: var(--primary) !important;
}

.pagination-btn.active {
  background: var(--accent) !important;
  color: var(--white) !important;
  border-color: var(--accent) !important;
  cursor: default;
}

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

@media (max-width: 768px) {
  .pagination-btn {
    min-width: 36px;
    height: 36px;
    font-size: 0.8rem !important;
    padding: 4px 10px !important;
  }
  #pagination-controls {
    gap: 6px !important;
  }
}

@media (max-width: 480px) {
  .pagination-btn {
    min-width: 32px;
    height: 32px;
    font-size: 0.75rem !important;
    padding: 2px 8px !important;
  }
  #pagination-controls span {
    font-size: 0.75rem !important;
  }
}
/* ===== END AEO/GEO ADDITION ===== */

/* =========================================================================
   FILTER ADDITION — Standard / Grade / Size / Finish searchable combobox
   filters on category pages (Material removed 2026-08-23). Operates
   entirely on the already-loaded category JSON (see main.js
   _initCategoryFilters / _applyCategoryFilters) — no new network requests
   are introduced by these filters. Each filter is an independent
   type-to-search box, separate from the sitewide search bar.
   ========================================================================= */

.category-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 28px;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-md);
}

.category-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
  flex: 1 1 150px;
}

.category-filters .filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gray);
}

.filter-combobox {
  position: relative;
}

.filter-search-input {
  width: 100%;
  padding: 9px 32px 9px 12px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--dark);
  font-family: var(--font-headings);
  font-size: 0.875rem;
  font-weight: 500;
}

.filter-search-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-search-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.filter-input-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--gray);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}

.filter-input-clear:hover {
  background: var(--gray-light);
  color: var(--dark);
}

.filter-search-dropdown {
  display: none;
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.filter-search-dropdown.visible {
  display: block;
}

.filter-search-option {
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--dark);
  cursor: pointer;
}

.filter-search-option:hover,
.filter-search-option.highlighted {
  background: var(--gray-light);
}

.filter-search-empty {
  padding: 8px 12px;
  font-size: 0.8125rem;
  color: var(--gray);
  font-style: italic;
}

.filter-clear-btn {
  padding: 9px 16px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--dark);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  align-self: flex-end;
}

.filter-clear-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-result-count {
  margin-left: auto;
  align-self: center;
  font-size: 0.8125rem;
  color: var(--gray);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .category-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }
  .category-filters .filter-group {
    min-width: 0;
    flex: 1 1 auto;
  }
  .filter-clear-btn {
    align-self: stretch;
  }
  .filter-result-count {
    margin-left: 0;
    align-self: flex-start;
  }
}
/* ===== END FILTER ADDITION ===== */

/* =========================================================================
   RAN NUMBER ADDITION (2026-08-23) — product reference number, reusing the
   existing unique product id (no new data field). Shown as a compact
   line on the product card and as the first row in the modal's Technical
   Specifications table (see main.js _buildProductCard / _renderProductModal).
   ========================================================================= */

.product-card-ran {
  font-size: 0.75rem !important;
  color: var(--gray) !important;
  font-family: 'Courier New', monospace;
  margin-bottom: 12px !important;
  margin-top: -8px;
  flex-grow: 0 !important;
}
/* ===== END RAN NUMBER ADDITION ===== */
