/* ===== PRODUCT CARD ===== */

.product-card-v4 {

    border-radius: 14px;
    background: #fff;
    border: 1px solid #eef1f5;
    overflow: hidden;
    transition: all .25s ease;
    display: flex;
    flex-direction: column;
}

    .product-card-v4:hover {
        box-shadow: 0 12px 30px rgba(0,0,0,0.08);
        transform: translateY(-3px);
    }

/* ===== IMAGE WRAPPER ===== */

.product-image-v4-wrapper {
    position: relative;
    width: 100%;
    height: 260px; /* FIXED WRAPPER HEIGHT */
    display: flex;
    align-items: center; /* vertical center */
    justify-content: center; /* optional horizontal center */
    overflow: hidden;
    background: #f6f7f9;
}

/* IMAGE */
.product-image-v4 {
    max-height: 260px; /* never exceed wrapper height */
    width: auto; /* maintain aspect ratio */
    object-fit: contain; /* show full image, centered */
    transition: transform .35s ease;
}

/* HOVER ZOOM */

.product-card-v4:hover .product-image-v4 {
    transform: scale(1.05);
}

/* ===== ACTION BUTTONS ===== */

.product-actions-v4 {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 3; /* ABOVE IMAGE */
}

/* BUTTON BASE */

.action-btn-v4 {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
}

    .action-btn-v4:hover {
        background: #111;
        color: #fff;
    }

/* ===== CONTENT ===== */

.product-content-v4 {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* TITLE */

/* Product title fixed to 2 lines with ellipsis */
/* Product title fixed to 1 line with ellipsis */
.product-title-v4 {
    font-size: 14px;
    font-weight: 600;
    color: #1c1f24;
    line-height: 1.4;
    white-space: nowrap; /* prevent wrapping */
    overflow: hidden; /* hide overflowing text */
    text-overflow: ellipsis; /* show "..." at the end */
}
.product-info-row-v4 {
    display: flex;
    align-items: center;
    gap: 8px; /* space between items */
    font-size: 12px;
    color: #6b7280; /* muted gray */
    flex-wrap: wrap; /* allows wrapping if space is tight */
}

    .product-info-row-v4 .separator {
        color: #d1d5db; /* subtle dot */
        user-select: none;
    }

.product-code-v4,
.product-category-v4 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Optional: make categories look like badges */
.product-category-v4 {
    background-color: #f3f4f6;
    color: #374151;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
}
/* BRAND */

/* Brand + rating on same line */
.product-brand-rating-row-v4 {
    display: flex;
    justify-content: space-between; /* left: brand, right: rating */
    align-items: center;
}

/* Brand text */
.product-brand-v4 {
    font-size: 12px;
    color: #7a808a;
}

/* Rating */
.product-rating-v4 {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: #fbbf24; /* gold for stars */
}

    .product-rating-v4 i {
        font-size: 12px;
        color: #fbbf24;
    }

    /* Optional: rating number */
    .product-rating-v4 .rating-number {
        font-size: 11px;
        color: #6b7280;
        margin-left: 4px;
    }

/* PRICE ROW */

.product-price-availability-row-v4 {
    display: flex;
    justify-content: space-between; /* left: price, right: availability */
    align-items: center;
    gap: 8px;
}

    /* Price */
    .product-price-availability-row-v4 .product-price-v4 {
        font-size: 16px;
        font-weight: 700;
        color: #111;
        white-space: nowrap;
    }
@media (max-width: 576px) {
    .product-price-availability-row-v4 .product-price-v4 {
        font-size: 14px; /* smaller font on mobile */
    }
}
    /* Availability */
    .product-price-availability-row-v4 .product-availability-v4 {
        font-size: 12px;
        font-weight: 600;
        text-align: left;
    }

        .product-price-availability-row-v4 .product-availability-v4 .text-success {
            color: #10b981;
        }

        .product-price-availability-row-v4 .product-availability-v4 .text-danger {
            color: #ef4444;
        }

        .product-price-availability-row-v4 .product-availability-v4 .text-primary {
            color: #3b82f6;
        }

/* ===== ADD TO CART BUTTON ===== */

.add-to-cart-v4 {
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: #111;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s ease;
}

    .add-to-cart-v4:hover {
        background: #000;
    }
.product-footer-v4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Left 70%: Add to Cart */
.product-cart-wrapper {
    flex: 8; /* 70% */
}

/* Right 30%: Availability */
.product-availability-v4 {
    font-size: 12px;
    font-weight: 600;
}

/* Adjust Add to Cart button to full width of its container */
.product-cart-wrapper .add-to-cart-v4 {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
/* ===== MOBILE ===== */
@media (max-width: 576px) {
    .product-footer-v4 {
        flex-direction: column; /* stack vertically */
        align-items: stretch; /* full width for both */
        gap: 6px;
    }

    .product-cart-wrapper,
    .product-availability-v4 {
        flex: unset; /* reset flex */
        width: 100%; /* full width */
        text-align: center; /* center text for availability */
    }
}
/* Container for tags */
.product-tags-v4 {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 5; /* above image */
}

/* Individual tag styling */
.product-tag-v4 {
    background-color: #6366f1; /* purple default, you can customize per tag */
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
/*    text-transform: uppercase;*/
    white-space: nowrap;
}

    /* Optional: different colors for different tag types */
    .product-tag-v4.new {
        background-color: #10b981;
    }
    /* green */
    .product-tag-v4.sale {
        background-color: #ef4444;
    }
    /* red */
    .product-tag-v4.featured {
        background-color: #f59e0b;
    }
/* Ribbon base */
.product-ribbon-v4 {
    position: absolute;
    top: 10px;
    left: -30px; /* adjust for diagonal */
    z-index: 10; /* above everything else */
    background-color: #ef4444; /* red */
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    padding: 4px 40px;
    transform: rotate(-45deg); /* diagonal ribbon */
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    pointer-events: none; /* so it doesn't block buttons */
}

    /* Optional: straight top-left ribbon instead of diagonal */
    .product-ribbon-v4.straight {
        top: 10px;
        left: 10px;
        transform: rotate(0deg);
        padding: 4px 10px;
        border-radius: 4px;
    }