.woopart-images-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.woopart-diagram-column {
    flex: 1;
    min-width: 300px;
}

.woopart-product-column {
    flex: 1;
    min-width: 300px;
	height: fit-content;
}

.woopart-diagram-container {
    position: relative;
    margin-bottom: 20px;
	width: fit-content !important;
}

.diagram-image {
    width: fit-content !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
    margin: 0 auto !important;
	border-radius: 12px;
}


.woopart-fullscreen-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
	height: 24px;
	width: 24px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: solid 1px #474747 !important;
}

.woopart-fullscreen-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
}

.woopart-fullscreen-container > .diagram-image {
	max-height: max-content !important;
}

@media (max-width: 768px) {
	.woopart-fullscreen-container {
		padding: 0px !important;
	}
}

.woopart-fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
	padding: 48px;
}

.woopart-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.woopart-fullscreen-diagram .hotspot {
    cursor: pointer;
    position: absolute;
    z-index: 100;
    border: 2px solid #ff0000;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.3);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.woopart-fullscreen-diagram .hotspot:hover {
    background: rgba(255, 0, 0, 0.5);
    transform: translate(0%, 0%) scale(1.2);
    border-width: 3px;
}


.woopart-popover > .quantity-section > label {
	color: #171717;
}

.woopart-quantity {
    width: 60px;
	height: 40px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.diagram-image {
	max-height: 700px !important;
	object-fit: contain;
	filter: grayscale(50%) contrast(80%) !important; 
}

@media (orientation: landscape) and (max-width: 1024px) {
  .diagram-image {
	max-height:  250px !important;
  }
}

.woopart-fullscreen-container > .diagram-image {
	max-height: 100% !important;
}


.woopart-diagram-container {
	position: relative !important;
	display: block !important;
	display: flex;
	height: 100%;
	width: 100%;
}




.hotspot {
	cursor: pointer;
	position: absolute;
	z-index: 100;
	border: 2px solid #ff0000;
	border-radius: 50%;
	background: rgba(255, 0, 0, 0.3);
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.hotspot:hover {
	background: rgba(255, 0, 0, 0.5);
	transform: translate(-50%, -50%) scale(1.2);
	border-width: 3px;
}

.woopart-popover {
	position: fixed;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 8px 16px rgba(0,0,0,0.2);
	z-index: 10000;
	min-width: 280px;
	max-width: 350px;
	font-family: inherit;
}

.woopart-popover h4 {
	margin: 0 0 10px 0;
	font-size: 18px;
	color: #333;
	font-weight: 600;
}
.woopart-popover p {
	margin: 0 0 15px 0;
	font-size: 14px;
	line-height: 1.5;
	color: #666;
}
.woopart-popover .price {
	font-weight: bold;
	color: #0073aa;
	margin-bottom: 15px;
	font-size: 16px;
}
.woopart-popover .quantity-section {
	margin-bottom: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}
.woopart-popover label {
	margin: 0;
	font-weight: 600;
	font-size: 14px;
}
.woopart-add-to-cart {
	background: #0073aa;
	margin-bottom: 10px;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
}
.woopart-add-to-cart:hover {
	background: #005a87;
}
.woopart-add-to-cart:disabled {
	background: #ccc;
	cursor: not-allowed;
}
.woopart-close {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #999;
	font-weight: bold;
}
.woopart-close:hover {
	background: none;
	color: #333;
}
.woocommerce-grouped-product-list-item__thumbnail.woopart-highlighted,
.woocommerce-grouped-product-list-item__thumbnail.woopart-highlighted > .linked-product-thumbnail {
	color: orange !important;
	border-color: orange !important;
	transition: all 0.3s ease;
}
.woocommerce-grouped-product-list-item__label.woopart-highlighted,
.woocommerce-grouped-product-list-item__label.woopart-highlighted > label {
	color: orange !important;
	transition: all 0.3s ease;
}

.woopart-quantity::-webkit-inner-spin-button,
.woopart-quantity::-webkit-outer-spin-button {
    background: #f0f0f0 !important;
    border: 1px solid #999 !important;
    opacity: 1 !important;
    display: block !important;
    height: auto !important; /* Ensures proper height */
    cursor: pointer !important; /* Shows pointer on hover */
}

/* Optional: Change color on hover */
.woopart-quantity::-webkit-inner-spin-button:hover,
.woopart-quantity::-webkit-outer-spin-button:hover {
    background: #e0e0e0 !important;
}
.woopart-add-to-cart {
    background: #FFFFFF;
    color: #171717;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
	white-space: nowrap;
}

.woopart-add-to-cart:hover {
    background: #f28c38;
	color: #171717;
}

.woopart-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #fff !important;
}

.woopart-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    font-weight: bold;
}

.woopart-close:hover {
    color: #333;
}



.woocommerce-product-gallery .woopart-diagram-container {
    position: relative;
    margin-bottom: 0;
}

.woocommerce-product-gallery .diagram-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Maintain fullscreen button positioning within gallery */
.woocommerce-product-gallery .woopart-fullscreen-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
}

.woocommerce-product-gallery .woopart-fullscreen-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Remove any conflicting styles that might break the layout */
.woocommerce-product-gallery .woopart-diagram-column,
.woocommerce-product-gallery .woopart-product-column {
    flex: unset;
    min-width: unset;
}

/* Ensure the gallery maintains standard WooCommerce styling */
.woocommerce-product-gallery--with-images {
    opacity: 1 !important;
} 
.woocommerce-product-gallery:has(.woopart-diagram-container) .woocommerce-product-gallery__trigger {
    display: none !important;
}

/* Mobile popover styling */
@media screen and (max-width: 768px) {
    .woopart-popover {
        max-width: 90vw !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
    
    /* When in fullscreen mode on mobile */
    .woopart-fullscreen-container .woopart-popover {
        position: fixed !important;
    }
}

/* Ensure popover is always above fullscreen elements */
.woopart-popover {
    z-index: 10001 !important; /* Higher than fullscreen container */
}