/* =========================================================
   BPA Wholesale Product Card Styles
   Theme Brand Palette: Red (#E61C1B), Gold (#F4CA4E)
   ========================================================= */

.bpa-wholesale-card-item {
    list-style: none;
    padding-left: 0;
}

.bpa-wholesale-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
    box-sizing: border-box;
    font-family: "Epilogue", sans-serif;
}

.bpa-wholesale-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
    transform: translateY(-3px);
}

/* 1. Top Area (Image) */
.bpa-card-top {
    position: relative;
    width: 100%;
}

.bpa-card-img-wrap {
    position: relative;
    width: 100%;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
    background: #fafbfc;
    margin-bottom: 14px;
}

.bpa-card-img-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.bpa-card-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.bpa-wholesale-card:hover .bpa-card-img {
    transform: scale(1.04);
}

.bpa-card-img-hover {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.bpa-wholesale-card:hover .bpa-card-img-hover {
    opacity: 1;
    transform: scale(1.04);
}

/* 2. Content Info */
.bpa-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bpa-card-sku {
    font-size: 12.5px;
    font-weight: 500;
    color: #8a92a6;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.bpa-card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #0b132b;
    text-transform: uppercase;
    line-height: 1.35;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.bpa-card-title a {
    color: #0b132b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bpa-card-title a:hover {
    color: #E61C1B;
}

/* 3. Variation Pills (Single / Case Switcher) */
.bpa-variation-pills {
    display: flex;
    width: 100%;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 2px;
    margin-bottom: 12px;
    background: #ffffff;
    box-sizing: border-box;
}

.bpa-pill-btn {
    flex: 1 1 0;
    padding: 6px 8px;
    font-family: "Epilogue", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    border: none;
    background: transparent;
    color: #334155;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bpa-pill-btn.active {
    background-color: #E61C1B !important; /* Theme Red */
    color: #ffffff !important;
    box-shadow: 0 1px 4px rgba(230, 28, 27, 0.3);
}

.bpa-pill-btn:hover:not(.active) {
    background-color: #fef2f2;
    color: #E61C1B;
}

/* 4. Pricing Row */
.bpa-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
    min-height: 28px;
}

.bpa-card-price-amount {
    font-size: 22px;
    font-weight: 700;
    color: #E61C1B; /* Theme Red */
    line-height: 1.1;
}

.bpa-card-price-amount del {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 400;
    margin-right: 4px;
}

.bpa-card-price-amount ins {
    text-decoration: none;
    color: #E61C1B;
}

.bpa-card-price-unit {
    font-size: 13.5px;
    font-weight: 500;
    color: #64748b;
}

/* 5. Stock Indicator */
.bpa-card-stock {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #16a34a; /* In stock green */
    margin-bottom: 14px;
    line-height: 1.2;
}

.bpa-card-stock .stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #16a34a;
    display: inline-block;
    flex-shrink: 0;
}

.bpa-card-stock.out-of-stock {
    color: #dc2626;
}

.bpa-card-stock.out-of-stock .stock-dot {
    background-color: #dc2626;
}

/* 6. Action Button */
.bpa-card-action {
    margin-top: auto;
}

.bpa-btn-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background-color: #E61C1B; /* Theme Primary Red */
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-family: "Epilogue", sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.3;
}

.bpa-btn-add-to-cart:hover {
    background-color: #c91514;
    color: #ffffff !important;
}

.bpa-btn-add-to-cart:active {
    transform: scale(0.98);
}

.bpa-btn-add-to-cart.disabled,
.bpa-btn-add-to-cart:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.bpa-btn-wholesale-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background-color: #f8fafc;
    color: #1e293b !important;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-family: "Epilogue", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.3;
}

.bpa-btn-wholesale-login:hover {
    background-color: #E61C1B;
    color: #ffffff !important;
    border-color: #E61C1B;
}

