/* FARN Virtual 3D AR Catalog — matches 3D viewer palette (light canvas, terracotta, Assistant/Heebo, RTL). */


/* Fonts: Assistant+Heebo (viewer typography) */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@400;500;600;700;800&family=Heebo:wght@400;500;600;700;800&display=swap');
.farn-catalog-wrap,
.farn-catalog-wrap *,
.farn-product-wrap,
.farn-product-wrap * {
  font-family: 'Assistant', 'Heebo', system-ui, -apple-system, sans-serif !important;
}
.farn-catalog-wrap,
.farn-product-wrap { direction: rtl; }

/* Tokens — moved to assets/css/farn-tokens.css (single source of truth)
 * The --fc-* variables are now aliased to --farn-* tokens there.
 * Fallback values below ensure catalog still renders if tokens.css fails to load. */
:root {
  --fc-primary:       var(--farn-ink, #14130F);
  --fc-accent:        var(--farn-brand, #C7522A);
  --fc-accent-hover:  var(--farn-brand-hover, #A83F1D);
  --fc-accent-soft:   var(--farn-brand-soft, #FBEFE8);
  --fc-surface:       var(--farn-surface, #FFFFFF);
  --fc-surface-2:     var(--farn-surface-2, #F3F2EE);
  --fc-canvas:        var(--farn-canvas, #F7F6F2);
  --fc-border:        var(--farn-border, #E7E5DE);
  --fc-border-strong: var(--farn-border-strong, #D8D5CC);
  --fc-text:          var(--farn-ink, #14130F);
  --fc-muted:         var(--farn-muted, #5C584F);
  --fc-subtle:        var(--farn-subtle, #8A867C);
  --fc-price:         var(--farn-ink, #14130F);
  --fc-sale:          var(--farn-brand, #C7522A);
  --fc-badge-bg:      var(--farn-brand-soft, #FBEFE8);
  --fc-badge-text:    var(--farn-brand-hover, #A83F1D);
  --fc-ar-btn:        var(--farn-brand, #C7522A);
  --fc-ar-btn-hover:  var(--farn-brand-hover, #A83F1D);
  --fc-whatsapp:      #25d366;
  --fc-call:          #0ea5e9;
  --fc-shadow:        var(--farn-shadow-sm, 0 1px 2px rgba(20,19,15,.04), 0 2px 6px rgba(20,19,15,.04));
  --fc-shadow-hover:  var(--farn-shadow-lg, 0 4px 8px rgba(20,19,15,.06), 0 24px 56px rgba(20,19,15,.12));
  --fc-radius:        var(--farn-radius-md, 14px);
  --fc-radius-sm:     var(--farn-radius-sm, 10px);
  --fc-transition:    var(--farn-transition, .22s cubic-bezier(.22,.61,.36,1));
}

/* ── Layout ──────────────────────────────────────── */
.farn-catalog-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--fc-text);
}

.farn-catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
  padding: 32px 0 64px;
}

@media (max-width: 900px) {
  /* When the sidebar is hidden (mobile — see drawer rules below), collapse
     the layout to a single column so the catalog-main grid uses the full
     viewport width. Without this reset, the main lands in the now-empty
     260px column slot and cards get squashed into a narrow strip. */
  .farn-catalog-layout {
    grid-template-columns: 1fr;
  }
  .farn-sidebar {
    order: -1;
  }
}

/* ── Page Header ─────────────────────────────────── */
.farn-page-header {
  padding: 40px 0 0;
  border-bottom: 1px solid var(--fc-border);
  margin-bottom: 0;
}
.farn-page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--fc-primary);
}
.farn-page-header .farn-breadcrumb {
  font-size: .875rem;
  color: var(--fc-muted);
  margin-bottom: 20px;
}
.farn-page-header .farn-breadcrumb a {
  color: var(--fc-accent);
  text-decoration: none;
}
.farn-page-header .farn-breadcrumb a:hover {
  text-decoration: underline;
}

/* ── Sidebar / Filters ─────────────────────────────────────────────
 * Inverted color scheme: brand accent fills the panel; foreground
 * (text, icons, dividers, controls) is white/translucent-white.
 *
 * Colors are derived from --fc-accent (brand red) so a future tone
 * tweak in the design tokens cascades here without edits.
 * ─────────────────────────────────────────────────────────────── */
.farn-sidebar {
  position: sticky;
  top: 100px;
}
.farn-filter-panel {
  background: var(--fc-accent, #C7522A);
  color: #fff;
  border: 0;
  border-radius: var(--fc-radius);
  padding: 22px;
  box-shadow: 0 10px 30px -8px rgba(168, 63, 29, .35), 0 2px 6px rgba(168, 63, 29, .18);
  position: relative;
}
.farn-filter-panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.farn-filter-panel h3 svg {
  color: #fff;
  flex-shrink: 0;
}

/* Active-filter count pill in panel header — inverts to white-on-red */
.farn-filter-panel__count {
  margin-inline-start: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  background: #fff;
  color: var(--fc-accent, #C7522A);
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
  display: none;
}
.farn-filter-panel__count.is-visible { display: inline-block; }

.farn-filter-group {
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  padding-bottom: 10px;
}
.farn-filter-group:last-of-type { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }

/* Collapsible group label (acts as toggle).
 * Default state: COLLAPSED. The expand chevron points down when collapsed,
 * up when open, matching browser <details> conventions. */
.farn-filter-group > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.005em;
  cursor: pointer;
  user-select: none;
  padding: 10px 0;
  transition: color var(--fc-transition), opacity var(--fc-transition);
}
.farn-filter-group > label:hover {
  opacity: .92;
}
.farn-filter-group > label::after {
  content: '';
  width: 9px;
  height: 9px;
  border-inline-end: 2px solid rgba(255, 255, 255, .82);
  border-block-end: 2px solid rgba(255, 255, 255, .82);
  /* Default: chevron pointing down (collapsed state) */
  transform: rotate(45deg);
  transition: transform .22s cubic-bezier(.22,.61,.36,1);
  flex-shrink: 0;
  margin-block-start: -3px;
}
/* Expanded: chevron points up */
.farn-filter-group:not(.is-collapsed) > label::after {
  transform: rotate(-135deg);
  margin-block-start: 3px;
}
.farn-filter-group.is-collapsed .farn-filter-list,
.farn-filter-group.is-collapsed .farn-filter-search {
  display: none;
}

/* Optional in-filter search box (long category lists) */
.farn-filter-search {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  transition: border-color var(--fc-transition), background var(--fc-transition), box-shadow var(--fc-transition);
}
.farn-filter-search::placeholder { color: rgba(255, 255, 255, .65); }
.farn-filter-search:focus {
  outline: none;
  background: rgba(255, 255, 255, .18);
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}

.farn-filter-list {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .35) transparent;
}
.farn-filter-list::-webkit-scrollbar { width: 6px; }
.farn-filter-list::-webkit-scrollbar-track { background: transparent; }
.farn-filter-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .28);
  border-radius: 3px;
}
.farn-filter-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .45);
}

.farn-filter-list li { margin: 0; }
/* Wave 3a (store_links): routeable store chips render as real <a> — they
   must be visually and interactively IDENTICAL to the button chips. The
   theme styles bare links (color/underline), so the anchor variant gets an
   explicit reset here; everything else is shared with the button rules. */
.farn-filter-list li a[data-filter-type] {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
}
.farn-filter-list li a[data-filter-type]:visited { color: rgba(255, 255, 255, .85); }
.farn-filter-list li a[data-filter-type]:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.farn-filter-list li button,
.farn-filter-list li a[data-filter-type] {
  background: transparent;
  border: 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
  width: 100%;
  text-align: start;
  font-family: inherit;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  transition: background var(--fc-transition), color var(--fc-transition), padding var(--fc-transition);
}
.farn-filter-list li button:hover,
.farn-filter-list li a[data-filter-type]:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
.farn-filter-list li button.active,
.farn-filter-list li a[data-filter-type].active {
  background: #fff;
  color: var(--fc-accent, #C7522A);
  font-weight: 700;
  padding-inline-start: 16px;
}
.farn-filter-list li button.active::before,
.farn-filter-list li a[data-filter-type].active::before {
  content: '';
  position: absolute;
  inset-inline-start: 6px;
  top: 50%;
  width: 3px;
  height: 16px;
  background: var(--fc-accent, #C7522A);
  border-radius: 2px;
  transform: translateY(-50%);
}

/* Count badge inside filter buttons */
.farn-filter-list li button .farn-filter-count,
.farn-filter-list li a[data-filter-type] .farn-filter-count {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .14);
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
  transition: background var(--fc-transition), color var(--fc-transition);
}
.farn-filter-list li button.active .farn-filter-count,
.farn-filter-list li a[data-filter-type].active .farn-filter-count {
  color: #fff;
  background: var(--fc-accent, #C7522A);
}

/* Clear filters — outlined white-on-red, fills white on hover */
.farn-filter-clear {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .55);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  width: 100%;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--fc-transition), color var(--fc-transition), border-color var(--fc-transition);
}
.farn-filter-clear::before {
  content: '';
  width: 13px;
  height: 13px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: background-image var(--fc-transition);
}
.farn-filter-clear:hover {
  background: #fff;
  border-color: #fff;
  color: var(--fc-accent, #C7522A);
}
.farn-filter-clear:hover::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C7522A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>");
}

/* Checkbox-style filters */
.farn-filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--fc-text);
  cursor: pointer;
}
.farn-filter-check input[type="checkbox"] {
  accent-color: var(--fc-accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
/* Price range inputs */
.farn-filter-range {
  display: flex;
  gap: 8px;
  align-items: center;
}
.farn-filter-range input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--fc-border-strong);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  direction: rtl;
  background: var(--fc-surface);
  color: var(--fc-text);
  transition: border-color var(--fc-transition);
}
.farn-filter-range input:focus {
  outline: none;
  border-color: var(--fc-text);
}
.farn-filter-range-sep {
  color: var(--fc-subtle);
  font-size: 14px;
}
.farn-filter-clear {
  margin-top: 18px;
  background: transparent;
  border: 1px solid var(--fc-border);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fc-muted);
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: background var(--fc-transition), border-color var(--fc-transition), color var(--fc-transition);
}
.farn-filter-clear:hover {
  background: var(--fc-surface-2);
  border-color: var(--fc-border-strong);
  color: var(--fc-text);
}
/* Mobile filter UX is handled by the FAB + drawer pattern below.
   The sidebar simply collapses on small screens; the .farn-filter-panel
   is moved into the drawer by JS when the viewport is narrow. */
@media (max-width: 900px) {
  .farn-sidebar { display: none; }
}

/* ── Toolbar ─────────────────────────────────────── */
.farn-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.farn-toolbar-left { flex: 1; }
.farn-search-input {
  width: 100%;
  max-width: 340px;
  padding: 10px 16px;
  border: 1px solid var(--fc-border-strong);
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  direction: rtl;
  background: var(--fc-surface);
  color: var(--fc-text);
  outline: none;
  transition: border-color var(--fc-transition);
}
.farn-search-input::placeholder { color: var(--fc-subtle); }
.farn-search-input:focus { border-color: var(--fc-text); }
.farn-result-count {
  font-size: 13px;
  color: var(--fc-muted);
  white-space: nowrap;
}

/* ── Active Filters Tags ─────────────────────────── */
.farn-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.farn-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--fc-accent-soft);
  color: var(--fc-accent);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
}
.farn-filter-tag button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  opacity: .7;
  transition: opacity var(--fc-transition);
}
.farn-filter-tag button:hover { opacity: 1; }

/* ── Grid ────────────────────────────────────────── */
.farn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ── Product Card ────────────────────────────────── */
.farn-card {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  box-shadow: var(--fc-shadow);
  transition: box-shadow var(--fc-transition), transform var(--fc-transition);
  display: flex;
  flex-direction: column;
  position: relative;
  /* <a> reset — card is an anchor element */
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.farn-card:hover {
  box-shadow: var(--fc-shadow-hover);
  transform: translateY(-3px);
}

/* ── Card Image Gallery ──────────────────────────── */
.farn-card-gallery {
  position: relative;
  background: var(--fc-surface-2);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
}
.farn-card-gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.farn-card-gallery img.active { opacity: 1; }
.farn-card-gallery img.farn-img-placeholder {
  object-fit: cover;
  padding: 0;
  opacity: .3;
}

/* Angle tabs */
.farn-angle-tabs {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.farn-angle-tab {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(4px);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  color: var(--fc-muted);
  transition: background var(--fc-transition), border-color var(--fc-transition), color var(--fc-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.farn-angle-tab.active,
.farn-angle-tab:hover {
  background: var(--fc-accent);
  border-color: var(--fc-accent);
  color: #fff;
}

/* 3D Badge */
.farn-3d-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: var(--fc-accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 4px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: var(--fc-shadow);
}

/* Store Badge */
.farn-store-badge {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
  border: 1px solid var(--fc-border);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 500;
  color: var(--fc-muted);
  padding: 3px 10px;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sale Badge */
.farn-sale-badge {
  position: absolute;
  top: 44px;
  inset-inline-start: 12px;
  background: var(--fc-sale);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ── Card Body ───────────────────────────────────── */
.farn-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.farn-card-brand {
  font-size: .75rem;
  font-weight: 600;
  color: var(--fc-accent);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.farn-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fc-text);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.farn-card-title a {
  color: inherit;
  text-decoration: none;
}
.farn-card-title a:hover { color: var(--fc-accent); }
.farn-card-dims {
  font-size: .78rem;
  color: var(--fc-muted);
}
.farn-card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.farn-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fc-price);
}
.farn-price-original {
  font-size: .875rem;
  color: var(--fc-muted);
  text-decoration: line-through;
}
.farn-price-sale {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fc-sale);
}

/* Texture swatches */
.farn-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.farn-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--fc-border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--fc-transition), transform var(--fc-transition);
  flex-shrink: 0;
}
.farn-swatch:hover,
.farn-swatch.active { border-color: var(--fc-accent); transform: scale(1.1); }
.farn-swatch img { width: 100%; height: 100%; object-fit: cover; }
.farn-swatch-label {
  font-size: .75rem;
  color: var(--fc-muted);
  align-self: center;
}

/* ── Card Actions ────────────────────────────────── */
.farn-card-actions {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.farn-btn-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: var(--fc-accent);
  color: #fff;
  border: none;
  border-radius: var(--fc-radius-sm);
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--fc-transition), transform var(--fc-transition);
  text-decoration: none;
}
.farn-btn-3d:hover { opacity: .9; transform: translateY(-1px); color: #fff; }
.farn-btn-3d svg { flex-shrink: 0; }

.farn-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.farn-contact-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border);
  background: var(--fc-surface);
  font-size: .72rem;
  font-weight: 600;
  color: var(--fc-text);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--fc-transition);
}
.farn-contact-btn svg { width: 18px; height: 18px; }
.farn-contact-btn:hover { background: var(--fc-surface-2); border-color: var(--fc-accent); color: var(--fc-accent); }
.farn-contact-btn.whatsapp:hover { border-color: var(--fc-whatsapp); color: var(--fc-whatsapp); }
.farn-contact-btn.call:hover { border-color: var(--fc-call); color: var(--fc-call); }

/* ── Viewer Modal ────────────────────────────────── */
/* Legacy .farn-modal-* rules removed — the live modal is .farn-ar3d-modal,
   styled directly in farn-catalog.js ensureModalStyles(). */

/* ── Pagination ──────────────────────────────────── */
.farn-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.farn-pagination button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--fc-border);
  background: var(--fc-surface);
  font-size: .875rem;
  font-weight: 600;
  color: var(--fc-text);
  cursor: pointer;
  transition: all var(--fc-transition);
}
.farn-pagination button:hover { border-color: var(--fc-accent); color: var(--fc-accent); }
.farn-pagination button.active { background: var(--fc-accent); border-color: var(--fc-accent); color: #fff; }
.farn-pagination button:disabled { opacity: .4; cursor: default; }
.farn-pagination-prev, .farn-pagination-next { width: auto; padding: 0 14px; }

/* ── Loading Skeleton ────────────────────────────── */
.farn-skeleton {
  background: linear-gradient(90deg, var(--fc-surface-2) 25%, var(--fc-border) 50%, var(--fc-surface-2) 75%);
  background-size: 400% 100%;
  animation: farnSkeleton 1.4s ease infinite;
  border-radius: var(--fc-radius);
}
@keyframes farnSkeleton {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}
.farn-skeleton-card {
  height: 400px;
}

/* ── No Results ──────────────────────────────────── */
.farn-empty {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: var(--fc-muted);
}
.farn-empty svg {
  width: 64px;
  height: 64px;
  opacity: .3;
  margin-bottom: 16px;
}
.farn-empty p { font-size: 1.1rem; margin: 0; }

/* ══════════════════════════════════════════════════
   PRODUCT PAGE
   ══════════════════════════════════════════════════ */

.farn-product-wrap {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.farn-product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding-top: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .farn-product-layout {
    grid-template-columns: 1fr;
  }
}

/* Left col: viewer + gallery */
.farn-product-media {}
.farn-product-viewer {
  border-radius: var(--fc-radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--fc-canvas);
  border: 1px solid var(--fc-border);
  position: relative;
}
.farn-product-viewer iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: var(--fc-canvas);
}
.farn-product-viewer-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fc-canvas);
  color: var(--fc-muted);
  font-size: .9rem;
  transition: opacity .3s;
  pointer-events: none;
}
.farn-product-viewer-loader.hidden { opacity: 0; }

