
/* MAP Search Engine v2.0.0 */

/* Locked homepage filter */
.map-search-engine{
    width:min(1320px,calc(100% - 32px));
    margin:18px auto 20px!important;
}
.map-search-orange{
    padding:14px 16px 6px!important;
    border-radius:14px!important;
    background:linear-gradient(135deg,#ff6600 0%,#ff4f00 100%);
    box-shadow:0 12px 30px rgba(255,87,0,.18);
}
.map-search-orange>h2{
    margin:0 0 10px!important;
    color:#fff;
    font-size:21px!important;
    line-height:1.15!important;
    font-weight:900;
}
.map-search-engine .map-v7-filter{
    max-width:none;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0;
    background:transparent!important;
    box-shadow:none!important;
}
.map-search-engine .map-v7-filter:before,
.map-search-engine .map-v7-filter p,
.map-search-engine [data-status]{display:none!important}
.map-search-engine .map-v7-fields{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:9px!important;
}
.map-search-engine .map-v7-fields select{
    width:100%;
    min-height:48px!important;
    padding:0 42px 0 14px;
    border:1px solid rgba(11,31,77,.10);
    border-radius:9px;
    background:#fff;
    color:#111827;
    font-size:14px;
    font-weight:700;
    appearance:auto;
    -webkit-appearance:menulist;
    cursor:pointer;
}
.map-search-engine .map-v7-fields select:disabled{
    background:#fff3eb;
    color:#7e746e;
    cursor:not-allowed;
}
.map-search-submit{
    width:380px!important;
    max-width:calc(100% - 16px)!important;
    min-height:44px!important;
    margin:2px auto 0!important;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    border:1px solid #0b3d91!important;
    border-radius:8px!important;
    background:#0b3d91!important;
    color:#fff!important;
    font-size:14px!important;
    font-weight:900;
    box-shadow:0 6px 16px rgba(11,61,145,.20)!important;
    cursor:pointer;
}
.map-search-submit:disabled{
    border-color:#c8ced8!important;
    background:#d9dde5!important;
    color:#6b7280!important;
    box-shadow:none!important;
    cursor:not-allowed!important;
}
.map-search-glass{
    width:17px;
    height:17px;
    position:relative;
    display:inline-block;
    border:3px solid currentColor;
    border-radius:50%;
    box-sizing:border-box;
}
.map-search-glass:after{
    content:"";
    position:absolute;
    right:-7px;
    bottom:-4px;
    width:8px;
    height:3px;
    border-radius:2px;
    background:currentColor;
    transform:rotate(45deg);
    transform-origin:left center;
}

/* Results shell */
body.search-results.post-type-archive-product .woocommerce-products-header,
body.search-results.post-type-archive-product .page-title{display:none!important}

.map-results-shell,
.map-results-layout{
    width:min(1500px,calc(100% - 28px));
    margin-left:auto;
    margin-right:auto;
}
.map-results-back{margin:14px 0 9px}
.map-results-back a{
    color:#0b3d91;
    font-weight:800;
    text-decoration:none;
}
.map-current-vehicle{
    position:sticky;
    top:0;
    z-index:80;
    display:grid;
    grid-template-columns:1.4fr 1fr auto;
    align-items:center;
    gap:20px;
    margin:0 0 16px;
    padding:15px 18px;
    border:1px solid #d8e9dd;
    border-radius:12px;
    background:rgba(247,252,248,.97);
    box-shadow:0 6px 18px rgba(15,23,42,.05);
    backdrop-filter:blur(8px);
}
.map-current-vehicle-main,
.map-current-fitment{
    display:flex;
    flex-direction:column;
    gap:3px;
}
.map-current-label{
    color:#168a42;
    font-size:12px;
    font-weight:900;
}
.map-current-vehicle-main strong{
    color:#0a1f4d;
    font-size:22px;
    line-height:1.15;
}
.map-current-vehicle-main span:last-child,
.map-current-fitment span{
    color:#697386;
    font-size:12px;
}
.map-current-fitment strong{
    color:#0a1f4d;
    font-size:14px;
}
.map-change-vehicle{
    min-height:42px;
    padding:0 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid #0b3d91;
    border-radius:8px;
    background:#fff;
    color:#0b3d91;
    font-weight:900;
    text-decoration:none;
}
.map-results-title-row{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:16px;
    margin-bottom:12px;
}
.map-results-title-row h1{
    margin:0;
    color:#0a1f4d;
    font-size:clamp(24px,2vw,34px);
}
.map-results-title-row p{
    margin:4px 0 0;
    color:#30394b;
    font-weight:800;
}
.map-mobile-filter-button{
    display:none;
    min-height:40px;
    padding:0 15px;
    border:0;
    border-radius:8px;
    background:#0b3d91;
    color:#fff;
    font-weight:900;
}

.map-results-layout{
    display:grid;
    grid-template-columns:220px minmax(0,1fr);
    gap:16px;
    align-items:start;
}
.map-results-sidebar{
    position:sticky;
    top:112px;
    padding:15px;
    border:1px solid #e0e5ec;
    border-radius:12px;
    background:#fff;
    box-shadow:0 4px 16px rgba(15,23,42,.04);
}
.map-filter-close{display:none}
.map-filter-section{
    padding-bottom:14px;
    margin-bottom:14px;
    border-bottom:1px solid #edf0f4;
}
.map-filter-section h3{
    margin:0 0 9px;
    color:#0a1f4d;
    font-size:14px;
}
.map-filter-check{
    display:flex;
    align-items:center;
    gap:8px;
    color:#465066;
    font-size:13px;
    cursor:pointer;
}
.map-price-fields{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:7px;
}
.map-price-fields input,
.map-filter-section select,
.map-results-sort-form select{
    width:100%;
    min-height:38px;
    padding:0 9px;
    border:1px solid #d8dee8;
    border-radius:7px;
    background:#fff;
    color:#25304a;
}
.map-apply-filters{
    width:100%;
    min-height:40px;
    border:0;
    border-radius:8px;
    background:#ff5a00;
    color:#fff;
    font-weight:900;
    cursor:pointer;
}
.map-clear-filters{
    margin-top:9px;
    display:block;
    color:#0b3d91;
    font-size:12px;
    font-weight:800;
    text-align:center;
    text-decoration:none;
}
.map-results-products{min-width:0}
.map-results-toolbar{
    min-height:48px;
    margin-bottom:10px;
    padding:0 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border:1px solid #e0e5ec;
    border-radius:10px;
    background:#fff;
}
.map-results-toolbar>span{
    color:#0a1f4d;
    font-size:13px;
    font-weight:800;
}
.map-results-sort-form select{min-width:175px}

/* Product cards */
.map-results-products .woocommerce-result-count,
.map-results-products .woocommerce-ordering{display:none!important}

.map-results-products ul.products{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:9px!important;
    margin:0!important;
}
.map-results-products ul.products:before,
.map-results-products ul.products:after{display:none!important}
.map-results-products ul.products li.product{
    width:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:0 0 8px!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden;
    border:1px solid #e0e5ec!important;
    border-radius:10px!important;
    background:#fff!important;
    box-shadow:0 3px 13px rgba(15,23,42,.05);
    transition:transform .18s ease,box-shadow .18s ease;
}
.map-results-products ul.products li.product:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 24px rgba(15,23,42,.10);
}
.map-results-products ul.products li.product>a.woocommerce-LoopProduct-link{
    display:flex!important;
    flex-direction:column!important;
    flex:1 1 auto!important;
    text-decoration:none!important;
}
.map-results-products ul.products li.product img{
    width:100%!important;
    height:250px!important;
    margin:0!important;
    padding:3px!important;
    object-fit:contain!important;
    background:#fff!important;
    transition:transform .2s ease;
}
.map-results-products ul.products li.product:hover img{transform:scale(1.035)}
.map-card-fitment{
    align-self:flex-start;
    margin:0 9px 4px;
    padding:3px 6px;
    border:1px solid #a9dab9;
    border-radius:4px;
    background:#effaf2;
    color:#168a42;
    font-size:9px;
    font-weight:900;
}
.map-results-products .woocommerce-loop-product__title{
    min-height:37px!important;
    margin:0!important;
    padding:0 9px!important;
    color:#0a1f4d!important;
    font-size:12px!important;
    line-height:1.3!important;
    font-weight:800!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
.map-card-oem{
    min-height:18px;
    padding:2px 9px 0;
    color:#8b94a3;
    font-size:9px;
    font-weight:500;
}
.map-card-action-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:6px;
    margin-top:auto;
    padding:5px 9px 0;
}
.map-results-products .price{
    margin:0!important;
    color:#d51f11!important;
    font-size:14px!important;
    font-weight:900!important;
    white-space:nowrap;
}
.map-results-products .price del{display:none!important}
.map-results-products .price ins{text-decoration:none!important}
.map-results-products .button{
    min-width:66px!important;
    min-height:30px!important;
    margin:0!important;
    padding:0 8px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border:0!important;
    border-radius:7px!important;
    background:#ff5a00!important;
    color:#fff!important;
    font-size:10px!important;
    font-weight:900!important;
    text-decoration:none!important;
}
.map-results-products .button:hover{background:#e94f00!important}

/* Woo pagination kept as safe fallback */
.map-results-products .woocommerce-pagination{
    margin:20px 0 4px;
}
.map-results-products .woocommerce-pagination ul{
    border:0!important;
}
.map-results-products .woocommerce-pagination li{
    border:0!important;
    margin:0 3px!important;
}
.map-results-products .woocommerce-pagination a,
.map-results-products .woocommerce-pagination span{
    min-width:38px;
    min-height:38px;
    display:flex!important;
    align-items:center;
    justify-content:center;
    border-radius:7px;
    background:#f1f4f8;
    color:#0a1f4d;
}
.map-results-products .woocommerce-pagination .current{
    background:#0b3d91!important;
    color:#fff!important;
}

.map-filter-backdrop{display:none}

@media(max-width:1250px){
    .map-results-products ul.products{
        grid-template-columns:repeat(4,minmax(0,1fr))!important;
    }
    .map-results-products ul.products li.product img{height:235px!important}
}
@media(max-width:1000px){
    .map-search-engine .map-v7-fields{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
    .map-results-layout{
        grid-template-columns:190px minmax(0,1fr);
    }
    .map-results-products ul.products{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
    }
}
@media(max-width:760px){
    .map-search-engine{
        width:calc(100% - 20px);
        margin:12px auto 15px!important;
    }
    .map-search-orange{
        padding:11px 11px 7px!important;
        border-radius:12px!important;
    }
    .map-search-orange>h2{
        margin-bottom:8px!important;
        font-size:17px!important;
    }
    .map-search-engine .map-v7-fields{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:7px!important;
    }
    .map-search-engine .map-v7-fields select{
        min-height:44px!important;
        padding:0 30px 0 10px;
        font-size:12px;
    }
    .map-search-submit{
        width:100%!important;
        max-width:100%!important;
        min-height:43px!important;
        margin-top:3px!important;
    }

    .map-results-shell,
    .map-results-layout{
        width:calc(100% - 14px);
    }
    .map-current-vehicle{
        position:relative;
        top:auto;
        grid-template-columns:1fr;
        gap:9px;
        padding:12px;
    }
    .map-change-vehicle{width:100%}
    .map-results-title-row{
        align-items:center;
    }
    .map-results-title-row h1{font-size:21px}
    .map-mobile-filter-button{display:inline-flex;align-items:center}

    .map-results-layout{
        display:block;
    }
    .map-results-sidebar{
        position:fixed;
        top:0;
        left:0;
        bottom:0;
        z-index:99999;
        width:min(330px,88vw);
        overflow:auto;
        padding:50px 16px 20px;
        border-radius:0 14px 14px 0;
        transform:translateX(-105%);
        transition:transform .2s ease;
    }
    .map-results-sidebar.is-open{transform:translateX(0)}
    .map-filter-close{
        position:absolute;
        top:10px;
        right:12px;
        width:34px;
        height:34px;
        display:flex;
        align-items:center;
        justify-content:center;
        border:0;
        border-radius:50%;
        background:#f1f4f8;
        color:#0a1f4d;
        font-size:24px;
    }
    .map-filter-backdrop{
        position:fixed;
        inset:0;
        z-index:99998;
        background:rgba(7,20,46,.58);
    }
    .map-filter-backdrop.is-open{display:block}
    .map-results-toolbar{
        min-height:44px;
        padding:0 8px;
    }
    .map-results-toolbar>span{font-size:11px}
    .map-results-sort-form select{min-width:145px;font-size:11px}

    .map-results-products ul.products{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:5px!important;
    }
    .map-results-products ul.products li.product img{
        height:180px!important;
        padding:2px!important;
    }
    .map-results-products .woocommerce-loop-product__title{
        min-height:32px!important;
        padding:0 5px!important;
        font-size:10px!important;
    }
    .map-card-fitment{
        margin:0 5px 3px;
        font-size:7px;
    }
    .map-card-oem{
        min-height:15px;
        padding:1px 5px 0;
        font-size:7.5px;
    }
    .map-card-action-row{
        padding:4px 5px 0;
    }
    .map-results-products .price{font-size:11px!important}
    .map-results-products .button{
        min-width:54px!important;
        min-height:27px!important;
        padding:0 5px!important;
        font-size:8px!important;
    }
}
