/* Scoped extension of the active Flatsome/WooCommerce surface. Theme fonts win. */
.rag-search-page { --rag-red: #c00; --rag-ink: #252525; --rag-muted: #555; --rag-line: #d6d6d6; color: var(--rag-ink); max-width: 1200px; margin: 0 auto; padding: 32px 20px 96px; }
.rag-search-page *, .rag-search-form * { box-sizing: border-box; }
.rag-search-page h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 24px; }
.rag-search-form { position: relative; margin: 0 0 24px; color: #252525; }
.rag-search-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.rag-search-input-row { display: flex; gap: 8px; }
.rag-search-input-row input { min-width: 0; flex: 1; margin: 0; }
.rag-search-form input, .rag-filter-form input[type="number"], .rag-filter-form select { font: inherit; font-size: 16px; min-height: 44px; border: 1px solid #888; border-radius: 2px; padding: 8px 12px; background: #fff; color: #252525; }
.rag-search-form input::placeholder { color: #666; }
.rag-search-form button, .rag-filter-form button, .rag-search-page .button { background: #c00; color: #fff; border: 0; border-radius: 2px; min-height: 44px; padding: 10px 16px; margin: 0; font: inherit; font-weight: 600; cursor: pointer; }
.rag-search-form button:hover, .rag-filter-form button:hover, .rag-search-page .button:hover { background: #a30000; color: #fff; }
.rag-search-page a { color: #a30000; text-underline-offset: 3px; }
.rag-search-page a:hover { text-decoration: underline; }
.rag-search-page :focus-visible, .rag-search-form :focus-visible { outline: 3px solid #252525; outline-offset: 3px; }
.rag-search-page ::selection, .rag-search-form ::selection { background: #c00; color: #fff; }
.rag-search-form input { caret-color: #c00; }
/* Filters: one column of collapsible groups. Desktop: left column; phone: one full-height sheet. */
.rag-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; }
.rag-main { min-width: 0; }
.rag-sidebar { min-width: 0; }
.rag-filter-form { margin: 0 0 20px; }
.rag-filters > summary { cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; gap: 6px; list-style: none; }
.rag-filters > summary::-webkit-details-marker, .rag-group > summary::-webkit-details-marker { display: none; }
.rag-filter-fields { border-top: 1px solid var(--rag-line); }
.rag-group { border-bottom: 1px solid var(--rag-line); }
.rag-group[hidden] { display: none; }
.rag-group > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) 12px; align-items: center; gap: 12px; min-height: 52px; padding: 4px 0; }
.rag-group > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); justify-self: end; }
.rag-group[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.rag-group-name { font-weight: 600; }
.rag-group-selected { color: var(--rag-muted); font-size: 14px; text-align: right; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rag-group[open] .rag-group-selected { visibility: hidden; }
.rag-group-body { padding: 0 0 14px; }
.rag-options { list-style: none; margin: 0; padding: 0; }
.rag-options > li { margin: 0; }
.rag-options > li[hidden] { display: none; }
.rag-option { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 2px 0; font-size: 15px; font-weight: 400; cursor: pointer; margin: 0; }
.rag-option input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; accent-color: #c00; }
.rag-option-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rag-option-count { color: var(--rag-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.rag-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rag-more > summary, .rag-show-all { cursor: pointer; color: #a30000; font-weight: 600; font-size: 14px; min-height: 44px; display: flex; align-items: center; text-decoration: underline; text-underline-offset: 3px; }
.rag-show-all { background: none !important; border: 0; padding: 0; margin: 0; font: inherit; font-size: 14px; color: #a30000 !important; text-transform: none; letter-spacing: 0; }
.rag-show-all[hidden], .rag-options-empty[hidden] { display: none; }
.rag-options-empty { color: var(--rag-muted); font-size: 14px; margin: 8px 0 0; }
.rag-find { position: relative; margin: 0 0 6px; }
.rag-search-page .rag-facet-find { width: 100%; min-height: 48px; margin: 0; font-size: 16px; padding: 8px 48px 8px 12px; border: 1px solid #888; border-radius: 2px; box-shadow: none; }
.rag-search-page .rag-find-clear { position: absolute; top: 0; right: 0; width: 48px; height: 48px; min-height: 0; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent !important; border: 0; color: #333 !important; cursor: pointer; }
.rag-search-page .rag-find-clear svg { width: 14px; height: 14px; }
.rag-find-clear[hidden] { display: none !important; }
.rag-option-zero .rag-option-label, .rag-option-zero .rag-option-count { color: #6b6b6b; }
.rag-option-zero .rag-option-count { font-style: italic; }
.rag-price-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rag-price-fields label { font-size: 14px; font-weight: 600; margin: 0; }
.rag-price-fields input[type="number"] { display: block; width: 100%; margin: 6px 0 0; }
.rag-price-fields input[type="range"] { display: block; width: 100%; min-height: 44px; accent-color: #c00; margin: 0; }
.rag-filter-form .rag-apply { width: 100%; margin-top: 16px; }
.rag-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 0 0 16px; }
.rag-filter-toggle[hidden] { display: none !important; }
.rag-sort-label { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 600; }
.rag-sort-label select { margin: 0; max-width: 100%; }
@media (min-width: 601px) {
  .rag-layout { grid-template-columns: minmax(200px, 248px) minmax(0, 1fr); }
  .rag-enhanced .rag-filters > summary, .rag-enhanced .rag-filter-form .rag-apply, .rag-filter-toggle { display: none !important; }
}
.rag-result-count { float: none !important; margin: 0 0 16px !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.rag-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 14px; }
.rag-search-page .rag-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--rag-line); border-radius: 999px; background: #f3f3f3; color: #252525; text-decoration: none; }
.rag-search-page .rag-chip:hover { border-color: #888; background: #ebebeb; text-decoration: none; }
.rag-search-page .rag-clear { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 4px; font-weight: 600; }
#rag-search-main .rag-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; margin: 0; padding: 0; width: 100%; }
#rag-search-main .rag-grid::before, #rag-search-main .rag-grid::after { display: none; }
#rag-search-main .rag-grid > .rag-card { max-width: none; width: auto; min-width: 0; padding: 0; margin: 0; }
.rag-card-link { display: block; height: 100%; color: #252525 !important; text-decoration: none !important; }
#rag-search-main .rag-card .col-inner, #rag-search-main .rag-card .box, #rag-search-main .rag-card-link { display: block; width: 100%; min-width: 0; max-width: none; }
#rag-search-main .rag-card .box-image { position: relative; width: 100%; aspect-ratio: 5 / 3; display: flex; align-items: center; justify-content: center; background: #fafafa; overflow: hidden; }
#rag-search-main .rag-card .box-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
.rag-card [hidden], .rag-grid[hidden] { display: none !important; }
.rag-card .box-text { padding: 14px 0 0; }
#rag-search-main .rag-card h2 { font-size: 18px; line-height: 1.4; height: 2.8em; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#rag-search-main .rag-card .rag-spec, #rag-search-main .rag-card .rag-variant, #rag-search-main .rag-card .rag-units { font-size: 13px; line-height: 1.6; color: #555; margin: 0 0 6px; overflow-wrap: anywhere; }
#rag-search-main .rag-card .price { color: #252525; font-weight: 600; font-size: 15px; line-height: 1.6; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.rag-unavailable { color: #a30000; font-weight: 600; }
.rag-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.rag-pagination a { padding: 8px 14px; min-height: 44px; }
.rag-pagination [aria-current="page"] { background: #252525; color: #fff; }
.rag-recovery { margin: 24px 0 40px; max-width: 65ch; }
.rag-recovery h2 { margin: 0 0 12px; font-size: 24px; }
.rag-jaylin-link { margin: 0 0 24px; }
.rag-suggestions { position: absolute; top: 100%; left: 0; right: 0; background: #fff; color: #252525; border: 1px solid #aaa; box-shadow: 0 8px 24px #0002; z-index: 1100; height: min(65vh, 560px); overflow: auto; overscroll-behavior: contain; contain: layout paint style; }
/* Isolate desktop overlay paints; mobile already uses a fixed fullscreen form. */
@media (min-width: 601px) { .rag-suggestions:not([hidden]) { transform: translateZ(0); } }
.rag-suggestions[hidden], .rag-suggestions [hidden] { display: none !important; }
/* Rows already have fixed heights. Bound their layout and skip offscreen
   contents without removing options from the DOM or keyboard navigation. */
.rag-suggestions > div { height: 44px; contain: strict; content-visibility: auto; }
.rag-suggestions > .rag-heading-row { height: 36px; }
.rag-suggestions > .rag-product-row { height: 88px; }
.rag-suggestions a { display: block; padding: 10px 16px; color: #252525; text-decoration: none; height: 44px; overflow: hidden; font-size: 14px; line-height: 24px; white-space: nowrap; text-overflow: ellipsis; }
.rag-suggestions a.rag-product-option { height: 88px; padding: 10px 12px; }
.rag-suggestions a span { display: block; overflow: hidden; text-overflow: ellipsis; }
.rag-suggestions .rag-product-option span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 20px; max-height: 40px; }
.rag-suggestions [aria-selected="true"], .rag-suggestions a:hover { background: #f1f1f1; }
.rag-suggestions strong { display: block; padding: 6px 12px; height: 36px; line-height: 24px; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rag-suggestions small { display: block; color: #555; font-size: 12px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; }
.rag-suggestions img { float: left; width: 64px; height: 44px; object-fit: contain; margin: 0 12px 0 0; background: #fafafa; }
.rag-close-search[hidden] { display: none !important; }
/* Header search icon (48 px target) and the overlay it opens. */
button.rag-header-search { display: inline-flex !important; align-items: center; justify-content: center; width: 48px !important; height: 48px !important; min-width: 48px; min-height: 48px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0; background: transparent !important; color: inherit !important; line-height: 1; cursor: pointer; box-shadow: none !important; }
.rag-header-search:hover { opacity: .75; }
.rag-header-search:focus-visible { outline: 3px solid currentColor; outline-offset: -3px; }
.rag-header-search-item { margin: 0 !important; }
button.rag-header-search-fallback { position: absolute; top: 8px; right: 8px; z-index: 10; color: #252525 !important; }
.rag-header-overlay { position: fixed; inset: 0 0 auto 0; z-index: 100001; background: #fff; box-shadow: 0 8px 24px #0002; padding: 16px max(16px, calc((100vw - 1200px) / 2)); }
.rag-header-overlay[hidden] { display: none !important; }
.rag-header-overlay .rag-search-form { margin: 0; }
.rag-header-overlay .rag-close-search { float: right; margin: 0 0 8px 12px; }
@media (max-width: 600px) {
  .rag-search-page { padding: 24px 16px 112px; }
  .rag-search-input-row { flex-wrap: wrap; }
  .rag-search-input-row input[type="search"] { flex-basis: 100%; }
  .rag-search-input-row button { width: 100%; }
  .rag-search-open { position: fixed !important; inset: 0 !important; width: 100% !important; max-width: none !important; height: 100dvh; z-index: 100001; background: #fff; padding: 16px; margin: 0; display: flex; flex-direction: column; }
  .rag-search-open .rag-close-search { align-self: flex-end; margin-bottom: 12px; }
  .rag-search-open .rag-suggestions { position: static; flex: 1; min-height: 0; max-height: none; margin-top: 12px; box-shadow: none; }
  .rag-toolbar { position: sticky; top: 0; z-index: 1000; background: #fff; margin: 0 -16px 16px; padding: 8px 16px; border-bottom: 1px solid var(--rag-line); }
  .rag-enhanced button.rag-filter-toggle { flex: 1 1 0; min-height: 48px; margin: 0; padding: 8px 12px; background: #fff; color: #252525; border: 1px solid #888; border-radius: 2px; font-weight: 600; }
  .rag-enhanced button.rag-filter-toggle:hover { background: #f3f3f3; color: #252525; }
  .rag-sort-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .rag-sort-label { min-width: 0; flex: 1 1 0; }
  .rag-sort-label select { min-width: 0; width: 100%; min-height: 48px; }
  .rag-enhanced .rag-filters:not([open]) > summary { display: none; }
  /* The sheet is the only scroll area; its header stays in view. */
  .rag-filters[open] { position: fixed; inset: 0; height: 100dvh; z-index: 100002; background: #fff; overflow-y: auto; overscroll-behavior: contain; }
  .rag-filters[open] > summary { position: sticky; top: 0; z-index: 1; background: #fff; padding: 0 16px; min-height: 56px; border-bottom: 1px solid var(--rag-line); font-size: 18px; }
  .rag-filters[open] > summary::after { content: 'Close'; margin-left: auto; font-size: 15px; color: #a30000; text-decoration: underline; text-underline-offset: 3px; }
  .rag-filters[open] .rag-filter-fields { border-top: 0; padding: 0 16px 112px; }
  .rag-filter-form .rag-apply { display: none; }
  .rag-filter-form:has(.rag-filters[open]) .rag-apply { display: block; position: fixed; z-index: 100003; bottom: max(16px, env(safe-area-inset-bottom)); left: 16px; right: 16px; width: calc(100% - 32px); min-height: 52px; box-shadow: 0 -12px 16px #fff; }
  .rag-filter-form:not(:has(.rag-filters[open])) { margin: 0; }
  #rag-search-main .rag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  #rag-search-main .rag-card h2 { font-size: 16px; }
  #rag-search-main .rag-card .price { font-size: 14px; }
  /* On mobile search pages these integrations use document flow, not a floating
     overlay. Unlike bottom padding, this protects every card at every scroll offset. */
  body:has([data-rag-page]) .rag-widget .rag-bubble,
  body:has([data-rag-page]) .grecaptcha-badge { position: relative !important; bottom: auto !important; right: auto !important; left: auto !important; margin: 16px 16px 40px auto !important; }
  body:has(.rag-search-open), body:has(.rag-filters[open]) { overflow: hidden; }
  body:has(.rag-search-open) .rag-widget .rag-bubble,
  body:has(.rag-filters[open]) .rag-widget .rag-bubble,
  body:has(.rag-search-open) .grecaptcha-badge,
  body:has(.rag-filters[open]) .grecaptcha-badge { visibility: hidden !important; pointer-events: none; }
}
/* Round 12 browse pages: category links as a chip row under the H1 and as the first filter group. */
.rag-browse-page .woocommerce-breadcrumb { font-size: 14px; color: var(--rag-muted); margin: 0 0 8px; }
.rag-browse-page h1 { margin-bottom: 16px; }
.rag-category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.rag-search-page .rag-category-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1px solid #888; border-radius: 999px; background: #fff; color: #252525; font-size: 15px; font-weight: 600; text-decoration: none; }
.rag-search-page .rag-category-chip:hover { background: #f3f3f3; text-decoration: none; }
.rag-search-page .rag-category-chip[aria-current="page"] { background: #252525; border-color: #252525; color: #fff; }
.rag-category-chip[hidden], .rag-category-links > li[hidden] { display: none !important; }
.rag-category-count { font-weight: 400; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--rag-muted); }
.rag-category-chip[aria-current="page"] .rag-category-count { color: #ddd; }
.rag-category-links { list-style: none; margin: 0; padding: 0; }
.rag-category-links > li { margin: 0; }
.rag-search-page .rag-category-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 15px; color: #252525; text-decoration: none; }
.rag-search-page .rag-category-link:hover .rag-category-name { text-decoration: underline; }
.rag-search-page .rag-category-link[aria-current="page"] { font-weight: 700; }
.rag-category-description { margin: 40px 0 0; max-width: 75ch; color: var(--rag-ink); }
@media (max-width: 600px) {
  /* One scrollable row on phones keeps the grid near the top. */
  .rag-category-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; scrollbar-width: none; }
  .rag-category-chips::-webkit-scrollbar { display: none; }
  .rag-search-page .rag-category-chip { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: no-preference) { .rag-search-form button, .rag-filter-form button { transition: background-color 120ms ease-out; } }
