/* Stable layouts for shop, series archives and the dedicated product search page. */
.site-main>.content-wrap,.site-main>.bg-search-page{width:100%;max-width:1320px;min-width:0;margin-right:auto;margin-left:auto}
.products>li.product{position:relative!important;display:flex!important;flex-direction:column!important;float:none!important;clear:none!important;min-width:0!important;margin:0!important}
.products>li.product>.bg-product-card-link{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;width:100%!important}
.woocommerce .content-wrap .products,.site-main>.bg-search-page .products{width:100%!important;min-width:0!important;align-items:stretch!important}
.woocommerce .content-wrap ul.products>li.product,.site-main>.bg-search-page ul.products>li.product{min-width:0!important;max-width:none!important;transform:none!important}
/* Search must never inherit a flex/grid site shell.  The page has direct body children
   (announcement, header, main and footer), so a flex body would put them side by side. */
html body.search{display:block!important;width:100%!important;min-width:0!important}
/* Search must never constrain the site shell. Only its inner content receives a readable width. */
body.search .site-main{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;overflow-x:clip!important}
body.search .site-main>.bg-search-page{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important}
body.search .bg-search-hero,body.search .bg-search-summary,body.search .bg-search-products,body.search .bg-search-empty,body.search .navigation.pagination{max-width:1260px;margin-right:auto!important;margin-left:auto!important}
body.search .bg-search-summary{margin-bottom:18px!important}
body.search .bg-search-products>ul.products{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-auto-flow:row!important;width:100%!important;margin:0!important;padding:0!important;gap:18px!important}
body.search .bg-search-products>ul.products>li.product,.woocommerce .content-wrap>ul.products>li.product{grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;order:initial!important;inset:auto!important;align-self:stretch!important}
/* WooCommerce assigns its own font declarations to prices and controls.  Keep
   Persian text and the currency/amount spacing consistent with the theme. */
/* The search template uses only Vazirmatn.  Do not fall back to the display
   font here: it has different Persian metrics and causes cards to reflow. */
body.search .bg-search-page,body.search .bg-search-page button,body.search .bg-search-page input,body.search .bg-search-page .woocommerce-loop-product__title,body.search .bg-search-page .price,body.search .bg-search-page .amount,body.search .bg-search-page .woocommerce-Price-currencySymbol,body.search .bg-search-page .page-numbers{font-family:Vazirmatn,Tahoma,Arial,sans-serif!important;font-synthesis:none}
body.search .bg-search-page .price{display:inline-block!important;direction:rtl;line-height:1.55!important;white-space:nowrap}
body.search .bg-search-page .woocommerce-Price-amount.amount{display:inline-flex!important;align-items:baseline;gap:.38em;direction:rtl;font-variant-numeric:tabular-nums}
body.search .bg-search-page .woocommerce-Price-currencySymbol{order:2;font-size:.9em!important;font-weight:700}
.bg-search-page{padding:16px 0 58px}
.bg-search-hero{max-width:840px;margin:4px auto 24px;padding:30px;background:linear-gradient(135deg,#fff 0%,#f1f6ff 100%);border:1px solid #dbe6f4;border-radius:18px;text-align:center}
.bg-search-kicker{display:inline-block;padding:4px 10px;border-radius:999px;background:#dceaff;color:#205497;font-size:11px;font-weight:700}
.bg-search-hero h1{margin:10px 0 5px;color:#183b70;font-size:28px;line-height:1.55}
.bg-search-hero p{margin:0 0 18px;color:#637b98;font-size:12px}
.bg-search-refine{display:flex;gap:8px;max-width:610px;margin:auto;padding:6px;background:#fff;border:1px solid #cddcf0;border-radius:11px;box-shadow:0 7px 20px #204d8510}
.bg-search-refine input{flex:1;min-width:0;border:0;outline:0;background:transparent;padding:8px 10px;color:#183b66;font:13px var(--site-font)}
.bg-search-refine button{flex:none;padding:9px 18px;background:var(--blue);color:#fff}
.bg-search-summary{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 18px;padding:12px 15px;background:#fff;border:1px solid var(--line);border-radius:11px;color:#294f7b;font-size:12px}
.bg-search-summary a{color:#1551a7;font-weight:700}
.bg-search-products{min-width:0}
.bg-search-empty{max-width:720px;margin:25px auto 0;padding:58px 20px;background:#fff;border:1px solid var(--line);border-radius:16px;text-align:center}
.bg-search-empty>span{display:grid;place-items:center;width:50px;height:50px;margin:0 auto 10px;border-radius:50%;background:#edf4ff;color:#1b56a1;font:38px/1 Arial}
.bg-search-empty h2{margin:0 0 5px;color:#193e72;font-size:21px}
.bg-search-empty p{margin:0 0 18px;color:#6d819a;font-size:12px}
@media(max-width:650px){.site-main>.content-wrap,.site-main>.bg-search-page{max-width:none}.bg-search-page{padding:5px 0 35px}.bg-search-hero{margin:0 0 16px;padding:20px 13px;border-radius:13px}.bg-search-hero h1{font-size:20px}.bg-search-hero p{font-size:11px}.bg-search-refine{gap:5px;padding:4px;border-radius:9px}.bg-search-refine input{padding:7px 6px;font-size:11px}.bg-search-refine button{padding:8px 11px;font-size:10px}.bg-search-summary{margin-bottom:12px;padding:10px;font-size:10px}.bg-search-empty{margin-top:14px;padding:38px 14px}.bg-search-empty h2{font-size:18px}.bg-search-empty p{font-size:11px}}
@media(max-width:1000px){body.search .bg-search-products>ul.products{grid-template-columns:repeat(3,minmax(0,1fr))!important}}@media(max-width:650px){body.search .site-main{padding:14px!important}body.search .bg-search-products>ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}}