/* Thumbnail strip */
.farn-product-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.farn-product-thumb {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  border: 2px solid var(--fc-border);
  overflow: hidden;
  cursor: pointer;
  background: var(--fc-surface-2);
  transition: border-color var(--fc-transition);
  flex-shrink: 0;
}
.farn-product-thumb:hover,
.farn-product-thumb.active { border-color: var(--fc-accent); }
.farn-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* Right col: details */
.farn-product-details {}
.farn-product-brand {
  font-size: .8rem;
  font-weight: 700;
  color: var(--fc-accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.farn-product-title {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
}
.farn-product-price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}
.farn-product-price-block .farn-price { font-size: 1.5rem; }
.farn-product-dims-block {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.farn-dim-pill {
  background: var(--fc-surface-2);
  border: 1px solid var(--fc-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--fc-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.farn-dim-pill span { color: var(--fc-text); }

.farn-product-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.farn-cat-tag {
  background: var(--fc-surface-2);
  border: 1px solid var(--fc-border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--fc-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--fc-transition);
}
.farn-cat-tag:hover {
  background: var(--fc-accent-soft);
  border-color: var(--fc-accent);
  color: var(--fc-accent);
}

/* Category index — shown on the main category page when no slug is selected.
 * Renders all available categories as a chip grid. */
.farn-category-index {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--fc-border);
}
.farn-category-index__loading,
.farn-category-index__empty {
  font-size: 14px;
  color: var(--fc-muted);
  margin: 0;
}
.farn-category-index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.farn-category-index__list li { margin: 0; }
.farn-category-index__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--fc-surface);
  border: 1.5px solid var(--fc-border);
  color: var(--fc-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--fc-transition);
}
.farn-category-index__chip:hover {
  background: var(--fc-accent);
  border-color: var(--fc-accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(199,82,42,.18);
}
.farn-category-index__count {
  font-size: 11px;
  font-weight: 700;
  background: var(--fc-surface-2);
  color: var(--fc-subtle);
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
  transition: all var(--fc-transition);
}
.farn-category-index__chip:hover .farn-category-index__count {
  background: rgba(255,255,255,.22);
  color: #fff;
}

/* Texture variations */
.farn-variation-block {
  margin-bottom: 20px;
}
.farn-variation-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fc-muted);
  margin-bottom: 10px;
}
.farn-variation-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.farn-variation-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--fc-border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--fc-transition), transform var(--fc-transition);
  position: relative;
}
.farn-variation-swatch:hover,
.farn-variation-swatch.active {
  border-color: var(--fc-accent);
  transform: scale(1.1);
}
.farn-variation-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.farn-variation-name {
  font-size: .75rem;
  margin-top: 6px;
  color: var(--fc-muted);
  text-align: center;
}

