/* ==========================================
   IBA Machinery Archive
========================================== */

.iba-archive {
    --iba-orange: #f36b21;
    --iba-orange-dark: #d95d17;
    --iba-ink: #22272b;
    --iba-muted: #687078;
    --iba-line: #e2e5e8;
    --iba-surface: #f7f8f9;

    width: 100%;
    padding: 35px 0 70px;
    color: var(--iba-ink);
}

.iba-archive *,
.iba-archive *::before,
.iba-archive *::after {
    box-sizing: border-box;
}

.iba-archive > .iba-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}


/* ==========================================
   Header
========================================== */

.iba-archive-header {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 40px;
    text-align: left;
}

.iba-archive-title {
    margin: 0;
}

.iba-archive-description {
    display: none;
}


/* ==========================================
   Breadcrumbs
========================================== */
.tax-product_cat .ast-breadcrumbs-wrapper,
.page-template-page-new-arrivals .ast-breadcrumbs-wrapper {
    width: 100%;
    max-width: 1100px;
    margin-right: auto;
    margin-left: auto;
}

.tax-product_cat .ast-breadcrumbs,
.page-template-page-new-arrivals .ast-breadcrumbs {
    margin-left: 0;
}

/* ==========================================
   Machine list
========================================== */

.iba-machine-list {
    display: grid;
    gap: 22px;

    width: 100%;
    max-width: 1100px;
    min-width: 0;

    margin: 0 auto;
}


/* ==========================================
   Machine card
========================================== */

