.error {
    color: red !important;
}

a{
    text-decoration: none !important;
}

/* Modal styles */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.6);
    /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    /* Adjust as needed */
    max-width: 1000px;
    /* Max width for larger screens */
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--black);
    /* Assuming you have a CSS variable for black */
}

.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: var(--main-color);
    /* Assuming you have a main color variable */
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-wrap: wrap;
    /* Allows wrapping on smaller screens */
    gap: 30px;
    justify-content: center;
}

.template-section,
.upload-section {
    flex: 1;
    /* Distribute space equally */
    min-width: 300px;
    /* Minimum width before wrapping */
}

.template-section h3,
.upload-section h3 {
    color: var(--black);
    margin-bottom: 15px;
    text-align: center;
}

.photo-frame-container {
    position: relative;
    width: 100%;
    /* This container will expand to fit the template image */
    background-color: #eee;
    /* Placeholder background */
    border: 1px solid #ddd;
    overflow: hidden;
    display: flex;
    /* Helps center the image */
    justify-content: center;
    align-items: center;
}

.photo-frame-template {
    position: relative;
    /* Changed to relative so its natural flow defines container size */
    width: 100%;
    height: auto;
    /* Allow height to adjust naturally */
    object-fit: contain;
    /* 'contain' is usually better for templates as it preserves aspect ratio */
    z-index: 2;
    /* Make sure template is above uploaded image */
}

.uploaded-image {
    position: absolute;
    /* These will be set dynamically by JavaScript */
    /* top: 0; */
    /* left: 0; */
    /* width: 100%; */
    /* height: 100%; */
    object-fit: cover;
    /* This will make the image fill the area, cropping if necessary */
    z-index: 9;
    /* Make sure uploaded image is below the template */
    display: none;
    /* Hidden until an image is uploaded */
    /* border-radius will also be set dynamically */
}

.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.upload-section input[type="file"] {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    max-width: 300px;
}

.confirm-personalization-btn {
    margin-top: 20px;
}


.product-item{
    max-width: 400px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}