/* 搜尋功能設定：品牌紅色、圓角欄位及鍵盤焦點 */
.hh-search { display:flex; align-items:stretch; width:100%; max-width:320px; min-height:42px; margin:0; border:1px solid #d2d2d2; border-radius:24px; overflow:hidden; background:#fff; box-sizing:border-box; }
.hh-search input[type="search"] { flex:1; min-width:0; width:0; margin:0; padding:10px 16px; border:0; border-radius:0; background:transparent; color:#444; font-size:16px; line-height:22px; box-sizing:border-box; }
.hh-search button { flex:0 0 48px; padding:0; border:0; border-radius:0; background:#ce2638; color:#fff; cursor:pointer; font-size:19px; }
.hh-search button:hover { background:#a91c2b; }
.hh-search:focus-within { outline:2px solid #ce2638; outline-offset:3px; }
.hh-search-row { display:flex; justify-content:flex-end; width:100%; margin:0 0 12px; }
.hh-search-global { position:absolute; right:max(24px, calc((100% - 1200px)/2)); top:30px; width:300px; }
.hh-search-message:empty { display:none; }
@media (min-width:992px) and (max-width:1440px) { .hh-search-global { top:17px; width:260px; } }
@media (max-width:991px) {
    .classy-navbar .hh-search-global { position:relative; top:auto; right:auto; width:100%; max-width:none; order:5; flex-basis:100%; margin:8px 16px 10px 0; }
    .classy-navbar:has(.hh-search-global) { height:auto; min-height:128px; overflow:visible; }
    .hh-search-row { margin-top:12px; }
    .hh-search-section { max-width:100%; }
}

/* 圖②：分類麵包屑右側 */
@media (min-width:768px) {
    .page_p2 .hh-search-row { float:right; width:290px; margin:-10px 0 0 16px; }
    .page_p2 .hr_green { clear:both; padding-top:10px; }
}

/* 商品價格區間：分類頁與搜尋頁共用，區間定義見 hh_product_helper.php。 */
.hh-product-filter .hh-search { max-width:520px; }
.hh-product-filter .hh-search select { flex:0 0 190px; max-width:190px; min-width:0; margin:0; padding:8px 10px; border:0; border-left:1px solid #ddd; border-radius:0; background:#fff; color:#555; font-size:14px; }
.hh-product-filter .hh-search input[type="search"] { min-width:100px; }
.hh-product-meta { padding:10px 2px 0; }
.hh-product-meta .hh-product-price { margin:0 0 4px; color:#ce2638; font-size:17px; font-weight:600; line-height:1.5; }
.hh-product-spec-summary { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:40px; max-height:40px; margin:0; color:#666; font-size:14px; line-height:20px; overflow-wrap:anywhere; }
.hh-product-price:empty, .hh-product-spec-summary:empty { display:none; }
.hh-product-price-detail { margin:12px 0 18px; color:#ce2638; font-size:26px; font-weight:600; }
.hh-product-spec { padding:18px; margin:0 0 20px; border:1px solid #e5e5e5; border-radius:8px; background:#fafafa; overflow-wrap:anywhere; }
.hh-product-spec h4 { margin:0 0 10px; font-size:18px; color:#555; }
.hh-product-spec .editor { overflow-x:auto; }
.hh-product-spec img { max-width:100%; height:auto; }
.hh-product-detail .block_absolute { position:static; margin-top:20px; }
@media (min-width:768px) {
    .page_p2 .hh-search-row.hh-product-filter { width:440px; }
}
@media (max-width:575px) {
    .hh-product-filter .hh-search { flex-wrap:wrap; border-radius:12px; }
    .hh-product-filter .hh-search input[type="search"] { flex:1 0 100%; min-height:42px; }
    .hh-product-filter .hh-search select { flex:1 1 auto; max-width:none; border-left:0; border-top:1px solid #eee; min-height:42px; }
    .hh-product-filter .hh-search button { min-height:42px; }
}

/* 手機頁首加入搜尋後，保留固定頁首所需空間。 */
@media (max-width:991px) {
    body:has(.hh-search-global) .top-all-banner { padding-top:156px; }
    body:has(.hh-search-global) .top-all { padding-top:128px; }
}

/* 每規格價格表與選擇器 */
.hh-variant-prices { width:100%; margin:0 0 16px; border-collapse:collapse; background:#fff; }
.hh-variant-prices th, .hh-variant-prices td { padding:10px 12px; border:1px solid #ddd; text-align:left; overflow-wrap:anywhere; }
.hh-variant-prices th { background:#f2f2f2; }
.hh-variant-prices td:last-child { color:#ce2638; }
#hh-product-variant { display:block; width:100%; max-width:100%; margin:8px 0 0; padding:12px; border:1px solid #bbb; border-radius:6px; background:#fff; color:#444; font-size:16px; }
