/* WooCommerce Product Custom Media Frontend Styles */

.wpc-media-wrapper {
    width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
}

/* Individual media container styling */
.wpc-media-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-sizing: border-box;
}

.wpc-media-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Stacked spacing */
.wpc-media-wrapper > .wpc-media-item:not(:last-child) {
    margin-bottom: 24px;
}

/* Image Item Styling */
.wpc-media-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    background-color: #fcfcfc;
    display: block;
    border-radius: 16px;
    transition: opacity 0.3s ease;
}

/* Video Item (YouTube embed container for responsiveness) */
.wpc-media-video {
    position: relative;
    width: 100%;
    /* Modern aspect-ratio with old-school padding-bottom fallback */
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
}

.wpc-media-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 16px;
}

/* Fallback for older browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .wpc-media-video {
        height: 0;
        padding-bottom: 56.25%; /* 16:9 ratio */
    }
}
