/* ==========================================================
   صفحه آرشیو فروشگاه: نوار بالای لیست محصولات، مرتب‌سازی،
   تعداد در صفحه، حالت نمایش، صفحه‌بندی، بردکرامب، ویجت موجودی
   ========================================================== */

.wd-products-per-page .per-page-border { display: none; }

.wd-products-shop-view .shop-view { position: relative; }

.wd-products-shop-view .current-variation::before,
.wd-show-sidebar-btn:hover a {
    color: #fff !important;
}

#wd-widget-stock-status-3,
.shop-loop-head {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
    margin-bottom: 30px;
}

.shop-loop-head {
    background: #fff;
    padding: 18px 25px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, .04);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.wd-products-per-page .per-page-variation,
.wd-products-shop-view .shop-view {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #f5f7fa;
    transition: .2s;
    display: inline-block;
}

.wd-breadcrumbs { font-size: 14px; color: #6b7a8a; }
.wd-breadcrumbs a {
    color: #1a1a2e;
    font-weight: 500;
    transition: color .2s;
}
.wd-breadcrumbs a:hover { color: #c4161c; }
.wd-breadcrumbs .wd-delimiter { margin: 0 8px; color: #d0d7de; }

.woocommerce-result-count {
    font-size: 14px;
    color: #6b7a8a;
    background: #f5f7fa;
    padding: 4px 14px;
    border-radius: 30px;
    margin-right: 15px;
}

.wd-show-sidebar-btn {
    background: #f5f7fa;
    padding: 6px 18px;
    border-radius: 30px;
    transition: .3s;
}
.wd-show-sidebar-btn:hover { background: #c4161c; color: #fff !important; }
.wd-show-sidebar-btn a { font-size: 14px; font-weight: 600; color: #2c3e50; }

.wd-products-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
}
.wd-products-per-page .per-page-title {
    font-size: 13px;
    color: #6b7a8a;
    margin-left: 6px;
}
.wd-products-per-page .per-page-variation {
    line-height: 30px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
}
.wd-products-per-page .per-page-variation:hover {
    background: #e8ecf1;
    color: #c4161c;
}
.wd-products-per-page .per-page-variation.current-variation {
    background: #c4161c;
    color: #fff;
    box-shadow: 0 4px 12px rgba(196, 22, 28, .25);
}

.wd-products-shop-view { display: flex; gap: 4px; }
.wd-products-shop-view .shop-view:hover { background: #e8ecf1; }
.wd-products-shop-view .shop-view.current-variation {
    background: #c4161c;
    box-shadow: 0 4px 12px rgba(196, 22, 28, .25);
}
.wd-products-shop-view .shop-view::before { color: #2c3e50; }

.woocommerce-ordering select {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232c3e50' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") left 14px center no-repeat #f5f7fa;
    border: 1px solid #e8ecf1;
    border-radius: 30px;
    padding: 6px 20px 6px 38px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    outline: 0;
    transition: .3s;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.woocommerce-ordering select:focus {
    border-color: #c4161c;
    box-shadow: 0 0 0 3px rgba(196, 22, 28, .12);
}

.woocommerce-pagination .page-numbers { display: flex; gap: 6px; flex-wrap: wrap; }
.woocommerce-pagination .page-numbers li { list-style: none; }
.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span {
    display: inline-block;
    min-width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    background: #f5f7fa;
    transition: .25s;
    text-decoration: none;
    padding: 0 10px;
}
.woocommerce-pagination .page-numbers a:hover {
    background: #e8ecf1;
    color: #c4161c;
    transform: translateY(-2px);
}
.woocommerce-pagination .page-numbers .current {
    background: #c4161c;
    color: #fff;
    box-shadow: 0 4px 14px rgba(196, 22, 28, .25);
}
.woocommerce-pagination .page-numbers .next,
.woocommerce-pagination .page-numbers .prev {
    background: 0 0;
    font-size: 18px;
    color: #2c3e50;
    padding: 0 8px;
}
#wd-widget-stock-status-3 ul li a:hover .count,
.woocommerce-pagination .page-numbers .next:hover,
.woocommerce-pagination .page-numbers .prev:hover {
    background: #c4161c;
    color: #fff;
}

/* ---- ویجت وضعیت موجودی (سایدبار) ---- */
#wd-widget-stock-status-3 {
    background: #fff;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, .04);
    transition: .3s;
}
#wd-widget-stock-status-3:hover { box-shadow: 0 8px 30px rgba(0, 0, 0, .07); }
#wd-widget-stock-status-3 .widget-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    padding-bottom: 14px !important;
    margin-bottom: 16px !important;
    border-bottom: 2.5px solid #c4161c !important;
    display: inline-block !important;
    position: relative !important;
}
#wd-widget-stock-status-3 .widget-title::after {
    content: '';
    position: absolute;
    bottom: -2.5px;
    right: 0;
    width: 40%;
    height: 2.5px;
    background: #c4161c;
    border-radius: 10px;
    transition: width .3s;
}
#wd-widget-stock-status-3:hover .widget-title::after { width: 100%; }
#wd-widget-stock-status-3 ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
#wd-widget-stock-status-3 ul li {
    margin-bottom: 6px !important;
    padding: 0 !important;
}
#wd-widget-stock-status-3 ul li a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #3d4a5c !important;
    background: #f8f9fb !important;
    transition: .25s !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
}
#wd-widget-stock-status-3 ul li a:hover {
    background: rgba(196, 22, 28, .06) !important;
    color: #c4161c !important;
    border-color: rgba(196, 22, 28, .12) !important;
    transform: translateX(-4px) !important;
}
#wd-widget-stock-status-3 ul li a::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: .3s;
}
#wd-widget-stock-status-3 ul li:first-child a::before {
    background: #f39c12;
    box-shadow: 0 0 0 2px rgba(243, 156, 18, .15);
}
#wd-widget-stock-status-3 ul li:last-child a::before {
    background: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, .15);
}
#wd-widget-stock-status-3 ul li a:hover::before { transform: scale(1.2); }
#wd-widget-stock-status-3 ul li a .count {
    background: #eef1f5;
    color: #6b7a8a;
    padding: 0 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    margin-right: auto;
    transition: .3s;
}

@media (max-width: 768px) {
    .shop-loop-head {
        padding: 14px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .wd-shop-tools { flex-wrap: wrap; gap: 8px; justify-content: center; }
    .wd-products-per-page .per-page-variation { width: 26px; height: 26px; line-height: 26px; font-size: 12px; }
    .woocommerce-ordering select { font-size: 13px; padding: 4px 16px 4px 32px; background-position: left 10px center; }
    .woocommerce-pagination .page-numbers a,
    .woocommerce-pagination .page-numbers span { min-width: 34px; height: 34px; line-height: 34px; font-size: 13px; border-radius: 8px; }
    #wd-widget-stock-status-3 { padding: 16px 18px; border-radius: 12px; }
    #wd-widget-stock-status-3 .widget-title { font-size: 15px !important; }
    #wd-widget-stock-status-3 ul li a { font-size: 13px !important; padding: 6px 12px !important; }
}
