/* ===== SGN Premium Product Card Overlay ===== */
/* Targets existing .product > .img-prod > .overlay structure */

/* --- Card wrapper --- */
.product {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.product:hover {
    box-shadow: 0 20px 50px rgba(56, 159, 10, 0.18);
    transform: translateY(-6px);
}

/* --- Image zoom on hover --- */
.product .img-prod {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.product .img-prod img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.product:hover .img-prod img {
    transform: scale(1.1);
}

/* --- Glassmorphism overlay (replaces/enhances existing .overlay) --- */
.product .img-prod .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    border-radius: 16px 16px 0 0;
}

.product:hover .img-prod .overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* --- Glowing green gradient circular button --- */
.product .img-prod .overlay::after {
    content: '↗';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #43a047, #66bb6a, #2e7d32);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    box-shadow:
        0 0 20px rgba(67, 160, 71, 0.5),
        0 0 40px rgba(67, 160, 71, 0.25),
        0 4px 15px rgba(0, 0, 0, 0.2);
    transform: scale(0.5) rotate(-45deg);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: 0.08s;
    animation: sgn-btn-pulse 2s ease-in-out infinite;
    animation-play-state: paused;
}

.product:hover .img-prod .overlay::after {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    animation-play-state: running;
}

/* --- "View More" text label on overlay --- */
.product .img-prod .overlay::before {
    content: 'View More';
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 18px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    opacity: 0;
    transition: all 0.4s ease;
    transition-delay: 0.15s;
    white-space: nowrap;
}

.product:hover .img-prod .overlay::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Pulse glow animation for the button --- */
@keyframes sgn-btn-pulse {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(67, 160, 71, 0.5),
            0 0 40px rgba(67, 160, 71, 0.25),
            0 4px 15px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow:
            0 0 30px rgba(67, 160, 71, 0.7),
            0 0 60px rgba(67, 160, 71, 0.35),
            0 4px 20px rgba(0, 0, 0, 0.25);
    }
}

/* --- Ripple click effect --- */
.sgn-ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67, 160, 71, 0.5) 0%, transparent 70%);
    transform: scale(0);
    animation: sgn-ripple-anim 0.7s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes sgn-ripple-anim {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==========================================================
   MOBILE: Subtle bottom overlay label "Tap to View More"
   ========================================================== */
@media (max-width: 991.98px) {

    /* Show a persistent subtle bottom label on mobile */
    .product .img-prod .overlay {
        opacity: 1;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        pointer-events: none;
    }

    /* Hide the desktop circular button on mobile */
    .product .img-prod .overlay::after {
        display: none;
    }

    /* Persistent "Tap to View More" label at the bottom */
    .product .img-prod .overlay::before {
        content: 'Tap to View More';
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        bottom: 10px;
        font-size: 11px;
        letter-spacing: 1px;
        padding: 5px 14px;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-color: rgba(255, 255, 255, 0.15);
        pointer-events: none;
        transition-delay: 0s;
        animation: sgn-mobile-label-fade 3s ease-in-out infinite;
    }

    @keyframes sgn-mobile-label-fade {

        0%,
        100% {
            opacity: 0.7;
        }

        50% {
            opacity: 1;
        }
    }

    /* On touch/hover, reveal full overlay briefly */
    .product:hover .img-prod .overlay,
    .product:active .img-prod .overlay {
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        pointer-events: auto;
    }

    .product:hover .img-prod .overlay::before,
    .product:active .img-prod .overlay::before {
        background: rgba(67, 160, 71, 0.7);
        border-color: rgba(67, 160, 71, 0.5);
        opacity: 1;
        animation: none;
    }
}

/* Extra small screens */
@media (max-width: 575.98px) {
    .product .img-prod .overlay::before {
        font-size: 10px;
        padding: 4px 12px;
        bottom: 8px;
    }
}