/* Search page frame (functions/search-page.php, 9 Nov 2026): title row, shop listing header, results toolbar, 4-column grid. */
.search-template { font-family: "Noto Sans Thai", Arial, sans-serif; color: #00184a; }

/* title row for keyword searches */
.pt-srch-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin: 6px 0 14px; }
.pt-srch-h { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 900; color: #00184a; }
.pt-srch-h q { quotes: "“" "”"; color: #004aeb; }
.pt-srch-count { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px; background: #eef3ff; font-size: 13px; font-weight: 600; color: #1d3f9e; }
.pt-srch-count b { font-size: 14px; font-weight: 900; }

/* shop listing header (reached from the shops page) */
.pt-sh { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px 14px; align-items: center; margin: 6px 0 10px; padding: 16px; border-radius: 18px; background: linear-gradient(115deg, #0035b0 0%, #004aeb 55%, #3d7cff 100%); color: #fff; overflow: hidden; }
.pt-sh::before { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 70%); pointer-events: none; }
.pt-sh-logo { position: relative; flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 24, 74, .25); }
.pt-sh-logo img { max-width: 46px; max-height: 46px; object-fit: contain; }
.pt-sh-logo b { font-size: 20px; font-weight: 900; color: #004aeb; }
.pt-sh-t { position: relative; min-width: 0; }
.pt-sh-eyebrow { margin: 0 0 2px; font-size: 12.5px; font-weight: 700; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-sh h1 { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 900; color: #fff; }
.pt-sh-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.pt-sh-stats li { padding: 4px 10px; border-radius: 999px; background: rgba(0, 24, 74, .35); font-size: 12.5px; font-weight: 600; }
.pt-sh-stats b { font-size: 14px; font-weight: 900; }
.pt-sh-back { position: relative; grid-column: 1 / -1; justify-self: start; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 13px; font-weight: 700; color: #fff !important; text-decoration: none; }
.pt-sh-back:hover { background: rgba(255, 255, 255, .26); }
.pt-sh-note { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: #3c4d68; }

/* toolbar over the grid: FacetWP result count + sort */
.pt-srch-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 8px 12px; border: 1px solid #e3e9f3; border-radius: 12px; background: #fff; }
.pt-srch-bar-n { font-size: 13px; font-weight: 600; color: #57657b; }
.pt-srch-bar-n .facetwp-facet { margin: 0 !important; }
.pt-srch-bar-s .facetwp-facet { margin: 0 !important; }
.pt-srch-bar-s select { height: 34px; padding: 0 30px 0 10px; border: 1px solid #d6e2f7; border-radius: 10px; background: #fff; font: 600 13px "Noto Sans Thai", Arial, sans-serif; color: #00184a; }
.pt-srch-bar:empty { display: none; }

/* grid */
.search-results-grid .facetwp-template { gap: 12px; }
.search-results-grid .card-product-item { border-radius: 14px; }

@media (min-width: 1024px) {
	.pt-sh { grid-template-columns: 72px minmax(0, 1fr) auto; min-height: 140px; padding: 22px 26px; border-radius: 20px; }
	.pt-sh-logo { width: 72px; height: 72px; border-radius: 18px; }
	.pt-sh-logo img { max-width: 58px; max-height: 58px; }
	.pt-sh h1 { font-size: 28px; }
	.pt-sh-back { grid-column: auto; align-self: start; }
	.pt-srch-h { font-size: 28px; }
	.pt-srch-head { margin: 10px 0 18px; }
}
@media (min-width: 1280px) {
	.search-results-grid.product-results .facetwp-template { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}

/* The header offset is already on the outer <main>; the template's own 54/56px top padding left an empty band
   between the header and the breadcrumb (10 Nov 2026). */
main .search-template { padding-top: 0 !important; }
