/* ===== PRODUCT GRID - 4 columns on desktop, 2 on mobile ===== */
.d-flex.custom_d_flex {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eef2f8;
    justify-content: center;
}

/* ===== PRODUCT CARD ===== */
.custom_div_flex {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 16px 20px;
    border: 1px solid #eef2f8;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Card hover effect - lift and shadow */
.custom_div_flex:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12), 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: #2563eb;
}

/* Card gradient overlay on hover */
.custom_div_flex::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(37, 99, 235, 0) 100%);
    transition: all 0.4s ease;
    opacity: 0;
    border-radius: 16px;
}

.custom_div_flex:hover::before {
    opacity: 1;
}

/* Image wrapper */
.custom_div_flex a:first-child {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #f8faff;
}

/* Product image - zoom effect on hover */
.custome_image_class {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1.2;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

.custom_div_flex:hover .custome_image_class {
    transform: scale(1.05);
}

/* Image shimmer overlay on hover */
.custom_div_flex a:first-child::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.custom_div_flex:hover a:first-child::after {
    transform: rotate(45deg) translateX(100%);
}

/* Product title/name */
.custom_div_flex a:last-child {
    font-weight: 600;
    color: #0b1a2b;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-top: 12px;
    display: block;
    line-height: 1.4;
    text-align: center;
    width: 100%;
    word-wrap: break-word;
}

.custom_div_flex:hover a:last-child {
    color: #2563eb;
}

/* Card bottom accent border */
.custom_div_flex::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2563eb, transparent);
    border-radius: 0 0 3px 3px;
    transition: all 0.4s ease;
    opacity: 0;
}

.custom_div_flex:hover::after {
    opacity: 1;
    left: 10%;
    right: 10%;
}

/* ===== RESPONSIVE - 4 columns on desktop, 2 on mobile ===== */
@media (max-width: 1200px) {
    .d-flex.custom_d_flex {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

@media (max-width: 992px) {
    .d-flex.custom_d_flex {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .d-flex.custom_d_flex {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .custom_div_flex {
        padding: 12px 12px 16px;
    }

    .custom_div_flex a:last-child {
        font-size: 0.8rem;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .d-flex.custom_d_flex {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .custom_div_flex {
        padding: 8px 8px 12px;
        border-radius: 12px;
    }

    .custom_div_flex a:last-child {
        font-size: 0.7rem;
        margin-top: 6px;
    }

    .custome_image_class {
        border-radius: 8px;
    }
}