/**
 * Merineo Product Banner - Frontend Styles
 */

.merineo-product-banner {
    width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.merineo-product-banner a {
    display: flex;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.merineo-product-banner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.merineo-product-banner:hover img {
    transform: scale(1.02);
}

/* WooCommerce product grid integration */
.woocommerce ul.products li.merineo-product-banner {
    float: left;
    clear: none;
    width: 100%;
    margin: 0 0 2.992em;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.woocommerce ul.products li.merineo-product-banner:hover {
    transform: none;
    box-shadow: none;
}

.woocommerce ul.products li.merineo-product-banner .merineo-product-banner {
    margin-bottom: 0;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .merineo-product-banner {
        margin-bottom: 15px;
        padding: 10px;
    }

    .merineo-product-banner:hover {
        transform: none;
    }

    .merineo-product-banner:hover img {
        transform: none;
    }
}

/* Grid layout adjustments */
@media screen and (min-width: 769px) {
    .woocommerce .products .merineo-product-banner {
        /* Ensure banner spans full width in grid */
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* Theme compatibility */
.storefront .merineo-product-banner,
.astra-theme .merineo-product-banner,
.oceanwp .merineo-product-banner {
    margin-bottom: 2em;
}

/* Loading animation */
.merineo-product-banner::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
}

.merineo-product-banner:hover::before {
    opacity: 1;
    animation: shimmer 1s ease-in-out forwards;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
        opacity: 1;
    }
    90% {
        transform: translateX(100%);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}