/**
 * Product Page Cleanup - Hide duplicates and unnecessary elements
 */

/* Hide the default product reassurance block module completely */
.blockreassurance:not(.product-specs-box),
#blockreassurance,
.blockreassurance_product,
#module-blockreassurance-blockreassurance,
.col-lg-6.col-xl-5.order-lg-1 .blockreassurance_product,
div.blockreassurance_product,
.product .blockreassurance_product {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Also hide the entire column if it only contains reassurance */
.col-lg-6.col-xl-5.order-lg-1:has(.blockreassurance_product):not(:has(.product__infos)) {
    display: none !important;
}

/* Hide social sharing buttons */
.social-sharing {
    display: none !important;
}

/* Hide the delivery information section card */
.delivery-info-section {
    display: none !important;
}

/* But keep our specs visible when using the reassurance hook */
.product-reassurance .product-specs-box {
    display: block !important;
}

/* Override any inline styles in the reassurance block */
style + .blockreassurance_product {
    display: none !important;
}

/* Hide any style tags that come before reassurance blocks */
.row style:has(+ .blockreassurance_product) {
    display: none !important;
}

/* Hide duplicate delivery information sections */
.delivery-information + .delivery-information {
    display: none !important;
}

/* If our custom specs exist, hide the default delivery info */
.product-specs-box ~ .delivery-information {
    display: none !important;
}

/* Clean up spacing after removing elements */
.product-information {
    gap: 20px;
}

/* Optimize product page layout */
.product.js-product-container {
    max-width: 100% !important;
}

/* Reduce white space around product images */
.product__left {
    margin-bottom: 0 !important;
    padding-right: 10px !important;
}

.product__images {
    margin-bottom: 0 !important;
}

.product__col {
    padding-left: 10px !important;
}

/* Force the column containing product infos to be full width */
.col-lg-6.col-xl-5.order-lg-1:has(.product__infos),
.col-lg-6:has(.product__infos),
.row > div:has(.product__infos) {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Make product info sections side by side in a grid */
.product__infos {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr !important;
    gap: 20px !important;
    margin-top: 30px !important;
    width: 100% !important;
}

/* Description takes first column */
#description {
    grid-column: 1 !important;
}

/* Product details takes second column */
#product-details {
    grid-column: 2 !important;
}

/* Data sheet takes third column */
#product-features {
    grid-column: 3 !important;
}

/* Keep all accordions expanded by default */
.product__infos .accordion-button {
    background: #f8f9fa !important;
    font-weight: 600 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    font-size: 1.1rem !important;
    color: #2c3e50 !important;
}

.product__infos .accordion-button:not(.collapsed) {
    box-shadow: none !important;
    background: #f0f0f0 !important;
}

/* Always show accordion content */
.product__infos .accordion-collapse {
    display: block !important;
    visibility: visible !important;
}

/* Remove collapse animation */
.product__infos .accordion-collapse.show,
.product__infos .accordion-collapse {
    transition: none !important;
}

/* Adjust accordion styling for better layout */
.product__infos .accordion-item {
    margin-bottom: 0 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* Style accordion headers */
.product__infos .accordion-header {
    border-bottom: 1px solid #dee2e6 !important;
}

/* Reduce padding in accordion bodies for tighter layout */
.product__infos .accordion-body {
    padding: 20px !important;
    background: white !important;
}

/* Make accordion buttons non-clickable since they're always open */
.product__infos .accordion-button {
    pointer-events: none !important;
    cursor: default !important;
}

/* Hide the accordion toggle arrow since they're always open */
.product__infos .accordion-button::after {
    display: none !important;
}

/* Adjust product additional info area spacing */
.product__additional-info {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* On mobile, stack normally */
@media (max-width: 768px) {
    .product__infos {
        display: block !important;
    }

    #description,
    #product-details,
    #product-features {
        grid-column: unset !important;
    }
}

/* Keep our custom elements always visible */
.product-specs-box,
.bulk-order-notice,
.product-trust-badges,
.urgency-message {
    display: block !important;
}