/*
 Theme Name:  Formodo Child
 Theme URI:   https://formodo.com
 Description: Child theme for Blocksy with Formodo homepage and catalog templates.
 Author:      Formodo
 Template:    blocksy
 Version:     1.0.0
*/


/* ============================================================
   GENERAL STYLES
   ============================================================ */

/* Typography Tokens */
:root {
  --formodo-h1-size: clamp(28px, 4vw, 48px);
  --formodo-h1-line: 1.15;
  --formodo-lead-size: clamp(17px, 1.8vw, 20px);
  --formodo-lead-line: 1.6;
  --formodo-quote-color: rgba(0,0,0,0.62);
  --formodo-quote-accent: rgba(0,0,0,0.18);
}

/* Base Typography */
.page-title {
  font-size: var(--formodo-h1-size);
  line-height: var(--formodo-h1-line);
  letter-spacing: -0.02em;
}

.sub {
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
  line-height: 1.5;
  color: #555;
  margin-top: 0.6em;
}

/* Gutenberg/Blocksy Content Styles */
.entry-content blockquote.wp-block-quote {
  margin: 0 0 2.25rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--formodo-quote-accent);
  font-size: var(--formodo-lead-size);
  line-height: var(--formodo-lead-line);
  color: var(--formodo-quote-color);
}

.entry-content blockquote.wp-block-quote p {
  margin: 0;
}

.entry-content blockquote.wp-block-quote cite {
  display: none;
}

/* Image Captions & Credits (Site-wide) */
.entry-content figure figcaption,
.entry-content .wp-element-caption,
.entry-content .wp-caption-text,
.entry-content .wp-block-image__caption,
.entry-content .formodo-image-credit {
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.25rem;
  margin-bottom: 0;
  line-height: 1.4;
  text-align: right;
}

/* Common Card Components */
.card-image {
  aspect-ratio: 3 / 2;
  display: block;
  overflow: hidden;
  border-radius: 0px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Archive Grid Base */
.fwp-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card .thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

/* System CTA Spacing */
.system-cta {
  margin: 1rem 0;
}

.system-cta--below-text {
  margin-top: 1.25rem;
}

.system-cta--above-specs {
  margin-top: 0;
  margin-bottom: 1rem;
}


/* ============================================================
   HOMEPAGE
   ============================================================ */

/* Hero Section */
.formodo-home .hero {
  margin: 0;
  padding: 40px 0;
  margin-bottom: 40px;
}

.formodo-home .hero h1 {
  font-size: var(--formodo-h1-size);
  line-height: var(--formodo-h1-line);
}

.formodo-home .hero .sub {
  color: #555;
  margin: 8px 0 24px;
}

/* Full-width Background Sections */
.formodo-home .section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.formodo-home .section-hero {
  background: var(--theme-palette-color-2); /* white */
}

.formodo-home .section-compare {
  background: var(--theme-palette-color-4); /* ivory */
}

.formodo-home .section-finder {
  background: var(--theme-palette-color-6); /* soft grey-ish */
}

.formodo-home .section-systems {
  background: var(--theme-palette-color-3); /* white */
}

.formodo-home .section-guides {
  background: var(--theme-palette-color-5); /* white */
}

/* Main Container */
#primary.formodo-home {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Buttons */
.formodo-home .cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.formodo-home .btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 500;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.formodo-home .btn-primary {
  background: #3a3a3a;
  color: #fff;
  border-color: #BADFDB;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.formodo-home .btn-primary:hover {
  background: #2F2F2F;
  border-color: #3a3a3a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.formodo-home .btn-secondary {
  background: #f8f9fa;
  color: #2F2F2F;
  border-color: #2F2F2F;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.formodo-home .btn-secondary:hover {
  background: #fff;
  border-color: #2F2F2F;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Block Sections */
.formodo-home .block {
  margin: 0;
}

.formodo-home .block-head h2 {
  margin: 0 0 6px;
}

.formodo-home .block-head .desc,
.formodo-home .block-head .sub {
  color: #666;
  margin-bottom: 24px;
}

/* Card Grids */
.formodo-home .cards {
  display: grid;
  gap: 16px;
}

.formodo-home .cards.two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.formodo-home .cards.three {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.formodo-home .cards.four {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.formodo-home .card {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

/* Comparison Cards */
.formodo-home .card.compare {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease,
              background-color 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
              0 1px 2px rgba(0, 0, 0, 0.06);
}

.formodo-home .card.compare h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  color: #666666;
  transition: color 0.3s ease;
}

.formodo-home .card.compare:hover h3 {
  color: var(--theme-palette-color-1);
}

.formodo-home .card.compare p {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #666666;
}

.formodo-home .card.compare .link {
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: #2F2F2F;
}

.formodo-home .card.compare .link::after {
  content: " →";
}

.formodo-home .card.compare:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08),
              0 4px 8px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  background-color: #fafafa;
}

.formodo-home .card.compare:hover .link {
  color: #2F2F2F;
  transition: color 0.3s ease;
}

/* System Cards */
.formodo-home .block .card.system {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease,
              background-color 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
              0 1px 2px rgba(0, 0, 0, 0.06);
}

.formodo-home .block .card.system:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08),
              0 4px 8px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  background-color: #fafafa;
}

