﻿/* Product card list */

.product-card-list {
    padding-top: 6px;
    padding-bottom: 35px;
}

.product-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.product-card-item {
    min-width: 0;
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .045);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.product-card-item:hover {
    transform: translateY(-3px);
    border-color: #d9dee7;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

.product-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 220px;
    padding: 18px;
    box-sizing: border-box;
    background: #fff;
    border-bottom: 1px solid #f0f1f3;
}

.product-card-image img {
    display: block;
    max-width: 100%;
    max-height: 184px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-card-content {
    padding: 16px;
}

.product-card-title {
    margin: 0 0 14px;
    height: 44px;
    overflow: hidden;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
}

.product-card-title a {
    color: #1f2937 !important;
}

.product-card-title a:hover {
    color: #0670fa !important;
}

.product-card-stock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 7px 10px;
    margin-bottom: 12px;
    box-sizing: border-box;
    border-radius: 6px;
    background: #f7f9fc;
    font-size: 14px;
}

.product-card-stock span {
    color: #7b8492;
}

.product-card-stock strong {
    color: #1f2937;
    font-size: 15px;
}

.product-card-price {
    min-height: 112px;
    margin-bottom: 14px;
    padding: 10px 11px;
    box-sizing: border-box;
    border: 1px solid #edf0f4;
    border-radius: 7px;
    background: #fff;
}

.product-card-label {
    margin-bottom: 7px;
    color: #7b8492;
    font-size: 13px;
    line-height: 18px;
}

.product-card-tier {
    color: #e53935;
    font-size: 14px;
    line-height: 22px;
}

.product-card-tier table {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: collapse;
    background: transparent !important;
}

.product-card-tier tr,
.product-card-tier td,
.product-card-tier th {
    height: auto !important;
    padding: 2px 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 13px !important;
    line-height: 20px !important;
    text-align: left !important;
}

.product-card-action {
    position: relative;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 9px;
}

.product-card-action input[type="number"] {
    width: 100%;
    height: 38px;
    padding: 0 8px;
    box-sizing: border-box;
    border: 1px solid #d8dde6;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-align: center;
    outline: none;
}

.product-card-action input[type="number"]:focus {
    border-color: #0670fa;
}

.product-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 12px;
    box-sizing: border-box;
    border-radius: 6px;
    background: #0670fa;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.product-card-btn:hover {
    background: #055dce;
    color: #fff !important;
}

.product-card-btn-rfq {
    background: #374151;
}

.product-card-btn-rfq:hover {
    background: #1f2937;
}

.product-card-list .default {
    margin-top: 28px;
}

/* Hide old table/list styling if inherited elsewhere */
.product-card-list table,
.product-card-list tbody,
.product-card-list tr,
.product-card-list td {
    float: none;
}


/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 767px) {
    .product-card-list,
    .product-card-list * {
        box-sizing: border-box;
    }

    .product-card-list {
        width: 100%;
        padding: 4px 10px 24px;
        margin: 0 !important;
    }

    .product-card-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
        margin: 0 !important;
    }

    .product-card-item {
        width: 100%;
        min-width: 0;
        margin: 0 !important;
        border-radius: 8px;
    }

    .product-card-image {
        width: 100%;
        height: 180px;
        padding: 14px;
        margin: 0 !important;
    }

    .product-card-image img {
        max-width: 100%;
        max-height: 150px;
    }

    .product-card-content {
        width: 100%;
        padding: 13px;
        margin: 0 !important;
    }

    .product-card-title {
        width: 100%;
        height: auto;
        max-height: 44px;
        margin: 0 0 10px !important;
        font-size: 15px;
        line-height: 22px;
        word-break: break-word;
    }

    .product-card-stock {
        width: 100%;
        min-height: 36px;
        margin: 0 0 10px !important;
        padding: 7px 10px;
    }

    .product-card-price {
        width: 100%;
        min-height: 0;
        margin: 0 0 12px !important;
        padding: 9px 10px;
    }

    .product-card-tier {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .product-card-tier table {
        width: 100% !important;
        min-width: 0 !important;
    }

    .product-card-tier tr,
    .product-card-tier td,
    .product-card-tier th {
        font-size: 12px !important;
        line-height: 19px !important;
        white-space: normal !important;
    }

    .product-card-action {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 8px;
        width: 100%;
        margin: 0 !important;
    }

    .product-card-action input[type="number"] {
        width: 100%;
        height: 40px;
        margin: 0 !important;
    }

    .product-card-btn {
        width: 100%;
        height: 40px;
        padding: 0 10px;
        margin: 0 !important;
        font-size: 13px;
        white-space: nowrap;
    }

    .product-card-list .default {
        width: 100%;
        margin: 20px 0 0 !important;
        overflow-x: auto;
    }
}