/* Description */
.farn-product-desc {
  font-size: .9rem;
  color: var(--fc-muted);
  line-height: 1.7;
  margin-bottom: 24px;
  max-height: 120px;
  overflow: hidden;
  position: relative;
  transition: max-height .3s ease;
}
.farn-product-desc.expanded { max-height: 1000px; }
.farn-desc-toggle {
  background: none;
  border: none;
  color: var(--fc-accent);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
}

/* CTA Buttons */
.farn-product-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.farn-cta-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--fc-accent);
  color: #fff;
  border: none;
  border-radius: var(--fc-radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--fc-transition), transform var(--fc-transition);
}
.farn-cta-primary:hover { opacity: .9; transform: translateY(-1px); color: #fff; }

.farn-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.farn-cta-secondary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
  border-radius: var(--fc-radius-sm);
  border: 1.5px solid var(--fc-border);
  background: var(--fc-surface);
  font-size: .78rem;
  font-weight: 700;
  color: var(--fc-text);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--fc-transition);
}
.farn-cta-secondary svg { width: 20px; height: 20px; }
.farn-cta-secondary:hover { border-color: var(--fc-accent); color: var(--fc-accent); background: var(--fc-accent-soft); }
.farn-cta-secondary.whatsapp:hover { border-color: var(--fc-whatsapp); color: var(--fc-whatsapp); background: rgba(37,211,102,.08); }
.farn-cta-secondary.call:hover { border-color: var(--fc-call); color: var(--fc-call); background: rgba(14,165,233,.08); }