.formodo-home .section-systems .card.system .card-image {
  margin-bottom: 14px;
}

.formodo-home .card.system h3 a {
  color: #666666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.formodo-home .card.system h3 a:hover,
.formodo-home .block .card.system:hover h3 a {
  color: var(--theme-palette-color-1);
}

.formodo-home .card.system .card-title {
  font-size: 30px;
  line-height: 1.1;
}

.formodo-home .card.system .card-excerpt {
  font-size: 17px;
  line-height: 1.55;
}

.formodo-home .card.system .price {
  color: #2F2F2F;
  font-weight: 500;
}

.formodo-home .card.system .tag {
  background: #BADFDB;
  color: #2F2F2F;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.8rem;
}

/* Guide Cards */
.formodo-home .block .card.guide {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease,
              background-color 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
              0 1px 2px rgba(0, 0, 0, 0.06);
}

.formodo-home .block .card.guide:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08),
              0 4px 8px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  background-color: #fafafa;
}

.formodo-home .card.guide h3 a {
  color: #666666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.formodo-home .card.guide h3 a:hover,
.formodo-home .block .card.guide:hover h3 a {
  color: var(--theme-palette-color-1);
}

/* Finder Form */
.formodo-home .finder-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.formodo-home .finder-form input {
  flex: 1 1 320px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.formodo-home .finder-form button {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.formodo-home .price {
  color: #333;
}

.formodo-home .tag {
  margin-left: 8px;
  color: #2a7;
}

.formodo-home .more {
  margin-top: 10px;
}


/* ============================================================
   SINGLE POST / BLOG
   ============================================================ */

.single-post .page-title {
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.15;
  margin-bottom: 0.6em;
}

.single-post .entry-content > p:first-child {
  font-size: 1.15em;
  line-height: 1.6;
  color: #555;
  margin-top: 0;
}


/* ============================================================
   SINGLE SYSTEM PAGE
   ============================================================ */

.single-system .hero-section {
  margin-bottom: 0;
}

.single-system .hero-section .entry-header {
  margin-bottom: 0;
}

.single-system .hero-section .page-title {
  margin-bottom: 0;
}

.single-system .hero-section .meta {
  margin-top: 0.6em;
  margin-bottom: 0;
  color: #666;
  font-size: 1rem;
}

/* Content Grid Layout */
.single-system .system-content-grid,
.system-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 2.25rem;
}

.single-system .system-main {
  min-width: 0;
}

.single-system .system-main img,
.system-main img {
  max-width: 100%;
  height: auto;
  display: block;
}

.single-system .system-content {
  margin-top: 18px;
}

/* Specs Table */
.single-system .specs-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #000000;
}

.single-system .specs-table th {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid #eee;
  font-weight: 500;
}

.single-system .specs-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.single-system .specs-table tbody tr:last-child th,
.single-system .specs-table tbody tr:last-child td {
  border-bottom: none;
}

.single-system .specs-table a:not(.btn) {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.3);
}

.single-system .specs-table a:not(.btn):hover {
  text-decoration-color: currentColor;
}

