/* Grid for 3 columns per row */
.product-grid {
    display: flex;                /* Use flexbox */
    flex-wrap: wrap;             /* Allow items to wrap to the next line */
    gap: 15px; 
}

/* Hide radio buttons */
.product-option input[type="radio"] {
    display: none;
}

/* Style the product container */
.product-option label {
    display: block;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 10px;
    text-align: center;
    padding: 10px;
    transition: border 0.3s;
    position: relative;
    
}

.product-option {
    flex: 1 1 calc(33.33% - 20px); /* Take 1/3 of the row, minus the gap */
    position: relative;           /* For positioning checkmark */
    margin: 1px;                 /* Space between items */
}



/* Highlight on hover */
.product-option:hover label {
    border: 2px solid #007bff; /* Blue border on hover */
}

/* Product image styling */
.product-image-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.product-image {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    transition: transform 0.3s;
}

/* Scale the image when hovered */
.product-image-container:hover .product-image {
    transform: scale(1.1); /* Slight zoom effect */
}

/*Image hover in display current votes*/
.image-hover {
    display: none;
    position: absolute;
    top: -50px; /* Adjust as needed to position the image */
    left: 100px; /* Adjust to show the image without overlaying it on the current one */
    z-index: 10; /* Make sure it's on top */
    background-color: white; /* Optional: to give a background behind the image */
    border: 1px solid #ccc; /* Optional: Add a border around the enlarged image */
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/*Image hover in display current votes*/
.product-image1-container:hover {
    display: block;
}

/* Checkmark (initially hidden) */
.checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    color: #007bff;
    opacity: 0;
    transition: opacity 0.3s;
}

/* When selected, show the checkmark */
.product-option input[type="radio"]:checked + label .checkmark {
    opacity: 1;
}

/* When selected, highlight the border */
.product-option input[type="radio"]:checked + label {
    border: 2px solid #007bff; /* Blue border when selected */
}

/* Highlight the voted product */
.voted-product {
    border: 2px solid #4caf50; /* Green border for voted product */
    background-color: #f0fff0; /* Light green background */
    position: relative;
}

/* Small text indicating "Your vote" */
.voted-text {
    display: block;
    color: #4caf50;
    font-weight: bold;
    font-size: 16px;
    margin-right: 10px;
}

/* Style for the current votes section */
#currentVotes .s-product-container {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

/* Highlight the voted product */
.highlight-voted {
    border: 2px solid #4caf50; /* Green border for voted product */
    background-color: #f0fff0; /* Light green background */
    border-radius: 6px;
}

.product-container {
    border: 2px solid transparent;
    padding: 5px;
    transition: border 0.3s ease-in-out;
}

.product-container:highlight-voted {
    border-color: #4caf50; /* Green border to highlight */
    background-color: #e6ffe6; /* Light green background */
    border-radius: 10px;
}

.product-container img {
    transition: transform 0.3s ease-in-out;
}

.product-container:hover img {
    transform: scale(1.05); /* Slight enlarge effect */
}

/* Base styles for the badges */
.badge {
    position: absolute;
    top: 5px;
    left: 5px;
    border-radius: 12px;
    font-weight: bold;
    z-index: 10;
    width: 60px; /* Fixed width to ensure consistency */
    text-align: center;
    background-color: transparent; /* Transparent background */
    text-shadow: 
        -1px -1px 0 #000,  
        1px -1px 0 #000,  
        -1px 1px 0 #000,  
        1px 1px 0 #000; /* Stroke effect: black shadow around text */
}

/* Shine effect with faster travel across the badge */
.effect-shine {
    -webkit-mask-image: linear-gradient(-75deg, rgba(0,0,0,.6) 30%, #000 50%, rgba(0,0,0,.6) 70%);
    -webkit-mask-size: 300%;
    animation: shine 3s infinite; /* Keep total animation cycle at 3s */
    display: inline-block; /* Ensure it behaves like an inline element for text */
}

@-webkit-keyframes shine {
    0%, 50% { /* No shine for 80% of the time */
        -webkit-mask-position: 150%; /* Position off-screen */
    }
    51% { /* Shine appears quickly and travels across */
        -webkit-mask-position: 100%; 
    }
    95% { /* Shine moves fast */
        -webkit-mask-position: -50%; 
    }
    100% { /* End of shine */
        -webkit-mask-position: -50%;
    }
}


/* Gold badge for 1st place */
.badge-gold {
    color: gold; /* Gold text and icon */
}

/* Silver badge for 2nd place */
.badge-silver {
    color: silver; /* Silver text and icon */
}

/* Icon styling (adjust icon size if necessary) */
.badge .fa-crown {
    margin-left: 3px;
    font-size: 16px; /* Adjust size if needed */
}
.badge-text-style{
    font-size: 12px; /* badge text size */
}
#countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap; /* Ensure the items wrap on smaller screens */
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 10px;
}

.countdown-box {
    font-size: 24px;
    font-weight: bold;
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
    margin: 0;
    border-radius: 5px;
    width: 80px; /* Fixed width */
    height: 60px; /* Fixed height */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Text below the countdown */
.countdown-text {
    font-size: 18px;
    margin-top: 10px;
    color: #333;
    text-align: center;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    .countdown-wrapper {
        flex-direction: column; /* Stack the countdown items vertically on small screens */
    }
    
    .countdown-item {
        margin: 2px 0; /* Add margin to separate items vertically */
    }
    
    .countdown-box {
        width: 100px; /* Adjust the width to fit better on smaller screens */
        height: 50px; /* Adjust height for smaller screens */
        font-size: 20px; /* Slightly smaller font size for smaller screens */
    }
}

.no-products-container {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9; /* Light background */
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.no-products-gif {
    max-width: 300px;
    margin: 0 auto;
    display: block;
    animation: bounce 2s infinite ease-in-out; /* Bounce effect */
}

.no-products-message {
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    color: #333;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}