/* Store attribution */
.farn-store-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--fc-surface-2);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-sm);
  margin-bottom: 20px;
}
.farn-store-info .farn-store-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.farn-store-info .farn-store-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--fc-text);
}
.farn-store-info .farn-store-sub {
  font-size: .75rem;
  color: var(--fc-muted);
}
.farn-store-info a {
  margin-inline-start: auto;
  font-size: .8rem;
  color: var(--fc-accent);
  font-weight: 600;
  text-decoration: none;
}
.farn-store-info a:hover { text-decoration: underline; }

/* ── Contact Form ────────────────────────────────── */
.farn-contact-form-block {
  background: var(--fc-surface-2);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 24px;
  margin-top: 32px;
}
.farn-contact-form-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 20px;
}
.farn-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 500px) {
  .farn-form-row { grid-template-columns: 1fr; }
}
.farn-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.farn-form-field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--fc-muted);
}
.farn-form-field input,
.farn-form-field textarea {
  padding: 10px 14px;
  border: 1px solid var(--fc-border);
  border-radius: 8px;
  font-size: .9rem;
  outline: none;
  background: var(--fc-surface);
  transition: border-color var(--fc-transition);
  font-family: inherit;
}
.farn-form-field input:focus,
.farn-form-field textarea:focus { border-color: var(--fc-accent); }
.farn-form-field textarea { min-height: 90px; resize: vertical; }
.farn-form-submit {
  width: 100%;
  padding: 13px;
  background: var(--fc-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--fc-transition);
}
.farn-form-submit:hover { background: var(--fc-accent-hover); }
.farn-form-submit:disabled { opacity: .6; cursor: default; }
.farn-form-success {
  text-align: center;
  padding: 20px;
  color: var(--fc-badge-text);
  font-weight: 600;
  background: var(--fc-badge-bg);
  border-radius: 10px;
  display: none;
}

/* ── Related Products ────────────────────────────── */
.farn-related-section {
  max-width: 1300px;
  margin: 0 auto 64px;
  padding: 0 24px;
}
.farn-related-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--fc-border);
}
.farn-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ── Category Header ─────────────────────────────── */
.farn-category-header {
  padding: 32px 0 0;
}
.farn-category-header h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.farn-category-desc {
  color: var(--fc-muted);
  font-size: .9rem;
  margin-bottom: 16px;
}

/* ── Responsive Tweaks ───────────────────────────── */
@media (max-width: 600px) {
  .farn-catalog-wrap,
  .farn-product-wrap { padding: 0 16px; }
  .farn-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .farn-card-body { padding: 12px; }
  .farn-card-actions { padding: 0 12px 12px; }
  .farn-modal-box { max-width: 100%; aspect-ratio: 9/16; max-height: 90vh; }
}
@media (max-width: 420px) {
  .farn-grid { grid-template-columns: 1fr; }
}

/* ── Product page (ported from page-farn-product.php inline styles) ── */

/* Thumbs */
.farn-thumb-label { font-size: 10px; text-align: center; color: var(--fc-subtle); margin-top: 3px; }

/* Store inline row above product title */
.farn-store-inline { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.farn-store-inline-logo {
  width: 40px; height: 40px; border-radius: 8px; object-fit: contain;
  border: 1px solid var(--fc-border); padding: 3px; background: var(--fc-surface); flex-shrink: 0;
}
.farn-store-inline-name { font-size: 13px; color: var(--fc-muted); font-weight: 500; }

/* Variation group heading */
.farn-variation-group-name {
  font-size: 12px; font-weight: 500; color: var(--fc-subtle);
  text-transform: uppercase; letter-spacing: .14em; margin-bottom: 10px;
}

/* Contact panel */
.farn-contact-panel {
  background: var(--fc-surface); border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius); padding: 20px; margin-top: 20px; box-shadow: var(--fc-shadow);
}
.farn-contact-panel h3 {
  font-size: 16px; font-weight: 600; margin: 0 0 14px;
  color: var(--fc-text); letter-spacing: -0.005em;
}
.farn-branch-selector { margin-bottom: 14px; }
.farn-branch-selector label {
  display: block; font-size: 13px; color: var(--fc-muted); font-weight: 500; margin-bottom: 6px;
}
.farn-branch-selector select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--fc-border-strong); border-radius: 10px;
  font-size: 14px; font-family: inherit; direction: rtl;
  background: var(--fc-surface); color: var(--fc-text);
  transition: border-color var(--fc-transition);
}
.farn-branch-selector select:focus { outline: none; border-color: var(--fc-text); }
.farn-contact-options { display: flex; flex-direction: column; gap: 9px; }

/* Contact links — product page */
.farn-product-wrap .farn-contact-link {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border-radius: 999px; font-size: 15px; font-weight: 500; text-decoration: none;
  cursor: pointer; border: 1px solid var(--fc-border); width: 100%;
  font-family: inherit; box-sizing: border-box;
  background: var(--fc-surface); color: var(--fc-text);
  transition: background var(--fc-transition), border-color var(--fc-transition), transform var(--fc-transition);
}
.farn-product-wrap .farn-contact-link:hover { background: var(--fc-surface-2); border-color: var(--fc-border-strong); }
.farn-product-wrap .farn-contact-link:active { transform: scale(.99); }
/* Nav/form-toggle pill — product page override */
.farn-product-wrap .farn-contact-btn.farn-contact-nav,
.farn-product-wrap .farn-contact-btn.farn-contact-form-toggle {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start;
  gap: 12px; padding: 13px 16px; border-radius: 999px; font-size: 15px; font-weight: 500;
  border: 1px solid var(--fc-border); width: 100%; box-sizing: border-box;
  background: var(--fc-surface); color: var(--fc-text); cursor: pointer;
  font-family: inherit;
  transition: background var(--fc-transition), border-color var(--fc-transition);
}
.farn-product-wrap .farn-contact-btn.farn-contact-nav:hover,
.farn-product-wrap .farn-contact-btn.farn-contact-form-toggle:hover {
  background: var(--fc-surface-2); border-color: var(--fc-border-strong); color: var(--fc-text);
}
/* Channel icon tints */
.farn-product-wrap .farn-contact-call    svg { color: var(--fc-call); }
.farn-product-wrap .farn-contact-whatsapp svg { color: var(--fc-whatsapp); }
.farn-product-wrap .farn-contact-email   svg { color: var(--fc-accent); }
.farn-product-wrap .farn-contact-nav     svg { color: #8A6A2A; }

/* Nav modal */
.farn-nav-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(20,19,15,.48);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 9999; align-items: center; justify-content: center;
}
.farn-nav-modal-overlay.open { display: flex; }
.farn-nav-modal {
  background: var(--fc-surface); border-radius: 20px; padding: 28px 24px;
  max-width: 360px; width: 92%; text-align: center; box-shadow: var(--fc-shadow-hover);
}
.farn-nav-modal h3 {
  font-size: 18px; font-weight: 600; margin: 0 0 6px;
  color: var(--fc-text); letter-spacing: -0.01em;
}
.farn-nav-modal p { font-size: 14px; color: var(--fc-muted); margin: 0 0 18px; }
.farn-nav-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.farn-nav-btn {
  display: flex; align-items: center; gap: 8px; padding: 12px 20px;
  border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none;
  cursor: pointer; border: 1px solid var(--fc-border); font-family: inherit;
  color: var(--fc-text); background: var(--fc-surface);
  transition: background var(--fc-transition), border-color var(--fc-transition);
}
.farn-nav-btn:hover { background: var(--fc-surface-2); border-color: var(--fc-border-strong); }
.farn-nav-close {
  display: block; margin: 16px auto 0; background: transparent;
  border: 1px solid var(--fc-border); border-radius: 999px;
  padding: 8px 20px; font-size: 14px; cursor: pointer; font-family: inherit;
  color: var(--fc-muted);
  transition: background var(--fc-transition), color var(--fc-transition);
}
.farn-nav-close:hover { background: var(--fc-surface-2); color: var(--fc-text); }

