/* Shared product card styles (products listing + home page).
   Extracted from products-page.css so both pages use one source. */

.product-grid-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
}

.product-grid-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-grid-card .img {
    position: relative;
    background: linear-gradient(to bottom, #ffffff 65%, #FF5722 65%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.product-grid-card .img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    z-index: 2;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.product-grid-card:hover .img img {
    transform: scale(1.05);
}

.product-grid-card .badge-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    background: #FF5722;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-grid-card .content-wrap {
    padding: 20px;
}

.product-grid-card .content-wrap h4 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    line-height: 1.3;
}

.product-grid-card .content-wrap .desc-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.product-grid-card .rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.product-grid-card .rating-row .stars {
    color: #FFC107;
    font-size: 14px;
    letter-spacing: 1px;
}

.product-grid-card .rating-row .review-count {
    font-size: 13px;
    color: #999;
}

.product-grid-card .card-footer-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 5px;
}

.product-grid-card .price-block {
    display: flex;
    flex-direction: column;
}

.product-grid-card .price-label {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.product-grid-card .price-values {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-grid-card .old-price {
    font-size: 14px;
    color: #aaa;
    text-decoration: line-through;
    font-weight: 500;
}

.product-grid-card .current-price {
    font-size: 20px;
    font-weight: 700;
    color: #1a4d2e;
}

.product-grid-card .btn-add-cart {
    background: #FFE135;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.product-grid-card .btn-add-cart:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 576px) {

    

    .product-grid-card {
        display: flex;
        flex-direction: row;
        height: auto;
        min-height: 160px;
        align-items: stretch;
        margin-bottom: 15px;
        opacity: 1 !important;
    }

    .product-grid-card .img {
        width: 45%;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background-size: cover;
    }

    .product-grid-card .img img {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: cover;
    }

    .product-grid-card .badge-tag {
        position: absolute;
        top: 10px;
        left: 10px;
        right: auto;
        background: #FF5722;
        color: #fff;
        padding: 4px 12px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 600;
        z-index: 5;
    }

    .product-grid-card .content-wrap {
        width: 55%;
        /* padding: 12px; */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
    }

    .product-grid-card .rating-row {
        order: -1;
        margin-bottom: 4px;
        width: 100%;
        /* justify-content: flex-end; */
    }

    .product-grid-card .rating-row .stars {
        font-size: 12px;
    }

    .product-grid-card .content-wrap h4 {
        font-size: 14px;
        margin-bottom: 4px;
        white-space: normal;
        line-height: 1.2;
    }

    .product-grid-card .content-wrap .desc-text {
        font-size: 11px;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-grid-card .card-footer-row {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 8px;
    }

    .product-grid-card .price-block {
        width: 100%;
    }

    .product-grid-card .price-values {
        gap: 5px;
        align-items: baseline;
        justify-content: flex-start;
    }

    .product-grid-card .price-label {
        display: block;
        font-size: 10px;
        color: #999;
        font-weight: 700;
        text-transform: uppercase;
        margin-bottom: 2px;
    }

    .product-grid-card .current-price {
        font-size: 16px;
    }

    .product-grid-card .old-price {
        font-size: 12px;
    }

    .product-grid-card .btn-add-cart {
        width: 100%;
        padding: 8px 12px;
        font-size: 13px;
        margin-top: 5px;
        text-align: center;
        flex-shrink: 0;
    }
}

.product-grid-card {
    display: flex;
    flex-direction: column;
}

.product-grid-card .content-wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 16px 18px 18px;
}

.product-grid-card .content-wrap .product-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #1a1a1a;
    margin: 0 0 8px;
    text-transform: none;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.35em);
}

.product-grid-card .content-wrap .desc-text {
    margin-bottom: 14px;
}

.product-grid-card .card-footer-row {
    margin-top: auto;
    gap: 10px;
    flex-wrap: nowrap;
}

.product-grid-card .price-block {
    min-width: 0;
}

.product-grid-card .btn-add-cart,
.product-grid-card .btn-request-price {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 12px 24px;
    font-size: 14.5px;
    line-height: 1.2;
    border-radius: 8px;
}

@media (min-width: 992px) {

    .product-grid-card .img {
        aspect-ratio: 1 / 1;
    }

    /* Images fill the square tile: several product photos ship with a
       baked-in white background, which left the orange band showing
       around a floating white rectangle when they were only contained. */
    .product-grid-card .img img {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: cover;
        object-position: center;
    }

    .product-grid-card .current-price {
        font-size: 18px;
    }
}

@media (min-width: 992px) and (max-width: 1399px) {

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

    .product-grid-card .btn-add-cart,
    .product-grid-card .btn-request-price {
        padding: 11px 18px;
        font-size: 13.5px;
    }
}

@media (max-width: 991.98px) {

    .product-grid-card {
        flex-direction: column;
        min-height: 0;
        height: 100%;
        margin-bottom: 0;
    }

    .product-grid-card .img,
    .filtered-product-card .img {
        width: 100%;
        min-width: 0;
        aspect-ratio: 1 / 1;
    }

    .product-grid-card .img img,
    .filtered-product-card .img img {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: cover;
        object-position: center;
        border-radius: 0;
    }

    .product-grid-card .content-wrap {
        width: 100%;
        padding: 12px;
    }

    .product-grid-card .badge-tag {
        top: 8px;
        right: 8px;
        left: auto;
        padding: 3px 10px;
        font-size: 10px;
    }

    .product-grid-card .card-footer-row {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 8px;
        width: auto;
    }
}

@media (max-width: 767.98px) {

    .product-grid-card .content-wrap {
        padding: 10px;
    }

    .product-grid-card .content-wrap .product-title {
        font-size: 12.5px;
        line-height: 1.3;
        margin-bottom: 5px;
        min-height: calc(2 * 1.3em);
    }

    .product-grid-card .content-wrap .desc-text {
        font-size: 11px;
        line-height: 1.35;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    /* Too narrow for price and button side by side */
    .product-grid-card .card-footer-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .product-grid-card .price-label {
        font-size: 10px;
    }

    .product-grid-card .current-price {
        font-size: 15px;
    }

    .product-grid-card .old-price {
        font-size: 11px;
    }

    .product-grid-card .btn-add-cart,
    .product-grid-card .btn-request-price {
        width: 100%;
        padding: 12px 10px;
        font-size: 13px;
        text-align: center;
    }

    .product-grid-card .out-of-stock-msg {
        font-size: 11px !important;
    }
}

.product-grid-card {
    transition: none;
}

.product-grid-card:hover {
    box-shadow: none;
}

.product-grid-card .img img {
    transition: none;
}

.product-grid-card:hover .img img {
    transform: none;
}

.product-grid-card .price-on-request {
    font-size: 15px;
    font-weight: 700;
    color: #1a4d2e;
    line-height: 1.2;
}