/* Buttons */
.single-system .btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 500;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.single-system .btn-primary {
  background: #3a3a3a;
  color: #fff;
  border-color: #BADFDB;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.single-system .btn-primary:hover {
  background: #2F2F2F;
  border-color: #3a3a3a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .single-system .system-content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}


/* ============================================================
   SYSTEMS ARCHIVE
   ============================================================ */

.post-type-archive-system .hero-section {
  margin-bottom: 0;
}

.post-type-archive-system .hero-section .entry-header {
  margin-bottom: 0;
}

.post-type-archive-system .hero-section .page-title {
  margin-bottom: 0;
}

.post-type-archive-system .entry-content blockquote.wp-block-quote {
  margin-top: 0;
}

.post-type-archive-system .fwp-grid {
  margin-top: 0;
}

.post-type-archive-system .cards.four {
  gap: 24px;
}

.post-type-archive-system .card.system {
  padding: 22px;
  border-radius: 14px;
}

/* Archive Layout */
.formodo-systems-archive .archive-head {
  margin: 0 0 20px;
}

.formodo-systems-archive .archive-head h1 {
  margin: 0 0 8px;
}

.formodo-systems-archive .archive-head .intro {
  max-width: 68ch;
  margin: 0;
}

/* Card Grid */
.cards.four {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (min-width: 700px) {
  .cards.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cards.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* System Cards */
.card.system {
  background: #fff;
  border: 1px solid rgba(47, 47, 47, 0.08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 1px 0 rgba(47, 47, 47, 0.03);
}

.card.system .card-title {
  font-size: 26px;
  line-height: 1.15;
  margin: 12px 0 8px;
}

.card.system .card-title a {
  color: #666666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.card.system .card-title a:hover,
.card.system:hover .card-title a {
  color: var(--theme-palette-color-1);
}

.card.system .card-excerpt {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  color: #666666;
}

.card.system:hover {
  border-color: rgba(47, 47, 47, 0.14);
  box-shadow: 0 6px 20px rgba(47, 47, 47, 0.06);
}

/* Card Images */
.card-image {
  display: block;
  overflow: hidden;
  border-radius: 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border-radius: 0;
}


/* ============================================================
   FOOTER
   ============================================================ */

#footer.ct-footer,
#footer.ct-footer [data-row],
#footer.ct-footer .ct-container {
  background-color: #2F2F2F !important;
}

#footer.ct-footer {
  color: #FAFBFC !important;
}

#footer.ct-footer,
#footer.ct-footer * {
  color: inherit;
}

#footer.ct-footer h1,
#footer.ct-footer h2,
#footer.ct-footer h3,
#footer.ct-footer h4,
#footer.ct-footer h5,
#footer.ct-footer h6,
#footer.ct-footer .wp-block-heading,
#footer.ct-footer .widget-title,
#footer.ct-footer .ct-widget-title {
  color: #FAFBFC !important;
}

#footer.ct-footer p,
#footer.ct-footer li,
#footer.ct-footer small,
#footer.ct-footer .ct-footer-copyright {
  color: rgba(250, 251, 252, 0.85) !important;
}

#footer.ct-footer a {
  color: #FAFBFC !important;
  text-decoration: none;
  transition: text-decoration-color 0.2s ease;
}

#footer.ct-footer a:hover {
  color: #FAFBFC !important;
  text-decoration: underline;
  text-decoration-color: rgba(250, 251, 252, 0.6);
  text-underline-offset: 3px;
}

#footer.ct-footer .ct-socials-block a,
#footer.ct-footer .ct-socials-block a * {
  color: #FAFBFC !important;
}

#footer.ct-footer .ct-socials-block svg,
#footer.ct-footer .ct-socials-block svg * {
  fill: currentColor !important;
  stroke: currentColor !important;
}

.ct-footer h5.wp-block-heading {
  font-weight: 500;
  letter-spacing: 0.02em;
}


/* ============================================================
   PATTERN BLOCKS
   ============================================================ */

/* Dealbreakers */
.dealbreakers-grid {
  gap: 1.5rem;
}

.dealbreakers-grid .wp-block-column {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: #fff;
}

.dealbreakers-grid strong {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

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

.dealbreaker-list li {
  position: relative;
  padding-left: 1.6rem;
  margin: 0.55rem 0;
  line-height: 1.35;
}

.dealbreaker-list li::before {
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.03);
}

.dealbreaker-list--buy li::before {
  content: "✓";
}