/* Inline lead form */
.farn-inline-form { margin-top: 14px; display: none; }
.farn-inline-form.open { display: block; }
.farn-form-group { margin-bottom: 12px; }
.farn-form-group label {
  display: block; font-size: 13px; color: var(--fc-muted); margin-bottom: 6px; font-weight: 500;
}
.farn-form-group input,
.farn-form-group textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--fc-border-strong); border-radius: 10px;
  font-size: 14px; direction: rtl; font-family: inherit; box-sizing: border-box;
  color: var(--fc-text); background: var(--fc-surface);
  transition: border-color var(--fc-transition);
}
.farn-form-group input:focus,
.farn-form-group textarea:focus { outline: none; border-color: var(--fc-text); }
.farn-form-group textarea { min-height: 80px; resize: vertical; }

/* AR / BG CTA block */
.farn-ar-cta-block {
  margin: 24px 0; padding: 20px; background: var(--fc-surface);
  border: 1px solid var(--fc-border); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow);
}
.farn-ar-cta-intro {
  font-size: 14px; color: var(--fc-muted); text-align: center; margin: 0 0 14px; font-weight: 500;
}
.farn-ar-cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.farn-ar-btn {
  flex: 1; min-width: 140px; display: flex; align-items: center; justify-content: center;
  gap: 9px; padding: 14px 16px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  transition: background var(--fc-transition), transform var(--fc-transition), box-shadow var(--fc-transition);
}
.farn-ar-btn-ar  { background: var(--fc-accent); color: #fff; box-shadow: var(--fc-shadow); }
.farn-ar-btn-ar:hover  { background: var(--fc-accent-hover); transform: translateY(-1px); box-shadow: var(--fc-shadow-hover); }
.farn-ar-btn-ar:active { transform: scale(.98); }
.farn-ar-btn-bg  { background: var(--fc-text); color: #fff; box-shadow: var(--fc-shadow); }
.farn-ar-btn-bg:hover  { background: #000; transform: translateY(-1px); box-shadow: var(--fc-shadow-hover); }
.farn-ar-btn-bg:active { transform: scale(.98); }

/* Share panel */
.farn-share-block { margin-top: 16px; }
.farn-share-toggle {
  display: flex; align-items: center; gap: 8px; background: var(--fc-surface);
  border: 1px solid var(--fc-border); border-radius: 999px;
  padding: 12px 20px; font-size: 14px; font-weight: 500;
  cursor: pointer; color: var(--fc-text); width: 100%; justify-content: center;
  font-family: inherit;
  transition: background var(--fc-transition), border-color var(--fc-transition);
}
.farn-share-toggle:hover { background: var(--fc-surface-2); border-color: var(--fc-border-strong); }
.farn-share-panel {
  display: none; margin-top: 12px; padding: 16px;
  background: var(--fc-surface); border-radius: var(--fc-radius); border: 1px solid var(--fc-border);
}
.farn-share-panel.open { display: block; }
.farn-share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 400px) { .farn-share-grid { grid-template-columns: repeat(3, 1fr); } }
.farn-share-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; background: var(--fc-surface);
  border: 1px solid var(--fc-border); border-radius: 14px;
  text-decoration: none; color: var(--fc-text); font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  transition: background var(--fc-transition), border-color var(--fc-transition), transform var(--fc-transition);
}
.farn-share-btn:hover {
  border-color: var(--fc-border-strong); background: var(--fc-surface-2); transform: translateY(-1px);
}
.farn-share-btn svg,
.farn-share-btn img { width: 28px; height: 28px; }

/* Related-products heading */
.farn-related-section h2 {
  font-size: 22px; font-weight: 600; color: var(--fc-text);
  margin: 0 0 20px; letter-spacing: -0.01em;
}
/* ──────────────────────────────────────────────────────────────────
 *  v2 polish layer (added 2026-05) — visible UI/UX upgrades on top
 *  of the existing catalog styles. All rules below are additive and
 *  override earlier ones via cascade order. To roll back the visual
 *  upgrade only, delete from this comment to end-of-file.
 * ─────────────────────────────────────────────────────────────── */

/* Page background — warmer, on-brand canvas (was inheriting theme bg) */
body.page-template-page-farn-catalog,
body.farn-catalog-page,
.farn-catalog-wrap {
  background: var(--farn-canvas, #F7F6F2);
}

/* Page header — tighter rhythm, eyebrow above title */
.farn-page-header {
  padding-top: 56px;
  padding-bottom: 28px;
  border-bottom: 0;
  margin-bottom: 24px;
}
.farn-page-header h1 {
  font-family: var(--farn-font-display, 'Heebo', 'Assistant', sans-serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0;
}
.farn-page-header .farn-breadcrumb {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fc-subtle);
  font-weight: 600;
  margin-bottom: 14px;
}
.farn-page-header .farn-breadcrumb a { color: var(--fc-muted); }
.farn-page-header .farn-breadcrumb a:hover { color: var(--fc-accent); }

/* Legacy filter-panel rules removed in r10 — superseded by the r9 redesign
 * at the top of this file (line ~102). Removing duplicates fixes the
 * "double filter icon" bug: the old block had a `::before` pseudo-element
 * adding an icon, and the new template inlines an explicit <svg>, causing
 * both to render simultaneously. */

/* Active filter chips — compact, removable feel */
.farn-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}
.farn-active-filters:empty { margin: 0; }

/* Toolbar — search pill that feels intentional */
.farn-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 20px;
  flex-wrap: wrap;
}
.farn-search-input {
  width: 100%;
  max-width: 380px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--fc-border-strong);
  border-radius: 999px;
  background: var(--fc-surface);
  font-family: inherit;
  font-size: 15px;
  color: var(--fc-text);
  transition: border-color var(--fc-transition), box-shadow var(--fc-transition);
}
.farn-search-input::placeholder { color: var(--fc-subtle); }
.farn-search-input:focus {
  outline: none;
  border-color: var(--fc-accent);
  box-shadow: 0 0 0 3px rgba(199, 82, 42, .18);
}
.farn-result-count {
  font-size: 13px;
  color: var(--fc-muted);
  font-weight: 500;
}

