/* ==============================
   Latest Stock Inventory
================================= */

.latest-stock-page {
    width: 100%;
    padding: 24px 0 64px;
    background: #f4f7fb;
    box-sizing: border-box;
}

.latest-stock-head {
    padding: 38px 42px;
    background: #ffffff;
    border: 1px solid #e3e9f1;
    border-radius: 16px;
    box-sizing: border-box;
    box-shadow: 0 12px 34px rgba(14, 50, 90, 0.07);
}

.latest-stock-head-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.latest-stock-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: #0093e6;
    font-size: 13px;
    line-height: 20px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.latest-stock-head h1 {
    margin: 0;
    color: #111827;
    font-size: 38px;
    line-height: 48px;
    font-weight: 800;
}

.latest-stock-head > p {
    max-width: 1120px;
    margin: 22px 0 0;
    color: #5d6675;
    font-size: 16px;
    line-height: 30px;
}

.latest-stock-count {
    flex: 0 0 auto;
    min-width: 190px;
    padding: 16px 20px;
    text-align: right;
    background: #eef7fd;
    border: 1px solid #d7ebf7;
    border-radius: 12px;
    box-sizing: border-box;
}

.latest-stock-count strong {
    display: block;
    color: #0093e6;
    font-size: 30px;
    line-height: 36px;
    font-weight: 800;
}

.latest-stock-count span {
    display: block;
    margin-top: 3px;
    color: #637083;
    font-size: 13px;
    line-height: 20px;
}

.latest-stock-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
    padding: 18px 22px;
    background: #ffffff;
    border: 1px solid #e3e9f1;
    border-radius: 12px;
    box-sizing: border-box;
}

.latest-stock-toolbar > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}

.latest-stock-toolbar strong {
    color: #111827;
    font-size: 16px;
    line-height: 24px;
}

.latest-stock-toolbar span,
.latest-stock-page-status {
    color: #788497;
    font-size: 14px;
    line-height: 22px;
}

.latest-stock-page-status strong {
    color: #0093e6;
    font-size: inherit;
}

.latest-stock-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.latest-stock-card {
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e0e7f0;
    border-radius: 14px;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(15, 45, 78, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.latest-stock-card:hover {
    transform: translateY(-4px);
    border-color: #bcd9ec;
    box-shadow: 0 16px 34px rgba(15, 73, 118, 0.12);
}

.latest-stock-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f7f9fc;
}

.latest-stock-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.28s ease;
}

.latest-stock-card:hover .latest-stock-image img {
    transform: scale(1.035);
}

.latest-stock-image span {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    color: #ffffff;
    font-size: 11px;
    line-height: 18px;
    font-weight: 700;
    background: rgba(0, 95, 153, 0.9);
    border-radius: 20px;
    box-sizing: border-box;
}

.latest-stock-card-body {
    padding: 18px;
}

.latest-stock-card h2 {
    min-height: 48px;
    margin: 0;
    font-size: 17px;
    line-height: 24px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.latest-stock-card h2 a {
    color: #111827;
    text-decoration: none;
}

.latest-stock-card h2 a:hover {
    color: #0093e6;
}

.latest-stock-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}

.latest-stock-meta a,
.latest-stock-meta span {
    min-width: 0;
    color: #6d7888;
    font-size: 13px;
    line-height: 20px;
}