.iba-archive .iba-machine-list-card {
    display: grid;
    grid-template-columns:
        minmax(300px, 34%)
        minmax(0, 1fr);

    width: 100%;
    min-width: 0;
    min-height: 285px;
    overflow: hidden;

    background: #fff;
    border: 1px solid var(--iba-line);
    border-radius: 9px;
    box-shadow: 0 4px 15px rgba(25, 31, 36, 0.06);

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.iba-archive .iba-machine-list-card:hover {
    border-color: #efb18e;
    box-shadow: 0 10px 26px rgba(25, 31, 36, 0.1);
    transform: translateY(-2px);
}


/* ==========================================
   Card image
========================================== */

.iba-archive .iba-machine-list-card__image {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 285px;
    overflow: hidden;
    background: #eceff1;
}

.iba-archive .iba-machine-list-card__image img {
    position: absolute;
    inset: 0;

    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 250ms ease;
}

.iba-archive .iba-machine-list-card:hover
.iba-machine-list-card__image img {
    transform: scale(1.015);
}

.iba-archive .iba-machine-list-card__placeholder {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(
        145deg,
        #f1f3f4,
        #e1e5e7
    );

    color: #858d93;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}


/* ==========================================
   Status badges
========================================== */

.iba-archive .iba-machine-new-badge,
.iba-archive .iba-machine-sold-badge {
    position: absolute;
    top: 0;
    z-index: 3;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 82px;
    min-height: 30px;
    padding: 6px 14px;

    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;

    pointer-events: none;
}

.iba-archive .iba-machine-new-badge {
    right: 0;
    background: #27ae60;
}

.iba-archive .iba-machine-sold-badge {
    left: 0;
    background: #dc2626;
}


/* ==========================================
   Card content
========================================== */

.iba-archive .iba-machine-list-card__content {
    display: flex;
    flex-direction: column;

    min-width: 0;
    padding: 26px 30px 24px;
}

.iba-archive .iba-machine-list-card__title {
    margin: 0 0 16px;

    color: var(--iba-ink);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.iba-archive .iba-machine-list-card__title a {
    color: inherit;
    text-decoration: none;
}

.iba-archive .iba-machine-list-card__title a:hover,
.iba-archive .iba-machine-list-card__title a:focus {
    color: var(--iba-orange-dark);
}


/* ==========================================
   Machine facts
========================================== */

.iba-archive .iba-machine-list-card__facts {
    display: grid;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.iba-archive .iba-machine-list-card__fact {
    display: grid;
    grid-template-columns:
        minmax(130px, 0.34fr)
        minmax(0, 1fr);

    gap: 18px;
    min-height: 36px;
    padding: 8px 0;

    border-top: 1px solid #edf0f2;

    font-size: 0.95rem;
    line-height: 1.35;
}

.iba-archive .iba-machine-list-card__fact:first-child {
    border-top: 0;
}

.iba-archive .iba-machine-list-card__fact dt {
    color: var(--iba-muted);
    font-weight: 400;
}

.iba-archive .iba-machine-list-card__fact dd {
    min-width: 0;
    margin: 0;

    color: #2d3338;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.iba-archive .iba-machine-list-card__fact.is-empty dd {
    color: #9aa0a5;
}


/* ==========================================
   Card button
========================================== */

.iba-archive .iba-machine-list-card__footer {
    display: flex;
    justify-content: flex-start;

    margin-top: auto;
    padding-top: 22px;
}

.iba-archive .iba-machine-list-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 138px;
    min-height: 46px;
    padding: 11px 24px;

    background: var(--iba-orange);
    border: 1px solid var(--iba-orange);
    border-radius: 6px;

    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;

    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.iba-archive .iba-machine-list-card__button:hover,
.iba-archive .iba-machine-list-card__button:focus {
    background: var(--iba-orange-dark);
    border-color: var(--iba-orange-dark);
    color: #fff;
    transform: translateY(-1px);
}


/* ==========================================
   Category SEO description
========================================== */

.iba-category-description {
    max-width: 1100px;
    margin: 70px auto 0;
    padding-top: 40px;

    border-top: 1px solid #e5e5e5;

    color: #444;
    font-size: 16px;
    line-height: 1.8;
}

.iba-category-description h2 {
    margin: 40px 0 20px;
    color: #222;
    font-size: 28px;
}

.iba-category-description h3 {
    margin: 30px 0 15px;
    color: #222;
    font-size: 22px;
}

.iba-category-description p {
    margin-bottom: 20px;
}

.iba-category-description ul {
    margin: 20px 0 20px 25px;
}

.iba-category-description li {
    margin-bottom: 10px;
}


/* ==========================================
   Load More Machines
========================================== */

.iba-load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
}

.iba-load-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 220px;
    min-height: 44px;
    padding: 12px 24px;

    border: 0;
    border-radius: 4px;

    background: #ff641e;
    color: #fff;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        opacity 0.2s ease;
}

.iba-load-more-button:hover,
.iba-load-more-button:focus {
    background: #e95618;
    color: #fff;
}

.iba-load-more-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.iba-load-more-button.is-loading {
    pointer-events: none;
}

.iba-load-more-status {
    min-height: 22px;
    margin-top: 10px;

    color: #b42318;
    font-size: 14px;
    text-align: center;
}


/* ==========================================
   WooCommerce pagination fallback
========================================== */

.woocommerce-pagination {
    display: flex;
    justify-content: center;
    margin: 60px 0 40px;
}


/* ==========================================
   Tablet
========================================== */

@media (max-width: 991px) {

    .iba-archive .iba-machine-list-card {
        grid-template-columns:
            minmax(260px, 38%)
            minmax(0, 1fr);
    }

    .iba-archive .iba-machine-list-card__content {
        padding: 23px 24px;
    }

    .iba-archive .iba-machine-list-card__fact {
        grid-template-columns:
            minmax(110px, 0.38fr)
            minmax(0, 1fr);
    }
}


/* ==========================================
   Mobile
========================================== */

@media (max-width: 640px) {

    .iba-archive {
        padding-top: 25px;
        padding-bottom: 50px;
    }

    .iba-archive-header {
        margin-bottom: 28px;
    }

    .iba-machine-list {
        gap: 20px;
    }

    .iba-archive .iba-machine-list-card {
        display: block;
        min-height: 0;
    }

    .iba-archive .iba-machine-list-card__image {
        width: 100%;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .iba-archive .iba-machine-list-card__content {
        padding: 20px 18px;
    }

    .iba-archive .iba-machine-list-card__title {
        font-size: 1.35rem;
    }

    .iba-archive .iba-machine-list-card__fact {
        grid-template-columns:
            minmax(96px, 0.42fr)
            minmax(0, 1fr);

        gap: 12px;
        font-size: 0.9rem;
    }

    .iba-archive .iba-machine-list-card__footer {
        padding-top: 18px;
    }

    .iba-archive .iba-machine-list-card__button {
        width: 100%;
    }

    .iba-load-more-button {
        width: 100%;
    }
}


/* ==========================================
   Very small screens
========================================== */

@media (max-width: 420px) {

    .iba-archive .iba-machine-list-card__fact {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* ==========================================
   Product search results
========================================== */

.search .ast-breadcrumbs-wrapper {
    width: 100%;
    max-width: 1100px;
    margin-right: auto;
    margin-left: auto;
}

.iba-search-results {
    padding-top: 45px;
}

.search .ast-breadcrumbs {
    margin-left: 0;
}

.iba-search-header {
    margin-bottom: 30px;
}

.iba-search-count {
    margin: 12px 0 0;
    color: var(--iba-muted);
    font-size: 16px;
    line-height: 1.5;
}

.iba-search-pagination {
    width: 100%;
    max-width: 1100px;
    margin: 45px auto 0;
}

.iba-search-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.iba-search-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 13px;
    border: 1px solid var(--iba-line);
    border-radius: 5px;
    background: #fff;
    color: var(--iba-ink);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
}

.iba-search-pagination .page-numbers:hover,
.iba-search-pagination .page-numbers:focus,
.iba-search-pagination .page-numbers.current {
    border-color: var(--iba-orange);
    background: var(--iba-orange);
    color: #fff;
}

.iba-search-empty {
    width: 100%;
    max-width: 760px;
    margin: 20px auto 0;
    padding: 45px 35px;
    border: 1px solid var(--iba-line);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(25, 31, 36, 0.06);
    text-align: center;
}

.iba-search-empty h2 {
    margin: 0 0 12px;
    color: var(--iba-ink);
    font-size: 28px;
}

.iba-search-empty p {
    margin: 0 0 24px;
    color: var(--iba-muted);
    font-size: 16px;
    line-height: 1.6;
}

.iba-search-empty .iba-machine-list-card__button {
    margin: 0 auto;
}

@media (max-width: 640px) {
    .iba-search-empty {
        padding: 32px 20px;
    }

    .iba-search-empty h2 {
        font-size: 24px;
    }
    
    .iba-search-results {
        padding-top: 28px;
    }
}


/* Search page spacing and breadcrumbs */

.iba-search-results {
    padding-top: 0;
}

.iba-search-breadcrumbs {
    width: 100%;
    max-width: 1100px;
    margin: 10px auto 0;
}

.iba-search-breadcrumbs .ast-breadcrumbs-wrapper {
    width: 100%;
    max-width: none;
    margin: 0;
}

.iba-search-breadcrumbs .ast-breadcrumbs {
    margin-left: 0;
}

.iba-search-header {
    margin-top: 65px;
    margin-bottom: 40px;
}

@media (max-width: 640px) {
    .iba-search-breadcrumbs {
        padding: 0 18px;
    }

    .iba-search-header {
        margin-top: 42px;
        margin-bottom: 28px;
    }
}

/*end*/