/* Grid spacing — more air between cards */
.farn-grid {
  gap: 28px 24px;
}

/* Product cards — meaningful hover, refined typography, image lift */
.farn-card {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  transition: transform var(--fc-transition),
              box-shadow var(--fc-transition),
              border-color var(--fc-transition);
}
.farn-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--fc-shadow-hover);
  border-color: var(--fc-border-strong);
}
.farn-card-gallery {
  background: var(--fc-canvas);
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
}
.farn-card-gallery img {
  transition: transform .5s cubic-bezier(.22, .61, .36, 1), opacity .3s ease;
}
.farn-card:hover .farn-card-gallery img.active {
  transform: scale(1.04);
}
.farn-card-body {
  padding: 18px 18px 20px;
}
.farn-card-brand {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--fc-subtle);
  margin-bottom: 6px;
}
.farn-card-title {
  font-family: var(--farn-font-display, 'Heebo', 'Assistant', sans-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--fc-text);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.farn-card-dims {
  font-size: 12px;
  color: var(--fc-muted);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.farn-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

/* Primary card CTA (3D / AR button) — the brand action */
.farn-card-actions .farn-btn-3d,
.farn-card-actions [data-action="view-3d"],
.farn-card-actions a:first-child:not(.farn-btn-secondary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  background: var(--fc-accent);
  color: var(--fc-surface);
  border: 1px solid var(--fc-accent);
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--fc-transition), transform var(--fc-transition);
}
.farn-card-actions .farn-btn-3d:hover,
.farn-card-actions [data-action="view-3d"]:hover,
.farn-card-actions a:first-child:not(.farn-btn-secondary):hover {
  background: var(--fc-accent-hover);
  border-color: var(--fc-accent-hover);
  color: var(--fc-surface);
  transform: translateY(-1px);
}

/* Skeleton cards — branded shimmer, correct aspect ratio */
.farn-skeleton-card {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  height: auto;
  aspect-ratio: 4 / 5;
  position: relative;
}
.farn-skeleton-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
              var(--fc-surface-2) 0%,
              #ECEAE3 50%,
              var(--fc-surface-2) 100%);
  background-size: 200% 100%;
  animation: farnCatalogShimmer 1.5s cubic-bezier(.22, .61, .36, 1) infinite;
}
@keyframes farnCatalogShimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Pagination — pill buttons that feel responsive */
.farn-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
}
.farn-pagination a,
.farn-pagination button,
.farn-pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--fc-muted);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--fc-transition);
}
.farn-pagination a:hover,
.farn-pagination button:hover {
  border-color: var(--fc-accent);
  color: var(--fc-accent);
}
.farn-pagination .current,
.farn-pagination .active,
.farn-pagination [aria-current="page"] {
  background: var(--fc-accent);
  border-color: var(--fc-accent);
  color: var(--fc-surface);
}

/* Empty state — when search returns nothing */
.farn-grid:empty::after {
  content: '';
}
.farn-no-results,
.farn-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  background: var(--fc-surface);
  border: 1px dashed var(--fc-border-strong);
  border-radius: var(--fc-radius);
  color: var(--fc-muted);
}
.farn-no-results h3,
.farn-empty-state h3 {
  font-family: var(--farn-font-display, 'Heebo', 'Assistant', sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--fc-text);
  margin: 0 0 8px;
}

/* Filter panel: sticky top offset that doesn't fight WP admin bar */
@media (min-width: 901px) {
  body.admin-bar .farn-sidebar { top: 132px; }
  .farn-sidebar { top: 100px; }
}

/* Mobile refinements */
@media (max-width: 768px) {
  .farn-page-header { padding-top: 32px; padding-bottom: 20px; }
  .farn-page-header h1 { font-size: 28px; }
  .farn-toolbar { padding: 12px 0 16px; }
  .farn-search-input { max-width: 100%; }
  .farn-grid { gap: 20px 16px; }
  .farn-card-body { padding: 14px 14px 16px; }
  .farn-card-title { font-size: 15px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .farn-card,
  .farn-card-gallery img,
  .farn-skeleton-card::before { transition: none !important; animation: none !important; }
  .farn-card:hover { transform: none; }
  .farn-card:hover .farn-card-gallery img.active { transform: none; }
}

/* ──────────────────────────────────────────────────────────────────
 *  v3 Batch A — product contact redesign + filter sidebar polish
 *  Added 2026-05.
 * ─────────────────────────────────────────────────────────────── */

/* ── Filter sidebar — branded card, clearer hierarchy ────────────── */
.farn-sidebar {
  position: sticky;
  top: 100px;
}
/* Legacy filter-panel rules removed in r10 — see comment above.
 * The duplicate `> h3::before` icon was the second source of the
 * "double filter icon" bug. The active styles for filter-panel,
 * filter-group, filter-list, and filter-clear live at the top of
 * this file (line ~102). */


/* Active filter tags (chips with remove ×) */
.farn-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 12px;
  background: var(--fc-accent-soft);
  color: var(--fc-accent-hover);
  border: 1px solid #F0D7CB;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
[dir="rtl"] .farn-filter-tag {
  padding: 4px 12px 4px 6px;
}
.farn-filter-tag button {
  background: rgba(199, 82, 42, .12);
  border: 0;
  color: var(--fc-accent-hover);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  transition: background var(--fc-transition);
}
.farn-filter-tag button:hover {
  background: var(--fc-accent);
  color: #fff;
}

@media (max-width: 900px) {
  .farn-sidebar { position: static; }
  .farn-filter-panel { padding: 16px 14px; }
  .farn-filter-panel::before { width: 3px; height: 40px; }
}

/* ──────────────────────────────────────────────────────────────────
 *  Product page contact panel — eye-catching CTA + actions + form
 * ─────────────────────────────────────────────────────────────── */

.farn-contact-panel {
  margin-top: 28px;
  padding: 24px;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  position: relative;
  overflow: hidden;
}
/* Subtle warm wash to draw the eye to this section */
.farn-contact-panel::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 90px;
  background: linear-gradient(180deg, var(--fc-accent-soft) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.farn-contact-panel > * { position: relative; z-index: 1; }

/* Hero: icon + headline + sub */
.farn-contact-hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.farn-contact-hero__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--fc-accent) 0%, var(--fc-accent-hover) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(199, 82, 42, .28);
}
.farn-contact-hero__text { flex: 1; min-width: 0; }
.farn-contact-hero__text h3 {
  font-family: var(--farn-font-display, 'Heebo', 'Assistant', sans-serif);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--fc-text);
  margin: 0 0 4px;
}
.farn-contact-hero__text p {
  font-size: 14px;
  color: var(--fc-muted);
  margin: 0;
  line-height: 1.5;
}