/* 7. Taxonomy Wholesale Category Archive Wrapper */
.bpa-wholesale-archive-section {
    padding: 50px 0 80px;
    background: #fdfdfd;
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
    .bpa-wholesale-card {
        padding: 12px;
    }
    .bpa-card-img-wrap {
        height: 170px;
    }
    .bpa-card-price-amount {
        font-size: 19px;
    }
    .bpa-pill-btn {
        font-size: 12.5px;
        padding: 5px 4px;
    }
}

/* Wholesale archive presentation: matches the standard Shop listing. */
.bpa-wholesale-listing-page .bpa-wholesale-archive-section {
    padding: 30px 0;
    background: #f9f9f9;
}

.bpa-wholesale-listing-page .bpa-wholesale-archive-section .category-tabs {
    display: flex;
    align-items: center;
    align-content: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 10px;
    background: #fff;
    border-radius: 15px;
}

.bpa-wholesale-listing-page .bpa-wholesale-category-tabs {
    height: 80vh;
    padding: 10px !important;
    border: 1px solid #e2e2e2;
}

.bpa-wholesale-listing-page .bpa-wholesale-archive-section .category-tab {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 5px 10px;
    border: 1px solid #f9f9f9;
    border-radius: 10px;
    background: #fff;
    color: #000;
    font-size: 12px;
    font-weight: 600;
    line-height: 24px;
    text-decoration: none;
    transition: all .3s ease;
}

.bpa-wholesale-listing-page .bpa-wholesale-archive-section .category-tab:hover,
.bpa-wholesale-listing-page .bpa-wholesale-archive-section .category-tab.active {
    border-color: #e61c1b;
    background: #e61c1b;
    color: #fff !important;
}

.bpa-wholesale-listing-page .bpa-wholesale-archive-section h2 {
    margin-bottom: 0;
    font-size: 20px;
    line-height: 22px;
}

.bpa-wholesale-listing-page .bpa-wholesale-archive-section .category-desc {
    font-size: 14px;
}

.bpa-wholesale-listing-page .bpa-wholesale-card-item {
    margin-bottom: 1.5rem !important;
}

.bpa-wholesale-listing-page .bpa-wholesale-card,
.bpa-wholesale-listing-page .bpa-wholesale-card:hover {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.bpa-wholesale-listing-page .bpa-card-img-wrap {
    height: auto;
    aspect-ratio: 1 / 1;
    margin-bottom: 0;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fff;
}

.bpa-wholesale-listing-page .bpa-card-img,
.bpa-wholesale-listing-page .bpa-card-img-hover {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
}

.bpa-wholesale-listing-page .bpa-wholesale-card:hover .bpa-card-img,
.bpa-wholesale-listing-page .bpa-wholesale-card:hover .bpa-card-img-hover {
    transform: scale(1.05);
}

.bpa-wholesale-listing-page .bpa-card-body {
    padding-top: 12px;
    text-align: center;
}

.bpa-wholesale-listing-page .bpa-card-sku {
    margin-bottom: 4px;
    font-size: 11px;
}

.bpa-wholesale-listing-page .bpa-card-title {
    min-height: 0;
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-transform: capitalize;
}

.bpa-wholesale-listing-page .bpa-card-title a {
    color: #000;
}

.bpa-wholesale-listing-page .bpa-wholesale-card:hover .bpa-card-title a {
    color: #000;
    text-decoration: underline;
}

.bpa-wholesale-listing-page .bpa-variation-pills {
    margin-bottom: 8px;
}

.bpa-wholesale-listing-page .bpa-card-price-row,
.bpa-wholesale-listing-page .bpa-card-stock {
    justify-content: center;
}

.bpa-wholesale-listing-page .bpa-card-price-amount {
    font-size: 16px;
}

.bpa-wholesale-listing-page .bpa-card-stock {
    margin-bottom: 10px;
}

.bpa-wholesale-listing-page .bpa-btn-add-to-cart,
.bpa-wholesale-listing-page .bpa-btn-wholesale-login {
    border-radius: 0 0 10px 10px;
    background: rgba(230, 28, 27, .82);
    color: #fff !important;
}

.bpa-wholesale-listing-page .pagination-wrapper ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.bpa-wholesale-listing-page .pagination-wrapper li {
    margin: 0;
}

.bpa-wholesale-listing-page .pagination-wrapper a,
.bpa-wholesale-listing-page .pagination-wrapper span {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d4a017;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.bpa-wholesale-listing-page .pagination-wrapper a:hover,
.bpa-wholesale-listing-page .pagination-wrapper .current {
    border-color: #e61c1b;
    background: #e61c1b;
    color: #fff;
}

.bpa-wholesale-listing-page .pagination-wrapper .dots {
    width: auto;
    height: auto;
    padding: 0 5px;
    border: 0;
    background: transparent;
}

.bpa-wholesale-listing-page .category-toggle-btn {
    display: none;
    width: 100%;
    margin-bottom: 20px;
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    background: #e61c1b;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
}

.bpa-wholesale-listing-page .offcanvas-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, .5);
}