.dealbreaker-list--avoid li::before {
  content: "✕";
}

@media (max-width: 781px) {
  .dealbreakers-grid .wp-block-column {
    padding: 0.9rem 1rem;
  }
}

/* Decision Paths (Next Steps) */
.formodo-decision-paths {
  margin-top: 2.5rem;
}

.formodo-decision-intro {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
  color: rgba(47, 47, 47, 0.75);
  max-width: 60ch;
}

.formodo-decision-cards {
  gap: 1rem;
}

.formodo-decision-card {
  border: 1px solid rgba(47, 47, 47, 0.18);
  border-radius: 14px;
  padding: 1.25rem;
  height: 100%;
  background: #ffffff;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
}

.formodo-decision-card h3 {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.formodo-decision-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(47, 47, 47, 0.55);
  margin: 0 0 0.5rem;
}

.formodo-decision-card.is-primary {
  border-color: rgba(47, 47, 47, 0.4);
  background: var(--theme-palette-color-2);
  color: #2F2F2F;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.formodo-decision-card.is-secondary {
  border-color: rgba(47, 47, 47, 0.35);
  background: var(--theme-palette-color-5);
  color: #2F2F2F;
}

.formodo-decision-card.is-tertiary {
  border-color: rgba(47, 47, 47, 0.35);
  background: var(--theme-palette-color-3);
  color: #2F2F2F;
}

.formodo-decision-card:is(.is-primary, .is-secondary, .is-tertiary) h3,
.formodo-decision-card:is(.is-primary, .is-secondary, .is-tertiary) p,
.formodo-decision-card:is(.is-primary, .is-secondary, .is-tertiary) .formodo-decision-kicker {
  color: #2F2F2F;
}

.formodo-decision-card:is(.is-primary, .is-secondary, .is-tertiary) a:not(.wp-block-button__link) {
  color: #2F2F2F;
  text-decoration-color: rgba(47, 47, 47, 0.4);
}

.formodo-decision-card:is(.is-primary, .is-secondary, .is-tertiary) a:not(.wp-block-button__link):hover {
  text-decoration-color: #2F2F2F;
}

.formodo-decision-card:is(.is-primary, .is-secondary, .is-tertiary):hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  border-color: rgba(47, 47, 47, 0.55);
}

.formodo-decision-card .wp-block-buttons {
  margin-top: 1rem;
}

.formodo-decision-card .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  border: 1px solid transparent;
  font-weight: 500;
  text-decoration: none;
  background: #3a3a3a;
  color: #fff;
  border-color: #BADFDB;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.formodo-decision-card .wp-block-button__link:hover {
  background: #2F2F2F;
  border-color: #3a3a3a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.formodo-decision-card .wp-block-button.is-style-outline .wp-block-button__link,
.formodo-decision-cards .wp-block-button.is-style-outline .wp-block-button__link {
  padding: 10px 16px !important;
  color: #2F2F2F !important;
  border-color: #2F2F2F !important;
  border-width: 1px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.formodo-decision-card .wp-block-button.is-style-outline .wp-block-button__link:hover,
.formodo-decision-cards .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: #4a4a4a !important;
  border-color: #4a4a4a !important;
  color: #f5f5f5 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.formodo-decision-disclosure {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(47, 47, 47, 0.6);
}

@media (max-width: 781px) {
  .formodo-decision-card {
    padding: 1rem;
  }
}

.formodo-contact-email {
  margin: 0;
}

/* ============================================================
   FILTER BAR (FACETWP)
   ============================================================ */

.systems-layout {
  margin-top: 2rem;
}

/* Filter Bar Container */
.systems-filters-bar {
  background: #fff;
  border: 1px solid var(--border-color, #E1E8ED);
  border-radius: 18px;
  padding: 18px 18px;
  margin: 24px 0 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: 0 1px 0 rgba(47, 47, 47, 0.03);
}

@media (max-width: 767px) {
  .systems-filters-bar {
    padding: 16px;
    gap: 16px;
  }
}

/* Filters Row */
.filters-row {
  flex: 1 1 760px;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px 18px;
  width: 100%;
}

@media (max-width: 900px) {
  .filters-row {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 520px) {
  .filters-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .filters-row {
    width: 100%;
  }
}

/* Filter Actions */
.filters-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: flex-end;
  margin-left: auto;
}

@media (max-width: 900px) {
  .filters-actions {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 767px) {
  .filters-actions {
    width: 100%;
    justify-content: space-between;
    flex-direction: row;
  }
}

/* Facet Groups */
.systems-filters-bar .facet-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  min-width: 0;
}

.systems-filters-bar .facet-group:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(47, 47, 47, 0.08);
}

