/* Fox Search base styles. Class names follow Advanced Woo Search so the
   themes' existing header rules keep applying; these are only the defaults
   AWS used to ship. */
.aws-container.fox-search { position: relative; width: 100%; }
.aws-container.fox-search .aws-search-form { display: flex; align-items: stretch; margin: 0; }
.aws-container.fox-search .aws-wrapper { position: relative; flex: 1 1 auto; min-width: 0; }
.aws-container.fox-search .aws-search-field { width: 100%; box-sizing: border-box; margin: 0; padding-right: 2.2em; }
.aws-container.fox-search .aws-search-field::-webkit-search-cancel-button { -webkit-appearance: none; }
.aws-container.fox-search .aws-search-clear { position: absolute; right: .4em; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 1.4em; line-height: 1; padding: 0 .2em; color: inherit; opacity: .6; }
.aws-container.fox-search .aws-search-clear:hover { opacity: 1; }
.aws-container.fox-search .aws-loader { display: none; position: absolute; right: 2.3em; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 2px solid rgba(0,0,0,.15); border-top-color: rgba(0,0,0,.6); border-radius: 50%; animation: fox-spin .7s linear infinite; }
.aws-container.fox-search.aws-processing .aws-loader { display: block; }
@keyframes fox-spin { to { transform: rotate(360deg); } }
.aws-container.fox-search .aws-search-btn { display: flex; align-items: center; justify-content: center; border: 0; background: transparent; cursor: pointer; padding: 0 .6em; color: inherit; }
.aws-container.fox-search .aws-search-btn svg { display: block; }

