#custom-photo-upload {
    max-width: 800px;
    margin: 0 auto;
}

#custom-photo-count {
    font-weight: bold;
    margin: 15px 0;
    padding: 10px 0;
    clear: both;
    display: block;
}

#upload-photos-btn {
    margin-bottom: 15px;
}

#preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    clear: both;
}

#cropper-container {
    max-width: 100%;
    margin-bottom: 20px;
    clear: both;
}

#image-to-crop {
    max-width: 100%;
    max-height: 60vh;
}

.cropper-buttons {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

#rotate-button,
#crop-button {
    flex: 1;
    margin: 0 5px;
}

#rotate-button {
    background-color: #f0f0f0;
    color: #333;
}

#rotate-button:hover {
    background-color: #e0e0e0;
}

.preview-image-container {
    position: relative;
}

.preview-image-container img {
    width: 100%;
    height: auto;
}

.delete-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
}

button.single_add_to_cart_button {
    clear: both;
    display: block;
    margin-top: 20px;
}

/* Ensure proper spacing in the custom photo upload area */
#custom-photo-upload > * {
    margin-bottom: 15px;
}

/* Fix for bunched up categories and tags */
.product_meta {
    margin-top: 20px;
    clear: both;
}

.product_meta > span {
    display: block;
    margin-bottom: 10px;
}

/* Hide the original photo count */
.woocommerce-product-details__short-description #photo-count {
    display: none !important;
}

/* Styles for progress and feedback */
#upload-feedback {
    margin-top: 10px;
    font-weight: bold;
}

.progress-bar {
    width: 100%;
    background-color: #f0f0f0;
    padding: 3px;
    border-radius: 3px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2);
}

.progress-bar-fill {
    display: block;
    height: 22px;
    background-color: #659cef;
    border-radius: 3px;
    transition: width 500ms ease-in-out;
}