@media (max-width: 767px) {
  .systems-filters-bar .facet-group:not(:last-child)::after {
    display: none;
  }
}

/* Filter Labels */
.filter-group-label {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}

.systems-filters-bar .filter-group-label {
  font-size: 11px;
  font-weight: 600;
  color: #2F2F2F;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px 0;
  display: block;
  line-height: 1.4;
  opacity: 0.85;
}

.systems-filters-bar .facetwp-facet-label {
  font-size: 11px;
  font-weight: 600;
  color: #2F2F2F;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px 0;
  display: block;
  line-height: 1.4;
  opacity: 0.85;
}

.systems-filters-bar .facet-group:has(.facetwp-facet-label) .filter-group-label {
  display: none;
}

/* Facet Wrappers */
.systems-filters-bar .facetwp-facet {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
  position: relative;
  margin: 0;
}

@media (max-width: 767px) {
  .systems-filters-bar .facetwp-facet {
    width: 100%;
  }
}

.systems-filters-bar .facetwp-facet:not(:last-child) {
  margin-right: 0;
}

/* Facet Content */
.systems-filters-bar .facetwp-facet-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.systems-filters-bar .facetwp-facet-content > * {
  margin: 0;
}

.systems-filters-bar .facet-group .facetwp-facet-content {
  margin-top: 0;
}

.systems-filters-bar .facetwp-facet .facetwp-facet-content ul,
.systems-filters-bar .facetwp-facet .facetwp-facet-content ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.systems-filters-bar .facetwp-facet .facetwp-facet-content li {
  margin: 0;
  padding: 0;
}

@media (max-width: 767px) {
  .systems-filters-bar .facetwp-facet-content {
    width: 100%;
  }
}

/* Checkbox/Link Filters */
.systems-filters-bar .facetwp-facet .facetwp-checkbox,
.systems-filters-bar .facetwp-facet .facetwp-link,
.systems-filters-bar .facetwp-facet .facetwp-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color, #E1E8ED);
  border-radius: 999px;
  padding: 8px 10px;
  margin: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.1;
  cursor: pointer;
  user-select: none;
  background: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.systems-filters-bar .facetwp-facet .facetwp-checkbox:hover,
.systems-filters-bar .facetwp-facet .facetwp-link:hover,
.systems-filters-bar .facetwp-facet .facetwp-radio:hover {
  border-color: rgba(47, 47, 47, 0.35);
}

.systems-filters-bar .facetwp-facet .facetwp-checkbox.checked,
.systems-filters-bar .facetwp-facet .facetwp-link.checked,
.systems-filters-bar .facetwp-facet .facetwp-radio.checked,
.systems-filters-bar .facetwp-checkbox.facetwp-selected,
.systems-filters-bar .facetwp-link.facetwp-selected {
  border-color: #2F2F2F;
  box-shadow: inset 0 0 0 1px #2F2F2F;
  color: #2F2F2F;
  font-weight: 500;
}

.systems-filters-bar .facetwp-checkbox input[type="checkbox"],
.systems-filters-bar .facetwp-link input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