.aws-container.fox-search .aws-search-result { position: absolute; left: 0; right: 0; top: 100%; z-index: 999999; background: #fff; color: #222; border: 1px solid #ccc; border-top: 0; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: min(70vh, 560px); overflow-y: auto; text-align: left; font-size: 14px; line-height: 1.35; }
.aws-container.fox-search .aws-search-result[hidden] { display: none; }
.aws-search-result .aws_result_heading { display: block; padding: 8px 12px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.aws-search-result .aws_result_item { display: block; border-bottom: 1px solid #eee; margin: 0; }
.aws-search-result .aws_result_item:last-child { border-bottom: 0; }
.aws-search-result .aws_result_link { display: flex; gap: 10px; align-items: center; padding: 8px 12px; color: inherit; text-decoration: none; }
.aws-search-result .aws_result_item.is-active .aws_result_link, .aws-search-result .aws_result_link:hover { background: #f5f5f5; }
.aws-search-result .aws_result_image { flex: 0 0 48px; width: 48px; height: 48px; display: block; }
.aws-search-result .aws_result_image img { width: 48px; height: 48px; object-fit: contain; display: block; }
.aws-search-result .aws_result_content { display: block; flex: 1 1 auto; min-width: 0; }
.aws-search-result .aws_result_title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aws-search-result .aws_result_price { display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* line 2: price + discount + package on the left, size and strength on the right (wraps under on narrow rows) */
.aws-search-result .fox-search__line2 { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 1px; min-width: 0; }
.aws-search-result .fox-search__line2 .aws_result_price { flex: 0 1 auto; min-width: 0; }
.aws-search-result .fox-search__pack { flex: 0 0 auto; color: #555; font-size: .85em; font-weight: 600; white-space: nowrap; }
.aws-search-result .fox-search__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 2px 0 0 auto; max-width: 100%; }
.aws-search-result .fox-search__tag { display: inline-flex; align-items: center; box-sizing: border-box; height: 20px; padding: 0 7px; border: 1px solid #e3e3e3; border-radius: 999px; background: #f1f1f1; color: #444; font-size: 11.5px; line-height: 1; white-space: nowrap; }
.aws-search-result .fox-search__strength { display: inline-flex; align-items: center; gap: 2px; box-sizing: border-box; height: 20px; padding: 0 7px; border: 1px solid #e3e3e3; border-radius: 999px; background: #f1f1f1; }
.aws-search-result .fox-search__strength i { display: block; width: 12px; height: 10px; border-radius: 3px; background: #dcdcdc; }
.aws-search-result .fox-search__strength i.on:nth-child(1) { background: #e3c07e; }
.aws-search-result .fox-search__strength i.on:nth-child(2) { background: #cf9a52; }
.aws-search-result .fox-search__strength i.on:nth-child(3) { background: #b0702f; }
.aws-search-result .fox-search__strength i.on:nth-child(4) { background: #87491d; }
.aws-search-result .fox-search__strength i.on:nth-child(5) { background: #5a2c10; }
@media (max-width: 767px), (pointer: coarse) and (max-width: 1100px) {
  .aws-search-result .fox-search__meta { flex-basis: 100%; margin-left: 0; margin-top: 1px; }
}
.aws-search-result .aws_result_price del { opacity: .55; margin-right: .3em; }
.aws-search-result .aws_result_price ins { text-decoration: none; font-weight: 700; color: var(--color-sale, inherit); }
.aws-search-result .fox-search__off { display: inline-block; margin-left: .4em; padding: 1px 6px; border-radius: 3px; background: var(--color-sale, #c62828); color: var(--color-nav-text, #fff); font-size: .75em; font-weight: 700; line-height: 1.5; vertical-align: middle; }
.aws-search-result .aws_result_term .aws_result_link { padding: 6px 12px; }
.aws-search-result .aws_result_count { opacity: .5; font-size: 12px; }
.aws-search-result a.aws_search_more { display: block; padding: 10px 12px; text-align: center; font-weight: 600; color: inherit; text-decoration: none; background: #fafafa; }
.aws-search-result a.aws_search_more.is-active, .aws-search-result a.aws_search_more:hover { background: #f0f0f0; }
.aws-search-result .aws_result_empty { padding: 12px; opacity: .7; }

/* Results page facet bar */
.fox-facets { margin: 0 0 1.25em; font-size: 14px; }
.fox-facets__summary { margin-bottom: .5em; }
.fox-facets__parsed, .fox-facets__relaxed { opacity: .75; }
.fox-facets__applied { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .6em; }
.fox-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: #eee; color: inherit; text-decoration: none; font-size: 13px; }
.fox-chip:hover { background: #e2e2e2; }
.fox-chip--clear { background: transparent; text-decoration: underline; }
.fox-facets__groups { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.fox-facet { position: relative; }
.fox-facet > summary, .fox-facet--toggle { cursor: pointer; list-style: none; padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: inherit; text-decoration: none; display: inline-block; user-select: none; }
.fox-facet > summary::-webkit-details-marker { display: none; }
.fox-facet > summary::after { content: ' ▾'; opacity: .6; }
.fox-facet--toggle.is-active { background: #222; color: #fff; border-color: #222; }
.fox-facet__active, .fox-facet__count { opacity: .55; font-size: 12px; }
.fox-facet__list { position: absolute; z-index: 50; top: 100%; left: 0; margin: 4px 0 0; padding: 6px 0; list-style: none; min-width: 220px; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid #ddd; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.fox-facet__list li a { display: flex; justify-content: space-between; gap: 12px; padding: 5px 12px; color: inherit; text-decoration: none; }
.fox-facet__list li a:hover { background: #f5f5f5; }
.fox-facet__list li a.is-active { font-weight: 600; }
.fox-facet__list li a.is-active::before { content: '✓ '; }
@media (max-width: 600px) { .fox-facet__list { position: static; box-shadow: none; max-height: 240px; } }

/* Phones: full-screen search while typing (fox-search.js adds .fox-search--full on focus). */
html.fox-search-lock, html.fox-search-lock body { overflow: hidden !important; }
.aws-container.fox-search.fox-search--full { position: fixed !important; inset: 0 !important; top: var(--fox-vvtop, 0px) !important; bottom: auto !important; left: 0 !important; width: auto !important; max-width: none !important; height: 100% !important; height: var(--fox-vvh, 100dvh) !important; margin: 0 !important; z-index: 2147483000 !important; display: flex; flex-direction: column; box-sizing: border-box; padding: max(10px, env(safe-area-inset-top)) 12px 0; background: #fff; color: #222; transform: none !important; }
.aws-container.fox-search.fox-search--full .aws-search-form { flex: 0 0 auto; align-items: center; gap: 8px; }
.aws-container.fox-search.fox-search--full .aws-search-field { font-size: 16px !important; } /* 16px keeps iOS from zooming in */
.aws-container.fox-search.fox-search--full .aws-search-result { position: static !important; flex: 1 1 auto; min-height: 0; max-height: none !important; margin: 8px -12px 0; border: 0 !important; border-top: 1px solid #eee !important; box-shadow: none !important; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
.aws-container.fox-search.fox-search--full .aws-search-result[hidden] { display: block; visibility: hidden; }
.aws-container.fox-search .fox-search__cancel { flex: 0 0 auto; border: 0; background: transparent; color: #222; font: inherit; font-size: 15px; padding: 8px 2px 8px 4px; cursor: pointer; white-space: nowrap; }
.aws-container.fox-search .fox-search__cancel[hidden] { display: none; }
.aws-search-result .fox-search__example { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 12px; border: 0; border-bottom: 1px solid #eee; background: transparent; color: inherit; font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.aws-search-result .fox-search__example svg { flex: 0 0 auto; opacity: .45; }
/* desktop dropdown: the examples in two columns (the phone full screen keeps one list) */
.aws-container.fox-search:not(.fox-search--full) .aws-search-result .fox-search__examples { display: grid; grid-template-columns: 1fr 1fr; }
.aws-container.fox-search:not(.fox-search--full) .aws-search-result .fox-search__examples .aws_result_heading { grid-column: 1 / -1; }
.aws-container.fox-search:not(.fox-search--full) .aws-search-result .fox-search__example { padding: 10px 12px; font-size: 14px; }
.aws-search-result .fox-search__example.is-active, .aws-search-result .fox-search__example:hover { background: #f5f5f5; }

/* Base field style. Advanced Woo Search used to ship it; without it browsers draw their default inset border. */
.aws-container.fox-search .aws-search-form .aws-search-field { -webkit-appearance: none; appearance: none; border: 1px solid #d0d0d0; background: #fff; color: #222; box-shadow: none; outline: none; line-height: normal; }
.aws-container.fox-search .aws-search-form .aws-search-field:focus { border-color: #8a8a8a; }
/* Desktop: a comfortable, aligned field + button (phones/tablets get 46px below). */
.aws-container.fox-search .aws-search-form { min-height: 36px; }
.aws-container.fox-search .aws-search-form .aws-search-field { height: 36px; font-size: 14px; padding: 0 34px 0 14px; box-sizing: border-box; }
.aws-container.fox-search .aws-search-form .aws-search-btn { height: 36px; min-width: 48px; }

/* Phones and touch tablets: a header box that spans the row and is big enough for a thumb. */
@media (max-width: 767px), (pointer: coarse) and (max-width: 1100px) {
  .search_col:has(.fox-search), .desktop_search:has(.fox-search) { flex: 1 1 100% !important; width: 100% !important; max-width: none !important; }
  .aws-container.fox-search { width: 100% !important; max-width: none !important; }
  .aws-container.fox-search .aws-search-form { height: 46px; }
  .aws-container.fox-search .aws-search-form .aws-wrapper { height: 46px; }
  .aws-container.fox-search .aws-search-form .aws-search-field { height: 46px !important; min-height: 46px; font-size: 16px !important; padding: 0 44px 0 16px !important; box-sizing: border-box; }
  .aws-container.fox-search .aws-search-form .aws-search-btn { height: 46px !important; min-width: 56px; }
  .aws-container.fox-search .aws-search-clear { width: 40px; height: 40px; right: 2px; font-size: 24px; display: flex; align-items: center; justify-content: center; }
}

/* Full-screen search: own look, large field, finger-sized rows, no cramped submit button
   (the keyboard's Search key and the "See all results" row submit). */
.aws-container.fox-search.fox-search--full .aws-search-form { height: 52px; gap: 10px; max-width: 760px; width: 100%; margin: 0 auto; }
.aws-container.fox-search.fox-search--full .aws-search-form .aws-wrapper { height: 52px; }
.aws-container.fox-search.fox-search--full .aws-search-form .aws-search-field { height: 52px !important; min-height: 52px; border: 1px solid #cfcfcf !important; border-radius: 12px !important; background: #f4f4f4 !important; color: #222 !important; padding: 0 48px 0 16px !important; font-size: 17px !important; }
.aws-container.fox-search.fox-search--full .aws-search-form .aws-search-field:focus { background: #fff !important; border-color: #8a8a8a !important; }
.aws-container.fox-search.fox-search--full .aws-search-form .aws-search-btn { display: none !important; }
.aws-container.fox-search.fox-search--full .aws-search-clear { width: 44px; height: 44px; right: 4px; font-size: 26px; display: flex; align-items: center; justify-content: center; opacity: .55; }
.aws-container.fox-search.fox-search--full .aws-loader { right: 48px; }
.aws-container.fox-search.fox-search--full .fox-search__cancel { height: 52px; padding: 0 4px 0 6px; font-size: 17px; }
.aws-container.fox-search.fox-search--full .aws-search-result > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.aws-container.fox-search.fox-search--full .aws-search-result .aws_result_link { padding: 10px 16px; min-height: 56px; box-sizing: border-box; }
.aws-container.fox-search.fox-search--full .aws-search-result .aws_result_title { font-size: 16px; }
.aws-container.fox-search.fox-search--full .aws-search-result .aws_result_price { font-size: 15px; }
.aws-container.fox-search.fox-search--full .aws-search-result .aws_result_heading { padding: 14px 16px 6px; font-size: 12px; }
.aws-container.fox-search.fox-search--full .aws-search-result .fox-search__example { min-height: 52px; padding: 14px 16px; font-size: 16px; }
.aws-container.fox-search.fox-search--full .aws-search-result .aws_result_term .aws_result_link { min-height: 48px; align-items: center; font-size: 16px; }
.aws-container.fox-search.fox-search--full .aws-search-result .aws_search_more { min-height: 52px; display: flex; align-items: center; justify-content: center; font-size: 16px; }

/* The clear button is shown by JS only when there is text; keep [hidden] stronger than the display rules above. */
.aws-container.fox-search .aws-search-clear[hidden] { display: none !important; }

/* Titles: neutral dark. The Fox themes still carry an old Advanced Woo Search rule that forces the
   accent red on every title (with !important), which made every name look like a sale price. */
.aws-container.fox-search .aws-search-result .aws_result_title { color: #1a1a1a !important; }
.aws-container.fox-search .aws-search-result .aws_result_item.is-active .aws_result_title,
.aws-container.fox-search .aws-search-result .aws_result_link:hover .aws_result_title { color: var(--color-accent, #c62828) !important; }
.aws-container.fox-search .aws-search-result .aws_result_count { color: #777; }

/* Desktop (mouse): about twice the old header width (315px -> 630px); it gives way when the
   header has less room. The dropdown follows the box width. */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  /* the theme's search column also holds the header icons: size the box itself */
  .search_col:has(.fox-search) { flex: 0 1 auto !important; max-width: 100%; min-width: 0; }
  .desktop_search:has(.fox-search) { flex: 0 1 630px !important; width: 630px; max-width: 100%; min-width: 260px; }
  .aws-container.fox-search { width: 100% !important; max-width: none !important; }
}

.fox-facets__summary:not(:has(*)) { display: none; }