.latest-stock-meta a {
    overflow: hidden;
    color: #0093e6;
    font-weight: 700;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-stock-meta span {
    flex: 0 0 auto;
}

.latest-stock-meta strong {
    color: #14804a;
    font-weight: 800;
}

.latest-stock-category {
    min-height: 20px;
    margin: 10px 0 0;
    overflow: hidden;
    color: #8993a2;
    font-size: 12px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-stock-description {
    display: -webkit-box;
    min-height: 66px;
    margin: 9px 0 0;
    overflow: hidden;
    color: #626d7d;
    font-size: 13px;
    line-height: 22px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.latest-stock-actions {
    display: flex;
    gap: 9px;
    margin-top: 16px;
}

.latest-stock-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 20px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 7px;
    box-sizing: border-box;
}

.latest-stock-view {
    flex: 1;
    color: #ffffff !important;
    background: #0093e6;
    border: 1px solid #0093e6;
}

.latest-stock-view:hover {
    background: #004d7d;
    border-color: #004d7d;
}

.latest-stock-rfq {
    flex: 0 0 auto;
    color: #0093e6 !important;
    background: #ffffff;
    border: 1px solid #b7d6e8;
}

.latest-stock-rfq:hover {
    background: #eef7fd;
}

.latest-stock-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
}

.latest-stock-pagination a,
.latest-stock-page-current,
.latest-stock-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    color: #566273;
    font-size: 14px;
    line-height: 40px;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #dce4ed;
    border-radius: 7px;
    box-sizing: border-box;
}

.latest-stock-pagination a:hover,
.latest-stock-page-current {
    color: #ffffff;
    background: #0093e6;
    border-color: #0093e6;
}

.latest-stock-page-ellipsis {
    border-color: transparent;
    background: transparent;
}

.latest-stock-page-prev,
.latest-stock-page-next {
    min-width: 92px !important;
}

.latest-stock-empty {
    margin-top: 22px;
    padding: 70px 30px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e3e9f1;
    border-radius: 14px;
    box-sizing: border-box;
}

.latest-stock-empty i {
    color: #aac0cf;
    font-size: 48px;
}

.latest-stock-empty h2 {
    margin: 18px 0 0;
    color: #182230;
    font-size: 24px;
    line-height: 34px;
}

.latest-stock-empty p {
    margin: 10px 0 0;
    color: #6c7787;
    font-size: 15px;
    line-height: 26px;
}

.latest-stock-empty a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 20px;
    padding: 9px 22px;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    background: #0093e6;
    border-radius: 7px;
}

@media (max-width: 1280px) {
    .latest-stock-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .latest-stock-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .latest-stock-head {
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .latest-stock-page {
        padding: 14px 0 40px;
    }

    .latest-stock-head {
        padding: 24px 18px;
        border-radius: 12px;
    }

    .latest-stock-head-main {
        display: block;
    }

    .latest-stock-head h1 {
        font-size: 29px;
        line-height: 38px;
    }

    .latest-stock-head > p {
        margin-top: 16px;
        font-size: 14px;
        line-height: 26px;
    }

    .latest-stock-count {
        width: 100%;
        min-width: 0;
        margin-top: 18px;
        text-align: left;
    }

    .latest-stock-toolbar {
        align-items: flex-start;
        padding: 15px 16px;
    }

    .latest-stock-toolbar > div:first-child {
        display: block;
    }

    .latest-stock-toolbar span {
        display: block;
        margin-top: 2px;
    }

    .latest-stock-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 14px;
    }

    .latest-stock-card-body {
        padding: 14px;
    }

    .latest-stock-card h2 {
        min-height: 44px;
        font-size: 15px;
        line-height: 22px;
    }

    .latest-stock-meta {
        display: block;
    }

    .latest-stock-meta a,
    .latest-stock-meta span {
        display: block;
    }

    .latest-stock-description {
        min-height: 63px;
        line-height: 21px;
    }

    .latest-stock-actions {
        display: block;
    }

    .latest-stock-actions a {
        width: 100%;
    }

    .latest-stock-rfq {
        margin-top: 8px;
    }
}

@media (max-width: 420px) {
    .latest-stock-head h1 {
        font-size: 26px;
        line-height: 34px;
    }

    .latest-stock-grid {
        grid-template-columns: 1fr;
    }

    .latest-stock-image {
        aspect-ratio: 4 / 3;
    }

    .latest-stock-page-status {
        white-space: nowrap;
    }
}
