/**
 * Product Hover Animation Widget Styles
 */

/* Outer background wrapper — new, only holds full-width bg */
.reboot-product-hover-outer {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
}

.reboot-product-hover-outer__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
    border-radius: inherit;
}

.reboot-product-hover-outer__bg--no-image {
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
}

.reboot-product-hover-outer__bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    opacity: 0.72;
    border-radius: inherit;
}

.reboot-product-hover {
    --transition: 0.5s;
    --circle-color: #000000;
    --content-background: #d4030a;
    --circle-size: 160px;
    --product-scale: 1;
    --product-hover-scale: 1.7;

    position: relative;
    display: flex;
    align-items: center;
    min-height: 500px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    cursor: pointer;
    /* Removed overflow: hidden so image can pop out */
}

.reboot-product-hover:hover,
.reboot-product-hover.is-touched {
    max-width: 650px;
}

/* Mask layer to contain background and circle */
.reboot-product-hover__mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    border-radius: inherit;
    z-index: 0;
}

/* All animated elements share the same transition */
.reboot-product-hover,
.reboot-product-hover__circle,
.reboot-product-hover__image,
.reboot-product-hover__image img,
.reboot-product-hover__text,
.reboot-product-hover__text * {
    transition: all var(--transition) !important;
}

/* Background Image Layer */
.reboot-product-hover__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
    border-radius: inherit;
}

.reboot-product-hover__bg--no-image {
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
}

/* Background Overlay */
.reboot-product-hover__bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    opacity: 0.72;
    border-radius: inherit;
}

/* Circle Reveal Effect */
.reboot-product-hover__circle {
    content: "";
    background: var(--circle-color);
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    border-radius: inherit;
    clip-path: circle(var(--circle-size) at center);
    z-index: 1;
}

.reboot-product-hover:hover .reboot-product-hover__circle,
.reboot-product-hover.is-touched .reboot-product-hover__circle {
    clip-path: circle(1500px at center);
    background: var(--content-background);
}

/* Product Image */
.reboot-product-hover__image {
    position: absolute;
    top: var(--product-y, 50%);
    left: var(--product-x, 50%);
    transform: translate(-50%, -50%) scale(var(--product-scale));
    z-index: 2;
}

.reboot-product-hover__image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.reboot-product-hover:hover .reboot-product-hover__image {
    top: var(--product-hover-y, 75%);
    left: var(--product-hover-x, 100%);
    transform: translate(-50%, -50%) scale(var(--product-hover-scale));
}

/* Text Content */
.reboot-product-hover__text {
    position: relative;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-30px);
}

.reboot-product-hover:hover .reboot-product-hover__text {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Heading */
.reboot-product-hover__heading {
    margin: 0 0 15px 0;
    padding: 0;
}

/* Description */
.reboot-product-hover__description {
    margin: 0 0 20px 0;
    padding: 0;
}

/* Button */
.reboot-product-hover__button {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.reboot-product-hover__button:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 767px) {
    .reboot-product-hover {
        flex-direction: column;
        justify-content: flex-end;
        min-height: 500px;
        align-items: stretch;
    }

    .reboot-product-hover__image {
        top: var(--product-y, 50%);
        left: var(--product-x, 50%);
        transform: translate(-50%, -50%) scale(var(--product-scale));
    }

    .reboot-product-hover:hover .reboot-product-hover__image {
        top: var(--product-hover-y, 22%);
        left: var(--product-hover-x, 100%);
        transform: translate(-50%, -50%) scale(var(--product-hover-scale, 0.6));
    }

    .reboot-product-hover__text {
        text-align: center;
        padding: 0 20px;
    }

    .reboot-product-hover:hover .reboot-product-hover__text {
        transform: translateX(0);
    }
}
