/* =====================================================
   ALL PRODUCTS PAGE — COMPLETE RESPONSIVE CSS
===================================================== */
.shop-container {
    width: min(1380px, calc(100% - 32px));
    max-width: 1380px;
    margin: auto
}

.breadcrumb-section {
    padding: 22px 0;
    border-bottom: 1px solid #e5e7eb;
    background: radial-gradient(circle at top right, rgba(13, 110, 253, .10), transparent 35%), #fff
}

.breadcrumb-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px
}

.breadcrumb-kicker,
.offcanvas-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--primary, #0d6efd);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em
}

.page-title {
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900
}

.page-subtitle {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px
}

.breadcrumb-item a {
    color: var(--primary, #0d6efd);
    text-decoration: none
}

.shop-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
    align-items: start
}

.products-area{
    min-width:0;
    width:100%;
}

.product-grid{
    width:100%;
}

.desktop-filter {
    position: sticky;
    top: 84px
}

.filter-card {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06)
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    margin: 0;
    padding: 14px 16px 12px;
    border-bottom: 1px solid #eef2f7;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase
}

.filter-title:after {
    content: '';
    position: absolute;
    left: 16px;
    bottom: -1px;
    width: 55px;
    height: 2px;
    background: var(--orange, #ff7a00)
}

.filter-body {
    padding: 14px 16px
}

.filter-scroll {
    max-height: 230px;
    overflow: auto;
    scrollbar-width: thin
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer
}

.filter-check:last-child {
    margin-bottom: 0
}

.filter-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary, #0d6efd)
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05)
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px
}

.toolbar-count {
    color: #111827;
    font-size: 13px;
    font-weight: 900
}

.active-filter-text {
    margin-top: 2px;
    color: #16a34a;
    font-size: 11px;
    font-weight: 800
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 9px
}

.sort-form label {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap
}

.sort-form select {
    min-width: 175px
}

.mobile-filter-btn {
    border: 1px solid var(--orange, #ff7a00);
    color: var(--orange, #ff7a00);
    background: #fff;
    font-weight: 900
}

.mobile-filter-btn:hover {
    background: var(--orange, #ff7a00);
    color: #fff
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    transition: .25s ease
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .11)
}

.product-img-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    padding: 14px;
    overflow: hidden;
    background: linear-gradient(145deg, #f8fafc, #fff)
}

.product-img-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: .3s ease
}

.product-card:hover .product-img-box img {
    transform: scale(1.045)
}

.wishlist-btn-top {
    position: absolute;
    top: 11px;
    right: 11px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 37px;
    height: 37px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 5px 16px rgba(15, 23, 42, .13);
    transition: .2s
}

.wishlist-btn-top:hover {
    transform: scale(1.08)
}

.badge-tag {
    position: absolute;
    top: 11px;
    left: 11px;
    z-index: 7;
    max-width: 110px;
    padding: 5px 10px;
    overflow: hidden;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap
}

.discount-badge {
    position: absolute;
    top: 44px;
    left: 11px;
    z-index: 6;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff1f2;
    color: #dc2626;
    font-size: 10px;
    font-weight: 900
}

.product-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px
}

.product-name {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 7px;
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2
}

.product-name a {
    color: inherit;
    text-decoration: none
}

.product-code {
    margin-bottom: 7px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 9px
}

.stars {
    display: flex;
    gap: 2px;
    color: #f59e0b;
    font-size: 11px
}

.review-count {
    color: #94a3b8;
    font-size: 10px
}

.product-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px
}

.price {
    color: var(--orange, #ff7a00);
    font-size: 18px;
    font-weight: 900
}

.regular-price {
    color: #94a3b8;
    font-size: 12px;
    text-decoration: line-through
}

.product-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: auto
}

.buy-btn,
.cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 900
}

