/* ShopMaster Pro styles */
.shopmaster-pro-wrap{ display:flex; gap:20px; align-items:flex-start; }
.sm-sidebar{ width:300px; flex:0 0 300px; background:#fff; padding:14px; border:1px solid #eee; border-radius:8px; }
.sm-main{ flex:1; }
.sm-filter{ margin-bottom:14px; }
.sm-heading{ margin:0 0 8px 0; font-size:14px; font-weight:600; }
.sm-search-input, .sm-price-inputs input, .sm-sort-select{ width:100%; padding:10px; border:1px solid #ddd; border-radius:6px; box-sizing:border-box; }
.sm-price-inputs{ display:flex; gap:8px; }
.sm-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap:18px; }
.sm-product-card{ border:1px solid #eee; padding:12px; border-radius:8px; background:#fff; display:flex; flex-direction:column; gap:10px; }
.sm-thumb img{ max-width:100%; height:auto; display:block; }
.sm-actions{ margin-top:8px; }
.sm-loadmore-wrap{ text-align:center; margin-top:25px; }
.sm-loadmore-btn{ padding:10px 16px; background:#0073aa; color:white; border:none; border-radius:8px; cursor:pointer; }
.sm-loading-blur{ position:relative; }
.sm-loading-blur::after{ content:''; position:absolute; inset:0; background:rgba(255,255,255,0.6); backdrop-filter: blur(3px); z-index:10; }
.sm-spinner{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:44px; height:44px; border-radius:50%; border:4px solid rgba(0,0,0,0.08); border-top-color:#0073aa; animation:sm-spin 1s linear infinite; z-index:20; }
@keyframes sm-spin{ to{ transform: rotate(360deg); } }
@media (max-width:960px){ .shopmaster-pro-wrap{ flex-direction:column; } .sm-sidebar{ width:100%; } }
.sm-toolbar{display: flex;justify-content: flex-end; margin-bottom: 14px; gap: 10px;align-items: center;}
.sm-actions a{padding: 12px 24px !important;}
.sm-price{font-weight: 700;text-align: center;}
.sm-tag-badges{
    position: absolute;
    left: 8px;
    top: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 7px;
    font-size: 14px;
    border-radius: 3px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    font-weight: bold;}
.sm-tags a{
    color: #ffffff;
    text-decoration: none;
}
/* --- Adjustments for uniform grid/cards --- */
.sm-grid-wrap { position: relative; } /* so loader can cover the whole wrap */
.sm-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap:18px; align-items:start; }
.sm-product-card--uniform { display:flex; flex-direction:column; height:100%; min-height:360px; box-sizing:border-box; }
.sm-thumb { flex:0 0 auto; position: relative;}
.sm-thumb img { display:block; width:100%; height:220px; object-fit:cover; border-radius:6px; }
.sm-info { flex:1 1 auto; display:flex; flex-direction:column; gap:8px; }
.sm-title { font-size:1.1rem; line-height:1.2; margin:0; color:#353535; font-weight:700; flex-grow: 1;margin: .5rem 0;}
/* clamp title to 3 lines */
.sm-title a { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; text-overflow:ellipsis; color:#353535;font-weight: 500;text-align: center;}
/* price and meta at bottom */
.sm-meta { margin-top:auto; color:#666; font-size:13px; text-align: center;}
/* make add-to-cart button aligned left and fixed width */
.sm-actions { margin-top:12px; text-align: center;}
.sm-actions .button { display:inline-block; background:#e64d00; color:#fff; padding:10px 14px; border-radius:6px; text-decoration:none; }

/* Sidebar checkboxes vertical spacing */
.sm-cats-list label, .sm-tags-list label { display:block; margin-bottom:6px; font-size:14px; cursor:pointer; }
.sm-cats-list small, .sm-tags-list small { color:#999; margin-left:6px; font-weight:600; }

/* Ensure loader covers grid-wrap not just grid */
.sm-grid-wrap.sm-loading-blur::after { content:''; position:absolute; inset:0; background:rgba(255,255,255,0.6); backdrop-filter: blur(3px); z-index:50; }
.sm-grid-wrap .sm-spinner{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:60; }

/* mobile tweaks */
@media (max-width:900px){
    .sm-product-card--uniform { min-height: auto; }
    .sm-thumb img { height:160px; }
}

