/* ========================================
   GRID.CSS - Product Grid Styles
   For category pages like ssn.html, bank-statement.html, etc.
   ======================================== */

/* ===== PRODUCTS SECTION STYLES ===== */

/* Container for products - FORCE 4 PER ROW */
.d-flex.custom_d_flex {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    padding: 20px 0 40px 0 !important;
    justify-content: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Individual product card - EXACTLY 4 PER ROW */
.custom_div_flex {
    flex: 0 0 calc((100% - 60px) / 4) !important;
    max-width: calc((100% - 60px) / 4) !important;
    min-width: 180px !important;
    text-align: center !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 15px 15px 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    position: relative !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    box-sizing: border-box !important;
    border: 1px solid #f0f0f0 !important;
}

/* Hover effect for product card - LIFT UP */
.custom_div_flex:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
    border-color: #c49a6c !important;
}

/* Product image wrapper */
.custom_div_flex a:first-child {
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    position: relative !important;
}

/* Product image */
.custom_div_flex .custome_image_class {
    width: 100% !important;
    height: auto !important;
    max-height: 220px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
    transition: transform 0.5s ease, opacity 0.3s ease !important;
    display: block !important;
    border: 1px solid #eee !important;
}

/* Image hover animation - ZOOM & FADE */
.custom_div_flex:hover .custome_image_class {
    transform: scale(1.06) !important;
    opacity: 0.92 !important;
}

/* Product title link - CLEAN & READABLE */
.custom_div_flex a:last-child {
    display: block !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    margin-top: 8px !important;
    color: #2c3e50 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    line-height: 1.3 !important;
    padding: 0 5px !important;
    width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-align: center !important;
    min-height: 32px !important;
}

/* Show full title on hover */
.custom_div_flex:hover a:last-child {
    color: #c49a6c !important;
}

/* Border animation on hover - GOLD LINE SLIDES IN */
.custom_div_flex::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #c49a6c, #e8c9a0, #c49a6c) !important;
    transform: scaleX(0) !important;
    transform-origin: left !important;
    transition: transform 0.4s ease !important;
    border-radius: 12px 12px 0 0 !important;
}