/* Radio Buttons */
.systems-filters-bar .facetwp-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  color: #666;
  background: rgba(47, 47, 47, 0.03);
  border: 1px solid rgba(47, 47, 47, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.systems-filters-bar .facetwp-radio:hover {
  color: #2F2F2F;
  border-color: rgba(47, 47, 47, 0.15);
}

.systems-filters-bar .facetwp-radio.checked,
.systems-filters-bar .facetwp-radio.facetwp-selected {
  border-color: #2F2F2F;
  box-shadow: inset 0 0 0 1px #2F2F2F;
  color: #2F2F2F;
  font-weight: 500;
}

.systems-filters-bar .facetwp-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

/* Dropdown Filters */
.systems-filters-bar .facetwp-dropdown {
  padding: 8px 14px;
  font-size: 14px;
  border: 1px solid rgba(47, 47, 47, 0.1);
  border-radius: 6px;
  background: rgba(47, 47, 47, 0.03);
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.systems-filters-bar .facetwp-dropdown:hover {
  background: rgba(47, 47, 47, 0.06);
  border-color: rgba(47, 47, 47, 0.15);
}

.systems-filters-bar .facetwp-dropdown:focus {
  outline: none;
  border-color: rgba(47, 47, 47, 0.25);
  background: rgba(47, 47, 47, 0.06);
}

@media (max-width: 767px) {
  .systems-filters-bar .facetwp-dropdown {
    width: 100%;
  }
}

/* Sort Dropdown */
.filters-actions .facetwp-sort select,
.filters-actions .facetwp-sort-select {
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-color, #E1E8ED);
  padding: 0 12px;
  background: #fff;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
}

.filters-actions .facetwp-sort select:hover,
.filters-actions .facetwp-sort-select:hover {
  background: rgba(47, 47, 47, 0.06);
  border-color: rgba(47, 47, 47, 0.15);
}

.filters-actions .facetwp-sort select:focus,
.filters-actions .facetwp-sort-select:focus {
  outline: none;
  border-color: rgba(47, 47, 47, 0.25);
  background: rgba(47, 47, 47, 0.06);
}

@media (max-width: 767px) {
  .filters-actions .facetwp-sort {
    flex: 1;
  }

  .filters-actions .facetwp-sort select {
    width: 100%;
  }
}

/* Reset Button */
.filters-actions .facetwp-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-color, #E1E8ED);
  padding: 0 14px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.filters-actions .facetwp-reset:hover {
  color: #2F2F2F;
  background: rgba(47, 47, 47, 0.03);
  border-color: rgba(47, 47, 47, 0.15);
}

@media (max-width: 767px) {
  .filters-actions .facetwp-reset {
    flex-shrink: 0;
  }
}

/* Count Badges */
.systems-filters-bar .facetwp-counter {
  margin-left: 6px;
  font-size: 12px;
  color: #999;
  font-weight: 400;
  opacity: 0.6;
}

.systems-filters-bar .facetwp-checkbox.checked .facetwp-counter,
.systems-filters-bar .facetwp-link.checked .facetwp-counter,
.systems-filters-bar .facetwp-radio.checked .facetwp-counter {
  color: #666;
  opacity: 0.8;
}

/* Slider/Range Filters */
.systems-filters-bar .facetwp-slider {
  min-width: 200px;
  padding: 8px 0;
}

.systems-filters-bar .facetwp-slider input[type="range"] {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(47, 47, 47, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.systems-filters-bar .facetwp-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2F2F2F;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.systems-filters-bar .facetwp-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2F2F2F;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.systems-filters-bar .facetwp-slider-values {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: #999;
}

/* Search Input */
.systems-filters-bar .facetwp-search {
  padding: 8px 14px;
  font-size: 14px;
  border: 1px solid rgba(47, 47, 47, 0.1);
  border-radius: 6px;
  background: rgba(47, 47, 47, 0.03);
  color: #2F2F2F;
  min-width: 160px;
}

.systems-filters-bar .facetwp-search:focus {
  outline: none;
  border-color: rgba(47, 47, 47, 0.25);
  background: rgba(47, 47, 47, 0.06);
}

.systems-filters-bar .facetwp-search::placeholder {
  color: #999;
}

/* Toggle Links */
.systems-filters-bar .facetwp-toggle {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #999;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.systems-filters-bar .facetwp-toggle:hover {
  color: #666;
}

/* Loading State */
.systems-filters-bar .facetwp-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Results & Pager */
.systems-results {
  width: 100%;
}

.systems-results .facetwp-pager {
  margin-top: 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.systems-results .facetwp-pager a,
.systems-results .facetwp-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  color: #666;
  background: #fff;
  border: 1px solid rgba(47, 47, 47, 0.1);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.systems-results .facetwp-pager a:hover {
  color: #2F2F2F;
  border-color: rgba(47, 47, 47, 0.15);
  background: rgba(47, 47, 47, 0.03);
}

.systems-results .facetwp-pager .facetwp-page.active {
  color: #2F2F2F;
  font-weight: 600;
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}
