.category-filter-shell{
    margin:14px 14px 8px;
    background:#fff;
    border-radius:16px;
    padding:12px;
    box-shadow:0 6px 20px rgba(0,0,0,.06);
    border:1px solid var(--card-border);
}

.category-filter-form{
    display:block;
}

.category-filter-row{
    display:flex;
    gap:8px;
}

.category-filter-select{
    width:100%;
    height:46px;
    border:1px solid var(--card-border);
    border-radius:14px;
    padding:0 12px;
    font-size:14px;
    font-weight:800;
    outline:none;
    background:#fff;
    color:#111827;
}

.category-total-row{
    margin:10px 14px 0;
    display:flex;
    gap:10px;
    align-items:stretch;
}

.selected-category-title,
.total-listings-box{
    flex:1;
    padding:12px 14px;
    background:var(--brand-light);
    color:var(--brand);
    border-radius:14px;
    font-weight:1000;
    font-size:15px;
    border:1px solid var(--card-border);
}

.total-listings-box{
    text-align:right;
}

.listing-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
    margin:14px;
    scroll-behavior:smooth;
    align-items:stretch;
}

.card{
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 8px 24px rgba(0,0,0,.08);
    display:flex;
    flex-direction:column;
    position:relative;
    border:1px solid var(--card-border);
}

.seller-directory-card{
    width:100%;
    min-width:0;
    height:100%;
    border-radius:18px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    background:#fff;
}

.seller-directory-card.featured{
    border:2px solid #f59e0b;
    box-shadow:
        0 10px 28px rgba(0,0,0,.08),
        0 0 0 2px rgba(245,158,11,.08);
}

/* Seller Header */

.seller-fb-head{
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 14px;
    min-height:78px;
    text-decoration:none;
    color:inherit;
    background:#fff;
    flex-shrink:0;
}

.seller-fb-photo{
    display:block;
    flex:0 0 54px;
    width:54px;
    height:54px;
    min-width:54px;
    max-width:54px;
    max-height:54px;
    aspect-ratio:1 / 1;
    border-radius:50%;
    object-fit:cover;
    object-position:center;
    border:2px solid var(--brand-light);
    background:#f1f5f9;
    overflow:hidden;
}

.seller-fb-info{
    flex:1;
    min-width:0;
    overflow:hidden;
}

.seller-fb-name{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
    min-width:0;
    font-size:16px;
    font-weight:1000;
    color:#111827;
    line-height:1.2;
    overflow-wrap:anywhere;
}

.seller-fb-name .verified{
    color:var(--brand);
    display:inline-flex;
    flex:0 0 auto;
}

.seller-fb-name .svg-icon{
    width:17px;
    height:17px;
}