.custom_div_flex:hover::before {
    transform: scaleX(1) !important;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Desktop - EXACTLY 4 products */
@media screen and (min-width: 1025px) {
    .custom_div_flex {
        flex: 0 0 calc((100% - 60px) / 4) !important;
        max-width: calc((100% - 60px) / 4) !important;
        min-width: 180px !important;
    }
    
    .custom_div_flex a:last-child {
        font-size: 14px !important;
        min-height: 38px !important;
    }
}

/* Laptop / Small Desktop - still 4 products */
@media screen and (min-width: 993px) and (max-width: 1024px) {
    .custom_div_flex {
        flex: 0 0 calc((100% - 60px) / 4) !important;
        max-width: calc((100% - 60px) / 4) !important;
        min-width: 160px !important;
        padding: 12px 12px 16px !important;
    }

    .custom_div_flex .custome_image_class {
        max-height: 180px !important;
    }

    .custom_div_flex a:last-child {
        font-size: 13px !important;
        min-height: 34px !important;
    }
}

/* Tablet - 3 products */
@media screen and (min-width: 769px) and (max-width: 992px) {
    .custom_div_flex {
        flex: 0 0 calc((100% - 40px) / 3) !important;
        max-width: calc((100% - 40px) / 3) !important;
        min-width: 150px !important;
        padding: 12px 12px 16px !important;
    }

    .custom_div_flex .custome_image_class {
        max-height: 180px !important;
    }

    .custom_div_flex a:last-child {
        font-size: 13px !important;
        min-height: 34px !important;
    }

    .d-flex.custom_d_flex {
        gap: 15px !important;
    }
}

/* Tablet Small / Large Mobile - 2 products */
@media screen and (min-width: 601px) and (max-width: 768px) {
    .custom_div_flex {
        flex: 0 0 calc((100% - 15px) / 2) !important;
        max-width: calc((100% - 15px) / 2) !important;
        min-width: 130px !important;
        padding: 10px 10px 14px !important;
    }

    .custom_div_flex .custome_image_class {
        max-height: 160px !important;
    }

    .custom_div_flex a:last-child {
        font-size: 12px !important;
        min-height: 30px !important;
    }

    .d-flex.custom_d_flex {
        gap: 15px !important;
        padding: 12px 0 25px 0 !important;
    }

    .custom_div_flex:hover {
        transform: translateY(-4px) !important;
    }

    .custom_div_flex:hover .custome_image_class {
        transform: scale(1.04) !important;
    }
}

/* Mobile - 2 products */
@media screen and (max-width: 600px) {
    .custom_div_flex {
        flex: 0 0 calc((100% - 10px) / 2) !important;
        max-width: calc((100% - 10px) / 2) !important;
        min-width: 110px !important;
        padding: 8px 8px 12px !important;
        border-radius: 10px !important;
    }

    .custom_div_flex .custome_image_class {
        max-height: 140px !important;
        border-radius: 6px !important;
        margin-bottom: 8px !important;
    }

    .custom_div_flex a:last-child {
        font-size: 11px !important;
        margin-top: 6px !important;
        min-height: 26px !important;
        line-height: 1.2 !important;
    }

    .d-flex.custom_d_flex {
        gap: 10px !important;
        padding: 8px 0 20px 0 !important;
    }

    .custom_div_flex:hover {
        transform: translateY(-3px) !important;
    }

    .custom_div_flex:hover .custome_image_class {
        transform: scale(1.03) !important;
    }

    /* Hide border animation on mobile */
    .custom_div_flex::before {
        display: none !important;
    }
}

/* Very Small Mobile */
@media screen and (max-width: 400px) {
    .custom_div_flex {
        flex: 0 0 calc((100% - 8px) / 2) !important;
        max-width: calc((100% - 8px) / 2) !important;
        min-width: 90px !important;
        padding: 6px 6px 10px !important;
        border-radius: 8px !important;
    }

    .custom_div_flex .custome_image_class {
        max-height: 110px !important;
        border-radius: 5px !important;
        margin-bottom: 6px !important;
    }

    .custom_div_flex a:last-child {
        font-size: 10px !important;
        min-height: 22px !important;
        line-height: 1.2 !important;
        padding: 0 3px !important;
    }

    .d-flex.custom_d_flex {
        gap: 6px !important;
        padding: 5px 0 15px 0 !important;
    }
}

/* ===== EXTRA LARGE DESKTOP - still 4 products (wider) ===== */
@media screen and (min-width: 1600px) {
    .custom_div_flex {
        flex: 0 0 calc((100% - 60px) / 4) !important;
        max-width: calc((100% - 60px) / 4) !important;
        min-width: 220px !important;
    }

    .custom_div_flex .custome_image_class {
        max-height: 250px !important;
    }

    .custom_div_flex a:last-child {
        font-size: 15px !important;
        min-height: 40px !important;
    }
}

/* ===== ANIMATION ON PAGE LOAD - FADE IN ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom_div_flex {
    animation: fadeInUp 0.5s ease forwards !important;
}

/* Stagger animation delay for each product */
.custom_div_flex:nth-child(1) { animation-delay: 0.03s; }
.custom_div_flex:nth-child(2) { animation-delay: 0.06s; }
.custom_div_flex:nth-child(3) { animation-delay: 0.09s; }
.custom_div_flex:nth-child(4) { animation-delay: 0.12s; }
.custom_div_flex:nth-child(5) { animation-delay: 0.15s; }
.custom_div_flex:nth-child(6) { animation-delay: 0.18s; }
.custom_div_flex:nth-child(7) { animation-delay: 0.21s; }
.custom_div_flex:nth-child(8) { animation-delay: 0.24s; }
.custom_div_flex:nth-child(9) { animation-delay: 0.27s; }
.custom_div_flex:nth-child(10) { animation-delay: 0.30s; }
.custom_div_flex:nth-child(11) { animation-delay: 0.33s; }
.custom_div_flex:nth-child(12) { animation-delay: 0.36s; }
.custom_div_flex:nth-child(13) { animation-delay: 0.39s; }
.custom_div_flex:nth-child(14) { animation-delay: 0.42s; }
.custom_div_flex:nth-child(15) { animation-delay: 0.45s; }
.custom_div_flex:nth-child(16) { animation-delay: 0.48s; }

