/* ============================================================
   Courses Loop — Image Zoom, Overlay & Button Effects
   ============================================================ */

.Courses-loop .image-wrapper {
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    border-radius: 12px !important;
}

.Courses-loop .image-wrapper img.Courses-loop-featured-image {
    display: block !important;
    width: 100% !important;
    height: 375px !important;
    object-fit: cover !important;
    transition: transform 0.4s ease !important;
    border-radius: 12px !important;
}

.Courses-loop:hover .image-wrapper img.Courses-loop-featured-image {
    transform: scale(1.05) !important;
}

/* Dark overlay via ::after pseudo-element */
.Courses-loop .image-wrapper::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0) !important;
    transition: background 0.4s ease !important;
    pointer-events: none !important;
    z-index: 5 !important;
    border-radius: 12px !important;
}

.Courses-loop:hover .image-wrapper::after {
    background: rgba(0, 0, 0, 0.45) !important;
}

/* Add-to-Cart button — hidden by default, slides up on hover */
.Courses-loop .Add-to-Cart {
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 10 !important;
    transform: translateY(10px) !important;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease !important;
}

.Courses-loop:hover .Add-to-Cart {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Lock transform in WooCommerce loading/added states to prevent position shift */
.Courses-loop .Add-to-Cart.loading,
.Courses-loop .Add-to-Cart.added,
.Courses-loop:hover .Add-to-Cart.loading,
.Courses-loop:hover .Add-to-Cart.added {
    transform: translateY(0) !important;
}

/* Hide WooCommerce "View cart" link injected after add-to-cart (scoped + global) */
.Courses-loop a.added_to_cart,
a.added_to_cart.wc-forward {
    display: none !important;
}
