/* Header search bar, suggestions and results list (includes/search.php). */

/* ---------- Search bar ---------- */
.md-search { position: relative; display: flex; align-items: stretch; width: 100%; font-family: var(--md-font, inherit); }
.md-search__input { flex: 1; min-width: 0; height: 48px; padding: 0 18px !important; font-size: 16px !important; color: var(--global-palette3, #0C2B40); background: #fff !important; border: 2px solid var(--global-palette1, #0C2B40) !important; border-right: 0 !important; border-radius: 12px 0 0 12px !important; box-shadow: none !important; -webkit-appearance: none; appearance: none; }
.md-search__input::placeholder { color: #536576; }
.md-search__input::-webkit-search-cancel-button { cursor: pointer; }
.md-search__btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; padding: 0 20px; height: 48px; border-radius: 0 12px 12px 0; background: var(--md-gold, #F4B41A); color: var(--global-palette3, #0C2B40); font-size: 16px; font-weight: 700; cursor: pointer; }
.md-search__btn:hover { background: #FFC53D; }
.md-search__btn:focus-visible { outline: 3px solid var(--global-palette1, #0C2B40); outline-offset: 2px; }

/* Desktop: wide bar to the right of the logo. */
#main-header .site-header-main-section-right { flex: 1; justify-content: flex-end; }
#main-header .site-header-main-section-right [data-section="kadence_customizer_header_html"] { flex: 1; max-width: 720px; margin-left: 48px; }
/* Phones and tablets: full-width row under the logo. */
#mobile-header .site-bottom-header-wrap .site-header-row-container-inner { padding: 0 0 12px; }
#mobile-header [data-section="kadence_customizer_mobile_html"] { width: 100%; }
#mobile-header .site-header-bottom-section-center { width: 100%; }
.md-search--mobile .md-search__btn span { display: none; }
.md-search--mobile .md-search__btn { padding: 0 16px; }

/* ---------- Suggestions ---------- */
.md-search__sug { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 100; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(12, 43, 64, .22); padding: 8px; max-height: min(70vh, 560px); overflow-y: auto; text-align: left; }
.md-sug__h { margin: 8px 10px 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--global-palette5, #536576); }
.md-sug__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px 8px; }
.md-sug__chip { padding: 8px 14px; border-radius: 980px; background: var(--global-palette8, #F7F8FA); color: var(--global-palette3, #0C2B40); font-size: 15px; text-decoration: none; }
.md-sug__chip:hover, .md-sug__chip.is-active { background: var(--md-gold-soft, #FDEFC9); }
.md-sug__aud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 4px; padding: 12px 14px; border-radius: 10px; background: var(--md-gold-soft, #FDEFC9); color: var(--global-palette3, #0C2B40); text-decoration: none; font-size: 15px; }
.md-sug__aud em { font-style: normal; font-weight: 700; color: var(--global-palette1, #0C2B40); margin-left: auto; }
.md-sug__item { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 10px; color: var(--global-palette3, #0C2B40); text-decoration: none; }
.md-sug__item img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--global-palette8, #F7F8FA); flex: none; }
.md-sug__item b { display: block; font-size: 16px; font-weight: 600; }
.md-sug__item small { display: block; font-size: 14px; color: var(--global-palette5, #536576); }
.md-sug__item:hover, .md-sug__item.is-active, .md-sug__aud.is-active, .md-sug__all.is-active { background: var(--global-palette8, #F7F8FA); }
.md-sug__all { display: block; margin: 4px; padding: 12px 10px; border-top: 1px solid var(--global-palette7, #E1E6EC); font-weight: 700; color: var(--global-palette1, #0C2B40); text-decoration: none; }
.md-sug__none { margin: 10px 12px; font-size: 15px; color: var(--global-palette4, #243B4D); }

/* ---------- Results page: Amazon-style list ---------- */
.md-sres-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 20px; padding: 14px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--global-palette7, #E1E6EC); }
.md-sres-count { margin: 0; font-size: 17px; }
.md-sres-aud { padding: 8px 14px; border-radius: 980px; background: var(--md-gold-soft, #FDEFC9); color: var(--global-palette3, #0C2B40); text-decoration: none; font-size: 15px; }
.md-sres-aud:hover { text-decoration: underline; }
body.search-results .woocommerce-result-count, body.search-results .woocommerce-ordering { display: none; }
body.search-results ul.products { display: flex !important; flex-direction: column; gap: 14px; grid-template-columns: none !important; }
body.search-results ul.products li.product { width: 100% !important; margin: 0 !important; display: grid !important; grid-template-columns: 200px 1fr; gap: 0 24px; align-items: start; padding: 16px !important; background: #fff; border-radius: 16px; border: 1px solid var(--global-palette7, #E1E6EC); }
body.search-results ul.products li.product > * { grid-column: 2; }
body.search-results ul.products li.product > a:first-child, body.search-results ul.products li.product .woocommerce-loop-image-link, body.search-results ul.products li.product > .woocommerce-LoopProduct-link { grid-column: 1; grid-row: 1 / span 6; }
body.search-results ul.products li.product img { width: 200px !important; height: 200px !important; object-fit: cover; border-radius: 12px; margin: 0 !important; }
body.search-results ul.products li.product .woocommerce-loop-product__title { font-size: 20px !important; margin: 0 0 6px !important; padding: 0 !important; }
body.search-results ul.products li.product .entry-content-wrap { padding: 0 !important; }
.md-sres-desc { margin: 0 0 8px; font-size: 15px; line-height: 1.5; color: var(--global-palette4, #243B4D); }
.md-sres-why { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 6px; background: #E8F2F7; color: var(--global-palette1, #0C2B40); font-size: 13px; font-weight: 600; }
.md-sres-btn { display: inline-block; margin-top: 10px; padding: 10px 18px; border-radius: 980px; background: var(--global-palette1, #0C2B40); color: #fff !important; font-weight: 600; font-size: 15px; text-decoration: none; }
.md-sres-btn:hover { background: var(--global-palette2, #08202F); }
.md-sres-none { padding: 32px; border-radius: 16px; background: #fff; text-align: center; }
.md-sres-none h2 { margin-top: 0; }
@media (max-width: 640px) {
	body.search-results ul.products li.product { grid-template-columns: 112px 1fr; gap: 0 14px; padding: 12px !important; }
	body.search-results ul.products li.product img { width: 112px !important; height: 112px !important; }
	body.search-results ul.products li.product .woocommerce-loop-product__title { font-size: 17px !important; }
	.md-sres-desc { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
	.md-sres-btn { padding: 9px 14px; font-size: 14px; }
}

/* The white header (with the search suggestions) must sit above the blue "Shop by" bar. */
#masthead { position: relative; z-index: 80 !important; }
.md-aud { z-index: 70; }

/* Recent searches (in the dropdown). */
.md-sug__row { display: flex; align-items: center; justify-content: space-between; }
.md-sug__clear { all: unset; cursor: pointer; margin: 8px 10px 6px; font-size: 14px; color: var(--global-palette1, #0C2B40); text-decoration: underline; }
.md-sug__recent { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--global-palette3, #0C2B40); text-decoration: none; font-size: 16px; }
.md-sug__recent svg { color: var(--global-palette5, #536576); flex: none; }
.md-sug__recent:hover, .md-sug__recent.is-active { background: var(--global-palette8, #F7F8FA); }

/* "Your recently viewed items" row (shortcode [md_recently_viewed], home page). */
.md-recent { margin: 8px 0 40px; }
.md-recent__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.md-recent__top h2 { margin: 0 0 16px; }
.md-recent__clear { all: unset; cursor: pointer; font-size: 15px; color: var(--global-palette1, #0C2B40); text-decoration: underline; white-space: nowrap; flex: none; }
.md-recent__row { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.md-recent__card { flex: none; width: 200px; scroll-snap-align: start; color: var(--global-palette3, #0C2B40); text-decoration: none; }
.md-recent__img { display: block; width: 200px; height: 200px; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--global-palette7, #E1E6EC); margin-bottom: 10px; }
.md-recent__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.md-recent__card:hover img { transform: scale(1.04); }
.md-recent__card b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.md-recent__card small { display: block; margin-top: 4px; font-size: 15px; font-weight: 700; }
@media (max-width: 640px) { .md-recent__top h2 { font-size: 26px; } .md-recent__card { width: 150px; } .md-recent__img { width: 150px; height: 150px; } }
h1.md-sres-count { font-size: 22px; font-weight: 500; letter-spacing: 0; }
body.search-results .md-sres-head { margin-top: 8px; }
/* Kadence hides the tile's action area until hover; on the results list, always show our button (only). */
body.search-results ul.products li.product .product-action-wrap { display: block !important; opacity: 1 !important; transform: none !important; position: static !important; visibility: visible !important; }
body.search-results ul.products li.product .product-action-wrap > :not(.md-sres-btn) { display: none !important; }
/* 2026 colors: navy focus ring on the white header (a yellow ring on white was 1.8:1); clear keyboard highlight in the suggestions panel. */
.md-search__input:focus { outline: none; border-color: #0C2B40 !important; box-shadow: 0 0 0 3px rgba(12, 43, 64, .35), 0 0 0 1px #0C2B40 !important; }
.md-sug__item.is-active, .md-sug__aud.is-active, .md-sug__all.is-active, .md-sug__recent.is-active, .md-sug__chip.is-active { box-shadow: inset 0 0 0 2px #0C2B40; }
.md-search__sug a:focus-visible, .md-search__sug button:focus-visible { outline: 3px solid #0C2B40; outline-offset: -3px; }
.md-sug__clear:focus-visible, .md-recent__clear:focus-visible { outline: 3px solid #0C2B40; outline-offset: 2px; border-radius: 4px; }