/* Branch selector — restyled */
.farn-contact-panel .farn-branch-selector {
  margin: 0 0 16px;
}
.farn-contact-panel .farn-branch-selector label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fc-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.farn-contact-panel .farn-branch-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--fc-border-strong);
  border-radius: 10px;
  background: var(--fc-surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--fc-text);
}

/* Direct-action grid: WhatsApp / phone / email / navigation */
.farn-contact-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.farn-contact-options:empty { display: none; }
.farn-contact-options .farn-contact-link,
.farn-contact-options .farn-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--fc-surface);
  color: var(--fc-text);
  border: 1.5px solid var(--fc-border);
  border-radius: 12px;
  text-decoration: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  transition: transform var(--fc-transition), box-shadow var(--fc-transition), border-color var(--fc-transition), background var(--fc-transition);
  position: relative;
  overflow: hidden;
}
.farn-contact-options .farn-contact-link:hover,
.farn-contact-options .farn-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--fc-shadow-hover);
}
.farn-contact-options .farn-contact-link svg,
.farn-contact-options .farn-contact-btn svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 8px;
  border-radius: 10px;
  box-sizing: content-box;
  background: var(--fc-surface-2);
  color: var(--fc-text);
  transition: background var(--fc-transition), color var(--fc-transition);
}
/* Per-channel styling */
.farn-contact-options .farn-contact-whatsapp {
  border-color: #BFEFD0;
  background: #F1FBF5;
}
.farn-contact-options .farn-contact-whatsapp svg {
  background: #25D366;
  color: #fff;
}
.farn-contact-options .farn-contact-whatsapp:hover {
  border-color: #25D366;
  background: #E6F8EE;
}
.farn-contact-options .farn-contact-call {
  border-color: #BFE0F5;
  background: #F0F8FE;
}
.farn-contact-options .farn-contact-call svg {
  background: #0EA5E9;
  color: #fff;
}
.farn-contact-options .farn-contact-call:hover {
  border-color: #0EA5E9;
  background: #E2F2FC;
}
.farn-contact-options .farn-contact-email svg {
  background: var(--fc-muted);
  color: #fff;
}
.farn-contact-options .farn-contact-email:hover {
  border-color: var(--fc-text);
}
.farn-contact-options .farn-contact-nav {
  border-color: #F0D7CB;
  background: #FCF6F2;
  text-align: start;
}
.farn-contact-options .farn-contact-nav svg {
  background: var(--fc-accent);
  color: #fff;
}
.farn-contact-options .farn-contact-nav:hover {
  border-color: var(--fc-accent);
  background: var(--fc-accent-soft);
}
.farn-contact-options .farn-contact-nav span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.farn-contact-options .farn-contact-nav span > span:first-child {
  font-size: 14px;
  font-weight: 700;
  color: var(--fc-text);
}
.farn-contact-options .farn-contact-nav span > span:last-child {
  font-size: 12px;
  font-weight: 400;
  color: var(--fc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inline form (name + phone only) */
.farn-inline-form {
  margin-top: 18px;
}
.farn-inline-form__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: var(--fc-subtle);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.farn-inline-form__divider::before,
.farn-inline-form__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--fc-border);
}
.farn-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.farn-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fc-text);
  margin-bottom: 6px;
}
.farn-form-group label span[aria-hidden="true"] { color: var(--fc-accent); }
.farn-form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--fc-border-strong);
  border-radius: 10px;
  background: var(--fc-surface);
  font-family: inherit;
  font-size: 15px;
  color: var(--fc-text);
  transition: border-color var(--fc-transition), box-shadow var(--fc-transition);
}
.farn-form-group input::placeholder { color: var(--fc-subtle); }
.farn-form-group input:focus {
  outline: none;
  border-color: var(--fc-accent);
  box-shadow: 0 0 0 3px rgba(199, 82, 42, .18);
}
/* Phone field — keep direction LTR for digit grouping but align text to start */
.farn-form-group input[type="tel"] { direction: ltr; text-align: start; }

.farn-form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--fc-accent) 0%, var(--fc-accent-hover) 100%);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform var(--fc-transition), box-shadow var(--fc-transition);
  box-shadow: 0 6px 14px rgba(199, 82, 42, .26);
}
.farn-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(199, 82, 42, .32);
}
.farn-form-submit:active { transform: translateY(0); }
.farn-form-submit:disabled {
  background: var(--fc-subtle);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.farn-form-submit svg { transform: scaleX(-1); }
[dir="rtl"] .farn-form-submit svg { transform: scaleX(1); }

.farn-form-disclaimer {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--fc-subtle);
  line-height: 1.4;
}

/* Success state — green rounded surface */
.farn-form-success {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #F1FBF5;
  color: #166534;
  border: 1.5px solid #BFEFD0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}
.farn-form-success svg {
  background: #16A34A;
  color: #fff;
  border-radius: 50%;
  padding: 3px;
  width: 22px;
  height: 22px;
  box-sizing: content-box;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .farn-contact-panel { padding: 18px 16px; }
  .farn-contact-hero__icon { width: 44px; height: 44px; }
  .farn-contact-hero__text h3 { font-size: 18px; }
  .farn-form-row { grid-template-columns: 1fr; gap: 10px; }
  .farn-contact-options { grid-template-columns: 1fr; }
}

/* Reduce-motion respect */
@media (prefers-reduced-motion: reduce) {
  .farn-contact-options .farn-contact-link:hover,
  .farn-contact-options .farn-contact-btn:hover,
  .farn-form-submit:hover { transform: none !important; }
}

/* ──────────────────────────────────────────────────────────────────
 *  v4 Batch B-1 — accessibility + breadcrumb structure
 *  Added 2026-05.
 * ─────────────────────────────────────────────────────────────── */

/* Visually-hidden utility (a11y) — for screen-reader-only labels */
.farn-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Breadcrumb: span-chain (no list semantics, immune to ol/list-style cascade) */
.farn-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0 0 14px;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fc-subtle);
  font-weight: 600;
}
.farn-breadcrumb__item {
  display: inline-flex;
  align-items: center;
}
.farn-breadcrumb__item a {
  color: var(--fc-muted);
  text-decoration: none;
  transition: color var(--fc-transition);
}
.farn-breadcrumb__item a:hover {
  color: var(--fc-accent);
}
.farn-breadcrumb__item[aria-current="page"] {
  color: var(--fc-text);
}
.farn-breadcrumb__sep {
  margin: 0 8px;
  opacity: .55;
  font-weight: 700;
  color: var(--fc-subtle);
  user-select: none;
}

