/* Global Styles */
.custom-product-gallery-left {
    float: left;
    width: 48%; /* Match the WooCommerce gallery's width */
    box-sizing: border-box;
    position: relative;
    margin-bottom: 2em; /* Match the WooCommerce gallery's margin */
}

div.product div.summary, .woocommerce-page div.product div.summary {
    float: right;
    width: 48% !important; /* Adjust to match the new gallery width for balance */
    clear: none;
}

.custom-summary p {
    margin-bottom: 10px !important;
}

.custom-summary input {
    margin-bottom: 0px !important;
}

.inventory-product-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
}

.links-and-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    width: 100%;
}

.main-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 100%;
    overflow: hidden;
    border: 2px solid #ddd;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

/* Adjust the main image to preserve aspect ratio without cropping */
.main-media {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from 'cover' to 'contain' to preserve aspect ratio */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    min-height: 0; /* Remove min-height to allow the image to scale naturally */
    max-width: 100%;
    display: block;
    margin: 0 auto;
    cursor: pointer;
}
.main-media.fade-in {
    opacity: 1;
}

.thumbnail-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 10px;
    justify-content: left;
}

.thumbnail-container {
    max-height: 80px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #ddd; /* Uniform border for thumbnails */
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 0 23%;
    max-width: 23%;
}

.thumbnail {
    width: 100%;
    height: auto;
    border: none;
    transition: transform 0.2s ease;
    min-height: 74px;
    cursor: pointer;
}

.thumbnail:hover {
    transform: scale(1.1); /* Slight zoom on hover */
}

.custom-product-image {
    width: 100%;
    max-width: 432px;
    height: 230px !important;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 8px 8px 0 0; /* Top corners rounded */
}

.product-details {
    background-color: white;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    margin-top: 0 !important;
}

.product-details strong {
    font-weight: bold;
}

.more-details-button {
    display: inline-block;
    background-color: #0f2d50;
    color: white;
    text-align: center;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
}

.more-details-button:hover {
    background-color: #09203a; /* Slightly darker on hover */
}

#rfq.highlight {
    animation: flash-border 1.5s ease-in-out;
}

@keyframes flash-border {
    0%, 100% {
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
    50% {
        box-shadow: 0 0 10px 5px rgba(255, 165, 0, 0.8); /* Orange glow */
    }
}

/* Arrow Styles */
.arrow {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    color: white;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 35px;
}

.left-arrow {
    left: 10px;
}

.right-arrow {
    right: 10px;
}
/* Add to product-gallery.css */
.callback-lightbox .wpcf7-form {
    display: block !important; /* Ensure the form is visible */
    width: 100%;
    box-sizing: border-box;
}

.callback-lightbox .wpcf7-form * {
    visibility: visible !important; /* Ensure all form elements are visible */
}
/* Add to product-gallery.css */
.lightbox-content .wpcf7-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px; /* Adjust as needed for your form */
    max-height: 80vh;
    overflow-y: auto;
}
/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* Stack content vertically */
}

/* Ensure the lightbox content is a positioning context */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 5em;
}

/* Style the close button */
.close-lightbox {
    position: absolute;
    top: 10px; /* Move closer to the edge for visibility */
    right: 10px;
    color: #000; /* Change to black for visibility against the white form background */
    font-size: 30px;
    cursor: pointer;
    z-index: 1001; /* Ensure it’s above the form */
    background: rgba(255, 255, 255, 0.8); /* Add a slight background for contrast */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

/* Optional: Add hover effect for better UX */
.close-lightbox:hover {
    background: rgba(0, 0, 0, 0.2); /* Red tint on hover */
    color: #FFFFFF;
}

.lightbox-media {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}



.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    cursor: pointer;
    user-select: none;
}

.lightbox-arrow.left-arrow {
    left: 20px;
}

.lightbox-arrow.right-arrow {
    right: 20px;
}

/* Video Thumbnail Styles */
.video-thumbnail-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
    text-align: center;
    background-color: #0f2d50; /* Optional: Add a background color */
}

.video-thumbnail {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.video-text {
font-size: 13px;
font-weight:600;
    line-height: 1em;
    padding-left: .5em;
    padding-right: .5em;
    color:#ffffff;
}
.video-label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.video-icon {
    font-size: 18px;
    color: #000; /* Adjust the color as needed */
}

/* Mobile Responsive Styles */
@media (max-width: 800px) {
    .main-image-wrapper {
    max-width: 760px!important;
    width: 100%!important;
}
    .custom-product-gallery-left {
        width: 100%;
        float: none;
        margin: 0 auto;
    }

    div.product div.summary, .woocommerce-page div.product div.summary {
        width: 100% !important;
        float: none;
    }
}