.cart-btn {
    min-width: 70px;
    border-color: var(--orange, #ff7a00);
    color: var(--orange, #ff7a00);
    background: #fff
}

.cart-btn:hover {
    background: var(--orange, #ff7a00);
    color: #fff
}

/* =====================================================
   PRODUCT PAGINATION
===================================================== */

.pagination-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    margin-top:30px;
    margin-bottom:10px;
}

.pagination-wrap nav{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    width:100%;
}

.pagination-wrap .pagination{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:7px;
    margin:0;
    padding:0;
}

.pagination-wrap .page-item{
    margin:0;
}

.pagination-wrap .page-link{
    display:flex;
    align-items:center;
    justify-content:center;

    min-width:40px;
    height:40px;
    padding:7px 12px;

    border:1px solid #dbe2ea;
    border-radius:11px !important;

    background:#fff;
    color:#334155;

    font-size:13px;
    font-weight:800;
    line-height:1;

    text-decoration:none;

    box-shadow:0 4px 12px rgba(15,23,42,.05);
    transition:.2s ease;
}

.pagination-wrap .page-link:hover{
    border-color:#0d6efd;
    background:#eff6ff;
    color:#0d6efd;
    transform:translateY(-2px);
}

.pagination-wrap .page-item.active .page-link{
    border-color:#0d6efd;
    background:linear-gradient(135deg,#0d6efd,#258cff);
    color:#fff;
    box-shadow:0 8px 18px rgba(13,110,253,.22);
}

.pagination-wrap .page-item.disabled .page-link{
    border-color:#e5e7eb;
    background:#f8fafc;
    color:#94a3b8;
    box-shadow:none;
    cursor:not-allowed;
    transform:none;
}

/*
| যেকোনো কারণে SVG থাকলেও বিশাল হবে না
*/
.pagination-wrap svg{
    width:16px !important;
    height:16px !important;
    max-width:16px !important;
    max-height:16px !important;
}

.all-product-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 390px;
    padding: 35px;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    background: #fff;
    text-align: center;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06)
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    margin-bottom: 15px;
    border-radius: 24px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 38px
}

.all-product-empty h3 {
    margin-bottom: 7px;
    color: #111827;
    font-weight: 900
}

.all-product-empty p {
    max-width: 460px;
    color: #64748b
}

.empty-actions {
    display: flex;
    gap: 9px;
    margin-top: 8px
}

.offcanvas-filter {
    width: min(340px, 90vw) !important;
    background: #f8fafc
}

.offcanvas-filter .offcanvas-header {
    border-bottom: 1px solid #e5e7eb;
    background: #fff
}

.offcanvas-filter .offcanvas-title {
    margin: 0;
    color: #111827
}

@media(max-width:1199px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}

@media(max-width:991px) {
    .shop-layout {
        display: block
    }

    .toolbar {
        position: sticky;
        top: 60px;
        z-index: 20
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}

@media(max-width:767px) {
    .shop-container {
        width: min(100% - 18px, 1380px)
    }

    .breadcrumb-section {
        padding: 15px 0
    }

    .breadcrumb-wrap {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px
    }

    .page-title {
        font-size: 22px
    }

    .toolbar {
        align-items: flex-start;
        padding: 11px
    }

    .sort-form label {
        display: none
    }

    .sort-form select {
        min-width: 145px;
        max-width: 160px;
        font-size: 12px
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px
    }

    .product-img-box {
        height: 160px;
        padding: 10px
    }

    .product-card-body {
        padding: 11px
    }

    .product-name {
        min-height: 38px;
        font-size: 13px
    }

    .price {
        font-size: 16px
    }

    .buy-btn,
    .cart-btn {
        min-height: 37px;
        padding: 7px 9px;
        font-size: 11px
    }

    .cart-btn {
        min-width: 58px
    }
}

@media(max-width:480px) {
    .shop-container {
        width: min(100% - 12px, 1380px)
    }

    .toolbar {
        top: 56px;
        gap: 7px
    }

    .toolbar-count {
        font-size: 11px
    }

    .mobile-filter-btn {
        padding: 6px 8px;
        font-size: 11px
    }

    .sort-form select {
        min-width: 125px;
        max-width: 130px
    }

    .product-img-box {
        height: 140px
    }

    .wishlist-btn-top {
        width: 33px;
        height: 33px
    }

    .badge-tag {
        max-width: 88px;
        padding: 4px 7px;
        font-size: 8px
    }

    .discount-badge {
        top: 40px;
        font-size: 9px
    }

    .product-actions {
        grid-template-columns: 1fr
    }

    .cart-btn {
        width: 100%
    }

    .empty-actions {
        width: 100%;
        flex-direction: column
    }
}
@media(max-width:576px){

    .pagination-wrap{
        margin-top:22px;
    }

    .pagination-wrap .pagination{
        gap:5px;
    }

    .pagination-wrap .page-link{
        min-width:35px;
        height:35px;
        padding:6px 9px;
        border-radius:9px !important;
        font-size:12px;
    }

    .pagination-wrap svg{
        width:14px !important;
        height:14px !important;
    }

}
/* =====================================================
   FINAL PAGINATION SAFETY FIX
===================================================== */
.pagination-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    margin:30px 0 10px;
    overflow:hidden;
}
.pagination-wrap nav{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    width:100%;
}
.pagination-wrap nav > div:first-child{
    display:none !important;
}
.pagination-wrap nav > div:last-child{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    gap:8px !important;
}
.pagination-wrap nav > div:last-child > div:first-child{
    display:none !important;
}
.pagination-wrap nav > div:last-child > div:last-child{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
}
.pagination-wrap nav span[aria-current="page"] > span,
.pagination-wrap nav a[rel="prev"],
.pagination-wrap nav a[rel="next"],
.pagination-wrap nav span[aria-disabled="true"] > span{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:40px !important;
    height:40px !important;
    padding:7px 12px !important;
    border:1px solid #dbe2ea !important;
    border-radius:11px !important;
    background:#fff !important;
    color:#334155 !important;
    font-size:13px !important;
    font-weight:800 !important;
    line-height:1 !important;
    text-decoration:none !important;
    box-shadow:0 4px 12px rgba(15,23,42,.05) !important;
}
.pagination-wrap nav span[aria-current="page"] > span{
    border-color:#0d6efd !important;
    background:linear-gradient(135deg,#0d6efd,#258cff) !important;
    color:#fff !important;
}
.pagination-wrap nav span[aria-disabled="true"] > span{
    background:#f8fafc !important;
    color:#94a3b8 !important;
}
.pagination-wrap svg{
    width:16px !important;
    height:16px !important;
    max-width:16px !important;
    max-height:16px !important;
    flex:0 0 16px !important;
}
.products-area{
    min-width:0;
    width:100%;
}
.product-grid{
    width:100%;
}
@media(max-width:576px){
    .pagination-wrap nav span[aria-current="page"] > span,
    .pagination-wrap nav a[rel="prev"],
    .pagination-wrap nav a[rel="next"],
    .pagination-wrap nav span[aria-disabled="true"] > span{
        min-width:35px !important;
        height:35px !important;
        padding:6px 9px !important;
        border-radius:9px !important;
        font-size:12px !important;
    }
    .pagination-wrap svg{
        width:14px !important;
        height:14px !important;
        max-width:14px !important;
        max-height:14px !important;
        flex-basis:14px !important;
    }
}