/* Legacy ol structure (still supported for any cached HTML) */
.farn-breadcrumb ol {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  list-style-type: none !important;
}
.farn-breadcrumb ol li {
  display: inline-flex !important;
  align-items: center;
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.farn-breadcrumb ol li::marker { content: '' !important; }
.farn-breadcrumb ol li + li::before {
  content: '\003E' !important;
  margin: 0 8px !important;
  opacity: .55;
  font-weight: 700;
}

/* Page header subline (new) */
.farn-page-header__sub {
  font-size: 15px;
  color: var(--fc-muted);
  line-height: 1.6;
  max-width: 640px;
  margin: 8px 0 0;
}

/* Focus-visible polish across catalog interactive elements */
.farn-catalog-wrap button:focus-visible,
.farn-catalog-wrap a:focus-visible,
.farn-catalog-wrap input:focus-visible,
.farn-catalog-wrap select:focus-visible,
.farn-catalog-wrap textarea:focus-visible,
.farn-product-wrap button:focus-visible,
.farn-product-wrap a:focus-visible,
.farn-product-wrap input:focus-visible {
  outline: 3px solid var(--fc-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ──────────────────────────────────────────────────────────────────
 *  Mobile filter: floating action button (FAB) + slide-in drawer
 *  Hidden ≥901px (desktop sidebar handles it). Visible ≤900px.
 *  The drawer borrows colors/typography from the existing catalog
 *  surface so it feels native to the page.
 *
 *  NOTE: the catalog runs RTL only and the FAB is meant to sit on the
 *  visual right, so this section uses physical `right`/`left` rather
 *  than logical `inset-inline-*`. Logical properties flip in RTL,
 *  which is the wrong behaviour here — "right side" is right side
 *  regardless of language direction.
 * ─────────────────────────────────────────────────────────────── */

/* Make the [hidden] attribute actually win over the base display rules
   below. Without this, `.farn-drawer { display: flex }` overrides the
   implicit `display: none` that [hidden] applies, so the drawer keeps
   taking up layout off-screen and can flash on first paint. */
.farn-fab-filter[hidden],
.farn-drawer[hidden],
.farn-drawer-backdrop[hidden] {
  display: none !important;
}

/* ── FAB ──────────────────────────────────────────────────────── */
/* Use #id with the class so the rule wins typical theme overrides
   without needing !important. The button is never inside a hidden
   container and should always be clickable when its display is set
   (the @media below). */
#farnFabFilter.farn-fab-filter {
  /* Hidden by default; @media below shows it on narrow viewports. */
  display: none;
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  right: 18px;
  z-index: 90;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--fc-text, #1a1a1a);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.1);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.farn-fab-filter:hover,
.farn-fab-filter:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,0,0,.22), 0 3px 8px rgba(0,0,0,.12);
}
.farn-fab-filter:focus-visible {
  outline: 3px solid var(--fc-accent, #2271b1);
  outline-offset: 3px;
}
.farn-fab-filter:active {
  transform: translateY(0);
}
.farn-fab-filter svg {
  flex: 0 0 auto;
}
.farn-fab-filter__label {
  white-space: nowrap;
}
.farn-fab-filter__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  margin-inline-start: 2px;
  background: var(--fc-accent, #C7522A);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* While the drawer is open, fade the FAB out — the drawer's close button takes over. */
.farn-fab-filter[data-drawer-open="true"] {
  opacity: 0;
  pointer-events: none;
  transform: scale(.9);
}

/* ── Backdrop ─────────────────────────────────────────────────── */
.farn-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 18, 23, .55);
  opacity: 0;
  transition: opacity 220ms ease;
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
}
.farn-drawer-backdrop[data-open="true"] {
  opacity: 1;
}

/* ── Drawer ───────────────────────────────────────────────────── */
.farn-drawer {
  /* Anchored to the visual right edge using physical `right` so the
     direction is unambiguous regardless of `dir`. */
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 92vw);
  height: 100vh;
  height: 100dvh;
  z-index: 101;
  display: flex;
  flex-direction: column;
  background: var(--fc-surface, #fff);
  box-shadow: -8px 0 28px rgba(0,0,0,.18);
  /* Slide off the right edge — positive X is rightward in viewport coords. */
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(.32, .72, 0, 1);
  outline: none;
}
.farn-drawer[data-open="true"] {
  transform: translateX(0);
}

.farn-drawer__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--fc-border, #e5e7eb);
  background: var(--fc-surface, #fff);
}
.farn-drawer__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--fc-text, #1a1a1a);
  letter-spacing: -0.01em;
}
#farnFilterDrawerClose.farn-drawer__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--fc-surface-2, #f4f5f6);
  border: 1px solid var(--fc-border, #e5e7eb);
  border-radius: 999px;
  color: var(--fc-text, #1a1a1a);
  cursor: pointer;
  pointer-events: auto;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
#farnFilterDrawerClose.farn-drawer__close:hover,
#farnFilterDrawerClose.farn-drawer__close:focus-visible {
  background: var(--fc-text, #1a1a1a);
  color: #fff;
  border-color: var(--fc-text, #1a1a1a);
}
#farnFilterDrawerClose.farn-drawer__close:focus-visible {
  outline: 2px solid var(--fc-accent, #2271b1);
  outline-offset: 2px;
}
#farnFilterDrawerClose.farn-drawer__close svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.farn-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
  background: var(--fc-surface-2, #f4f5f6);
  overscroll-behavior: contain;
}

/* The teleported `.farn-filter-panel` keeps its red chrome — its inner
   filter labels and buttons are designed to sit on that background, so
   removing it would render the filters invisible (white-on-white). We
   just hide its inner heading (the drawer header already says "סינון
   מוצרים") and let the panel sit as a contained card inside the drawer. */
.farn-drawer__body .farn-filter-panel {
  margin: 0;
}
.farn-drawer__body .farn-filter-panel h3 {
  display: none;
}
.farn-drawer__body .farn-filter-clear {
  width: 100%;
  margin-top: 12px;
}

.farn-drawer__footer {
  flex: 0 0 auto;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--fc-border, #e5e7eb);
  background: var(--fc-surface, #fff);
}
.farn-drawer__apply {
  width: 100%;
  padding: 14px 16px;
  background: var(--fc-text, #1a1a1a);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, transform 80ms ease;
  -webkit-tap-highlight-color: transparent;
}
.farn-drawer__apply:hover { background: #000; }
.farn-drawer__apply:active { transform: translateY(1px); }
.farn-drawer__apply:focus-visible {
  outline: 3px solid var(--fc-accent, #2271b1);
  outline-offset: 2px;
}

/* When the drawer is open, lock body scroll behind it. */
body.farn-drawer-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}

/* ── Show the FAB only on narrow screens ──────────────────────── */
@media (max-width: 900px) {
  #farnFabFilter.farn-fab-filter { display: inline-flex; }
}

/* On very narrow screens, hide the label and just show the icon + badge */
@media (max-width: 360px) {
  .farn-fab-filter__label { display: none; }
  .farn-fab-filter { padding: 12px 14px; }
}

/* Reduced-motion users: skip slide animation, just fade. */
@media (prefers-reduced-motion: reduce) {
  .farn-drawer { transition: none; }
  .farn-drawer-backdrop { transition: opacity 80ms linear; }
  .farn-fab-filter { transition: none; }
}
/* alpha.25 (image_seo): the SSR poster inside .farn-product-viewer is the
   server fallback — fills the viewer box, and is hidden once the iframe has
   actually loaded a src (JS adds .farn-viewer-loaded). No permanent
   duplicate product image. Inert when the flag is off (no element). */
.farn-product-viewer { position: relative; }
.farn-product-viewer .farn-product-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    background: #fff;
}
.farn-product-viewer.farn-viewer-loaded .farn-product-poster { display: none; }