.seller-fb-meta{
    margin-top:4px;
    display:flex;
    align-items:center;
    gap:4px;
    max-width:100%;
    color:#64748b;
    font-size:12px;
    font-weight:800;
    line-height:1.35;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.seller-fb-meta .svg-icon{
    width:13px;
    height:13px;
    min-width:13px;
    color:var(--brand);
}

/* Listing Preview */

.seller-preview-box{
    display:grid;
    grid-template-columns:minmax(120px,42%) minmax(0,58%);
    width:100%;
    min-width:0;
    align-items:stretch;
    text-decoration:none;
    color:inherit;
    border-top:1px solid var(--card-border);
    background:#fff;
    overflow:hidden;
}

.seller-preview-img{
    position:relative;
    width:100%;
    min-height:145px;
    aspect-ratio:1 / 1;
    overflow:hidden;
    background:#f1f5f9;
}

.seller-preview-img img{
    display:block;
    width:100%;
    height:100%;
    min-height:145px;
    object-fit:cover;
    object-position:center;
    background:#f1f5f9;
}

.seller-preview-badge{
    position:absolute;
    top:8px;
    right:8px;
    left:auto;
    display:flex;
    align-items:center;
    gap:4px;
    max-width:calc(100% - 16px);
    padding:5px 9px;
    border-radius:999px;
    background:#f59e0b;
    color:#fff;
    font-size:10px;
    font-weight:900;
    line-height:1;
    box-shadow:0 8px 18px rgba(245,158,11,.25);
    z-index:5;
}

.seller-preview-badge .svg-icon{
    width:12px;
    height:12px;
    min-width:12px;
}

.seller-preview-info{
    padding:12px 11px;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    min-width:0;
    overflow:hidden;
}

.seller-preview-title{
    min-height:38px;
    font-size:14px;
    font-weight:1000;
    color:#111827;
    line-height:1.35;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    overflow-wrap:anywhere;
    word-break:break-word;
}

.seller-preview-price{
    margin-top:7px;
    color:var(--brand);
    font-size:17px;
    font-weight:1000;
    line-height:1.25;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.seller-preview-location{
    margin-top:8px;
    display:flex;
    align-items:flex-start;
    gap:5px;
    min-width:0;
    color:#64748b;
    font-size:12px;
    font-weight:800;
    line-height:1.4;
    overflow:hidden;
}

.seller-preview-location .svg-icon{
    width:13px;
    height:13px;
    min-width:13px;
    margin-top:2px;
    color:var(--brand);
}

.seller-preview-location span{
    min-width:0;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    overflow:hidden;
    text-overflow:ellipsis;
    overflow-wrap:anywhere;
    word-break:break-word;
}

/* Bottom Buttons */

.mobile-actions,
.seller-directory-actions{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    width:100%;
    margin-top:auto;
    padding:10px;
    border-top:1px solid var(--card-border);
    background:var(--brand-soft);
    flex-shrink:0;
}

.mobile-actions a,
.seller-directory-actions a{
    min-width:0;
    min-height:38px;
    padding:0 6px;
    border-radius:12px;
    font-weight:900;
    white-space:nowrap;
    text-decoration:none;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    font-size:12px;
    text-align:center;
    overflow:hidden;
    text-overflow:ellipsis;
    transition:transform .15s ease;
}

.mobile-actions a:active,
.seller-directory-actions a:active{
    transform:scale(.97);
}

.mobile-actions .svg-icon,
.seller-directory-actions .svg-icon{
    width:16px;
    height:16px;
    min-width:16px;
}

.call{
    background:var(--brand-light);
    color:var(--brand);
}

.wa{
    background:#e8f5e9;
    color:#1b5e20;
}

.view{
    background:var(--brand-light);
    color:var(--brand);
}

.boost-plan{
    background:var(--brand);
    color:#fff;
}

.seller-directory-actions .share-btn{
    grid-column:auto !important;
}

.listing-empty{
    margin:14px;
    padding:20px;
    background:#fff;
    border-radius:16px;
    font-weight:900;
}

.listing-load-state{
    margin:10px 14px 18px;
    text-align:center;
    font-weight:800;
    color:#667085;
}

.listings-flash-wrap{
    margin:14px;
}

.listings-flash{
    padding:14px;
    border-radius:14px;
    font-weight:800;
    border:1px solid;
}

.flash-success{
    background:#ecfdf3;
    color:#166534;
    border-color:#bbf7d0;
}

.flash-error{
    background:#fff1f2;
    color:#b91c1c;
    border-color:#fecdd3;
}

@media (min-width:640px){
    .listing-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (min-width:1024px){
    .listing-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

@media(max-width:520px){

    .category-total-row{
        gap:8px;
    }

    .selected-category-title,
    .total-listings-box{
        font-size:13px;
        padding:10px;
    }

    .seller-fb-head{
        min-height:72px;
        padding:11px 12px;
        gap:10px;
    }

    .seller-fb-photo{
        flex-basis:48px;
        width:48px;
        height:48px;
        min-width:48px;
        max-width:48px;
        max-height:48px;
    }

    .seller-fb-name{
        font-size:15px;
    }

    .seller-preview-box{
        grid-template-columns:minmax(115px,42%) minmax(0,58%);
    }

    .seller-preview-img,
    .seller-preview-img img{
        min-height:140px;
    }

    .seller-preview-info{
        padding:10px 9px;
    }

    .seller-preview-title{
        min-height:37px;
        font-size:14px;
    }

    .seller-preview-price{
        font-size:16px;
    }

    .seller-preview-location{
        font-size:11.5px;
    }

    .mobile-actions,
    .seller-directory-actions{
        gap:6px;
        padding:9px;
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .mobile-actions a,
    .seller-directory-actions a{
        min-height:36px;
        padding:0 4px;
        font-size:11px;
    }

    .seller-directory-actions .share-btn{
        grid-column:auto !important;
    }
}

@media(max-width:380px){

    .listing-grid{
        margin-left:10px;
        margin-right:10px;
    }

    .seller-preview-box{
        grid-template-columns:minmax(105px,40%) minmax(0,60%);
    }

    .seller-preview-img,
    .seller-preview-img img{
        min-height:132px;
    }

    .seller-preview-info{
        padding:9px 8px;
    }

    .seller-preview-title{
        min-height:35px;
        font-size:13px;
    }

    .seller-preview-price{
        font-size:15px;
    }

    .seller-preview-location{
        font-size:11px;
    }

    .seller-preview-location span{
        -webkit-line-clamp:3;
    }

    .seller-directory-actions a{
        font-size:10px;
        gap:3px;
    }

    .seller-directory-actions .svg-icon{
        width:14px;
        height:14px;
        min-width:14px;
    }
}