/* ===========================
   Maaz Addons - Main Styles
   =========================== */

/* Filter Widgets Common */
.maaz-filter-widget {
    margin-bottom: 24px;
}
.maaz-filter-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

/* Price Slider */
.maaz-slider {
    margin: 12px 4px;
    height: 5px;
    background: #e0e0e0;
    border-radius: 3px;
    position: relative;
}
.maaz-slider .ui-slider-range {
    background: #e94560;
    border-radius: 3px;
    position: absolute;
    height: 100%;
}
.maaz-slider .ui-slider-handle {
    width: 18px;
    height: 18px;
    background: #e94560;
    border: 2px solid #e94560;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    top: -7px;
    margin-left: -9px;
    outline: none;
    transition: box-shadow .15s;
}
.maaz-slider .ui-slider-handle:hover,
.maaz-slider .ui-slider-handle:focus {
    box-shadow: 0 0 0 4px rgba(233,69,96,.25);
}
.maaz-price-display {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 14px;
}
.maaz-price-label { font-weight: 600; }

/* Checkbox List */
.maaz-checkbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.maaz-checkbox-list li { margin-bottom: 8px; }
.maaz-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}
.maaz-checkbox { accent-color: #e94560; width: 16px; height: 16px; cursor: pointer; }
.maaz-count { color: #999; font-size: 12px; margin-left: auto; }

/* Dropdown */
.maaz-cat-dropdown {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    min-height: 120px;
}

/* Attribute Swatches */
.maaz-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.maaz-swatch-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.maaz-swatch {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    transition: border-color .2s, transform .2s;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.maaz-swatch-label input:checked + .maaz-swatch,
.maaz-swatch:hover {
    border-color: #333;
    transform: scale(1.1);
}
.maaz-swatch-name { font-size: 11px; color: #666; }

/* Rating */
.maaz-rating-list { list-style: none; margin: 0; padding: 0; }
.maaz-rating-list li { margin-bottom: 8px; }
.maaz-rating-row {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 14px;
}
.maaz-star-filled { color: #f0ad00; }
.maaz-star-empty  { color: #ddd; }
.maaz-rating-text { font-size: 13px; color: #555; margin-left: 4px; }

/* Toggle */
.maaz-toggle-list { display: flex; flex-direction: column; gap: 12px; }
.maaz-toggle-row { display: flex; align-items: center; gap: 12px; }
.maaz-toggle-label {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}
.maaz-toggle-input { opacity: 0; width: 0; height: 0; position: absolute; }
.maaz-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: .3s;
    cursor: pointer;
}
.maaz-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
}
.maaz-toggle-input:checked + .maaz-toggle-slider { background: #e94560; }
.maaz-toggle-input:checked + .maaz-toggle-slider::before { transform: translateX(18px); }
.maaz-toggle-text { font-size: 14px; }

/* Search */
.maaz-search-wrap {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
.maaz-search-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    outline: none;
    font-size: 14px;
    background: #fff;
}
.maaz-search-btn {
    padding: 0 14px;
    background: #e94560;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background .2s;
}
.maaz-search-btn:hover { background: #c73652; }

/* Active Filters */
.maaz-active-filters { min-height: 0; }
.maaz-active-filters.has-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}
.maaz-active-filters-title {
    font-weight: 700;
    font-size: 13px;
    color: #555;
    margin-right: 4px;
}
.maaz-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e94560;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity .2s;
}
.maaz-active-tag:hover { opacity: .85; }
.maaz-active-tag .maaz-tag-remove { font-weight: 700; font-size: 15px; line-height: 1; }
.maaz-clear-all {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #e94560;
    color: #e94560;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    background: transparent;
    transition: all .2s;
    margin-left: auto;
}
.maaz-clear-all:hover { background: #e94560; color: #fff; }

/* Products Toolbar */
.maaz-products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.maaz-results-count { font-size: 14px; color: #666; }
.maaz-sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    background: #fff;
}

/* Products Grid */
.maaz-products-grid {
    display: grid;
    gap: 20px;
}
.maaz-cols-2 { grid-template-columns: repeat(2, 1fr); }
.maaz-cols-3 { grid-template-columns: repeat(3, 1fr); }
.maaz-cols-4 { grid-template-columns: repeat(4, 1fr); }
.maaz-cols-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 768px) {
    .maaz-cols-3,
    .maaz-cols-4,
    .maaz-cols-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .maaz-cols-2,
    .maaz-cols-3,
    .maaz-cols-4,
    .maaz-cols-5 { grid-template-columns: 1fr; }
}

/* Product Card */
.maaz-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: box-shadow .25s, transform .25s;
    border: 1px solid #f0f0f0;
}
.maaz-product-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    transform: translateY(-3px);
}
.maaz-badge-sale,
.maaz-badge-out {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
    color: #fff;
}
.maaz-badge-sale { background: #e94560; }
.maaz-badge-out  { background: #999; left: auto; right: 10px; }
.maaz-product-img { display: block; overflow: hidden; }
.maaz-product-img img {
    width: 100%;
    display: block;
    transition: transform .3s;
    aspect-ratio: 1/1;
    object-fit: cover;
}
.maaz-product-card:hover .maaz-product-img img { transform: scale(1.05); }
.maaz-product-info { padding: 14px; }
.maaz-product-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.4;
}
.maaz-product-title a { color: inherit; text-decoration: none; }
.maaz-product-title a:hover { color: #e94560; }
.maaz-product-rating {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}
.maaz-product-rating .star-rating { font-size: 14px; }
.maaz-product-price { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.maaz-product-price del { color: #999; font-size: 13px; margin-right: 4px; }
.maaz-product-price ins { text-decoration: none; color: #e94560; }
.maaz-product-btn .button {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 9px 16px;
    background: #e94560;
    color: #fff !important;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .2s, transform .1s;
    border: none;
    cursor: pointer;
}
.maaz-product-btn .button:hover { background: #c73652; transform: translateY(-1px); }

/* No Products */
.maaz-no-products {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Pagination */
.maaz-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
}
.maaz-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}
.maaz-page-btn:hover { background: #e94560; color: #fff; border-color: #e94560; }
.maaz-page-btn.active { background: #e94560; color: #fff; border-color: #e94560; pointer-events: none; }

/* Load More */
.maaz-loadmore-wrap { text-align: center; margin-top: 30px; }
.maaz-loadmore-btn {
    padding: 12px 40px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.maaz-loadmore-btn:hover { background: #c73652; }
.maaz-loadmore-btn:disabled { background: #ccc; cursor: not-allowed; }

/* Loading Overlay */
.maaz-loading {
    position: relative;
    pointer-events: none;
}
.maaz-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.7);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.maaz-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #e94560;
    border-radius: 50%;
    animation: maaz-spin .8s linear infinite;
    z-index: 9999;
    display: none;
}
.maaz-spinner.active { display: block; }
@keyframes maaz-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* Elementor editor placeholder */
.elementor-editor-active .maaz-active-filters:empty::before {
    content: 'Active Filters will appear here';
    color: #aaa;
    font-size: 13px;
    font-style: italic;
}
