/* Product listing pages (All Products, category and sub-category listings) */

.category-filter-section,
.shop-section {
    --pl-accent: var(--theme, #7000fe);
    --pl-accent-soft: #f3ebff;
    --pl-dark: var(--header, #09052f);
    --pl-text: #555b6d;
    --pl-muted: #8a8fa3;
    --pl-line: #e8eaf1;
    --pl-soft: #f7f8fb;
}

/* ---------- Filter + search toolbar ---------- */

.category-filter-section {
    padding: 30px 0 0;
    background: transparent;
}

.category-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid var(--pl-line);
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(9, 5, 47, .07);
}

.category-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-right {
    width: 300px;
    flex-shrink: 0;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--pl-soft);
    border: 1px solid var(--pl-line);
    color: var(--pl-dark);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: background .2s, border-color .2s, color .2s;
}

.category-btn:hover {
    background: var(--pl-accent-soft);
    border-color: var(--pl-accent);
    color: var(--pl-accent);
}

.category-btn.active {
    background: var(--pl-dark);
    border-color: var(--pl-dark);
    color: #fff;
}

.category-btn:focus-visible {
    outline: 2px solid var(--pl-accent);
    outline-offset: 2px;
}

/* Search */
.category-search {
    position: relative;
}

.category-search .np-search-ico {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--pl-muted);
    pointer-events: none;
}

.category-search input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 42px;
    border: 1px solid var(--pl-line);
    border-radius: 10px;
    outline: none;
    background: var(--pl-soft);
    color: var(--pl-dark) !important;
    font-size: 14px;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.category-search input::placeholder {
    color: var(--pl-muted) !important;
    opacity: 1;
}

.category-search input:focus {
    background: #fff;
    border-color: var(--pl-accent);
    box-shadow: 0 0 0 3px var(--pl-accent-soft);
}

.category-search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.category-search .np-search-clear {
    display: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #e9eaf0;
    color: var(--pl-text);
    font-size: 12px;
}

.category-search .np-search-clear:hover {
    background: var(--pl-dark);
    color: #fff;
}

.category-search.has-value .np-search-clear {
    display: block;
}

/* ---------- Result bar ---------- */

.shop-section.section-padding {
    padding-top: 28px;
}

.np-list-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 22px;
    margin-bottom: 22px;
    font-size: 14px;
    color: var(--pl-text);
}

.np-list-bar:not(:empty)::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--pl-accent);
}

.np-list-bar strong {
    color: var(--pl-dark);
}

/* ---------- Product grid ---------- */

#product-list {
    row-gap: 24px;
    transition: opacity .2s ease;
}

#product-list.is-loading {
    opacity: .45;
    pointer-events: none;
}

.np-list-col {
    display: flex;
}

.np-list-col .shop-items {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--pl-line);
    border-radius: 14px;
    text-align: left;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.np-list-col .shop-items:hover {
    transform: translateY(-4px);
    border-color: #d9cbff;
    box-shadow: 0 16px 36px rgba(9, 5, 47, .10);
}

.np-list-col .shop-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: var(--pl-soft);
}

.np-list-col .shop-image > a {
    display: block;
    width: 100%;
    height: 100%;
}

.np-list-col .shop-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .4s ease;
}

.np-list-col .shop-items:hover .shop-image img {
    transform: scale(1.05);
}

.np-list-col .shop-content {
    flex: 1;
    margin-top: 14px;
    padding: 0 4px;
}

.np-list-cat {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--pl-accent-soft);
    color: var(--pl-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.np-list-col .shop-content h5 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
}

.np-list-col .shop-content h5 a {
    color: var(--pl-dark);
}

/* Whole card is clickable through the title link */
.np-list-col .shop-content h5 a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 14px;
}

.np-list-col .shop-items:hover .shop-content h5 a {
    color: var(--pl-accent);
}

.np-list-col .shop-content h5 a:focus-visible::after {
    outline: 2px solid var(--pl-accent);
    outline-offset: 2px;
}

.np-list-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 4px 2px;
    padding-top: 12px;
    border-top: 1px solid var(--pl-line);
    color: var(--pl-dark);
    font-size: 14px;
    font-weight: 700;
    transition: color .2s;
}

.np-list-cta i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--pl-soft);
    transition: background .2s, color .2s, transform .2s;
}

.np-list-col .shop-items:hover .np-list-cta {
    color: var(--pl-accent);
}

.np-list-col .shop-items:hover .np-list-cta i {
    background: var(--pl-accent);
    color: #fff;
    transform: translateX(3px);
}

.np-list-col .np-offer-corner {
    z-index: 2;
}

/* ---------- Empty / footer ---------- */

.np-list-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--pl-text);
    background: #fff;
    border: 1px dashed var(--pl-line);
    border-radius: 14px;
}

.np-list-empty i {
    display: block;
    margin-bottom: 12px;
    font-size: 40px;
    color: var(--pl-accent);
}

.np-list-footer {
    margin-top: 40px;
    text-align: center;
}

.np-list-footer .np-loader {
    display: none;
    width: 34px;
    height: 34px;
    margin: 0 auto;
    border: 3px solid var(--pl-line);
    border-top-color: var(--pl-accent);
    border-radius: 50%;
    animation: npSpin .8s linear infinite;
}

.np-list-footer.is-loading .np-loader { display: block; }
.np-list-footer.is-loading .np-load-more { display: none; }

.np-load-more {
    height: 46px;
    padding: 0 30px;
    border-radius: 10px;
    border: 1px solid var(--pl-dark);
    background: #fff;
    color: var(--pl-dark);
    font-weight: 700;
    transition: background .2s, color .2s;
}

.np-load-more:hover {
    background: var(--pl-dark);
    color: #fff;
}

.np-list-end {
    margin: 0;
    font-size: 14px;
    color: var(--pl-muted);
}

@keyframes npSpin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .category-top {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 14px;
    }

    .category-right {
        width: 100%;
        order: -1;
    }

    .category-left {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .category-left::-webkit-scrollbar { display: none; }
}

@media (max-width: 575px) {
    .np-list-col .shop-items {
        padding: 8px;
        border-radius: 12px;
    }

    .np-list-col .shop-content {
        margin-top: 10px;
        padding: 0 2px;
    }

    .np-list-col .shop-content h5 {
        font-size: 14px;
    }

    .np-list-cat {
        font-size: 10px;
    }

    .np-list-cta {
        margin: 10px 2px 0;
        padding-top: 8px;
        font-size: 12px;
    }

    .np-list-cta i {
        width: 24px;
        height: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .np-list-col .shop-items,
    .np-list-col .shop-image img,
    .np-list-cta i {
        transition: none;
    }

    .np-list-col .shop-items:hover,
    .np-list-col .shop-items:hover .shop-image img {
        transform: none;
    }
}