.bpa-wholesale-listing-page .offcanvas-overlay.active {
    display: block;
}

.bpa-wholesale-listing-page .offcanvas-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    z-index: 1000;
    width: 300px;
    height: 100%;
    padding: 10px;
    overflow-y: auto;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, .1);
    transition: left .3s ease;
}

.bpa-wholesale-listing-page .offcanvas-sidebar.open {
    left: 0;
}

.bpa-wholesale-listing-page .offcanvas-sidebar .category-tabs {
    height: auto;
    flex-direction: column;
    gap: 10px;
}

.bpa-wholesale-listing-page .offcanvas-close {
    padding: 5px 10px;
    border: 0;
    background: none;
    color: #333;
    font-size: 28px;
}

@media (max-width: 991.98px) {
    .bpa-wholesale-listing-page .category-toggle-btn {
        display: block;
    }

    .bpa-wholesale-listing-page .desktop-category-tabs {
        display: none !important;
    }

    .bpa-wholesale-listing-page .bpa-wholesale-archive-section .row > .col-md-3 {
        display: none;
    }

    .bpa-wholesale-listing-page .bpa-wholesale-archive-section .row > .col-md-9 {
        width: 100%;
    }

    .bpa-wholesale-listing-page .bpa-wholesale-archive-section .category-tab {
        padding: 8px 14px;
        font-size: 14px;
        line-height: 22px;
    }
}

@media (max-width: 767.98px) {
    .bpa-wholesale-listing-page ul.products li.product {
        width: 50% !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .bpa-wholesale-listing-page ul.products li.product {
        width: 33.333333% !important;
    }
}

@media (min-width: 992px) {
    .bpa-wholesale-listing-page .offcanvas-overlay,
    .bpa-wholesale-listing-page .offcanvas-sidebar {
        display: none !important;
    }
}

.bpa-wholesale-listing-page .bpa-listing-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.bpa-wholesale-listing-page .bpa-listing-toolbar > div {
    min-width: 0;
}

.bpa-wholesale-listing-page .bpa-wholesale-search {
    width: 280px;
    display: flex;
    flex: 0 0 280px;
    align-items: stretch;
}

.bpa-wholesale-listing-page .bpa-wholesale-search input[type="search"] {
    width: calc(100% - 48px);
    height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 2px solid #e61c1b;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: #fff;
    color: #111;
    font-family: "Epilogue", sans-serif;
    font-size: 14px;
    line-height: 1;
    outline: none;
    box-shadow: none;
}

.bpa-wholesale-listing-page .bpa-wholesale-search input[type="search"]:focus {
    border-color: #c91514;
}

.bpa-wholesale-listing-page .bpa-wholesale-search button {
    width: 48px;
    min-width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 2px solid #e61c1b;
    border-radius: 0 8px 8px 0;
    background: #e61c1b;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.bpa-wholesale-listing-page .bpa-wholesale-search button:hover,
.bpa-wholesale-listing-page .bpa-wholesale-search button:focus {
    border-color: #c91514;
    background: #c91514;
}

@media (max-width: 767.98px) {
    .bpa-wholesale-listing-page .bpa-listing-toolbar {
        flex-direction: column;
        gap: 14px;
    }

    .bpa-wholesale-listing-page .bpa-wholesale-search {
        width: 100%;
        flex-basis: auto;
    }
}

