/* The Modal Background */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Darkened background */
}

/* Modal Content */
.modal-content {
    background-color: #fff;
    margin: auto;
	margin-top: 200px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 100% !important; /* Force 75% width */
    /*max-width: 1200px; /* Set a maximum width */
    position: relative;
    top: 100px; /* Offset from the top to avoid floating headers */
    transform: translateY(0); /* Ensure it’s centered vertically */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Close Button */
.close {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* Search Bar in Modal */
#modal-search-bar {
    margin-bottom: 20px;
	width: 100%;
}

#modal-search-results {
    border-top: 1px solid #ddd;
    padding-top: 20px;
    margin-top: 20px;
}

/* Main search button */
#category-product-search-form button,
#modal-category-product-search-form button {
    padding: 15px 20px; /* Adjust padding for size */
    font-size: 16px;
    background-color: #dd9933; /* Set button background color */
    color: #fff; /* Button text color */
    border: none; /* Remove default border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer;
    transition: background-color 0.3s; /* Smooth hover effect */
}

/* Hover effect for the button */
#category-product-search-form button:hover,
#modal-category-product-search-form button:hover {
    background-color: #005bb5; /* Darker shade for hover */
}

/* Main search bar on the page */
#category-product-search-form .search-field {
    width: 60%; /* Adjust as needed */
    max-width: 600px;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff; /* Set background to white */
    color: #333; /* Optional: set text color */
}

/* Search bar inside the modal */
#modal-category-product-search-form .search-field {
    width: 80%;
    max-width: 600px;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff; /* Set background to white */
    color: #333;
    margin-bottom: 15px;
}
#modal-search-results {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center-align all product cards */
    gap: 20px; /* Add spacing between product cards */
    padding-top: 20px;
}

/* Style individual product cards */
#modal-search-results .unique-custom-product {
    width: 300px; /* Set a fixed width for consistent card size */
    text-align: center; /* Center content inside each card */
    background-color: #f9f9f9; /* Optional: background color */
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

#modal-search-results .unique-custom-product:hover {
    transform: translateY(-5px); /* Lift effect on hover */
}

/* Image alignment within the card */
#modal-search-results .unique-custom-product img {
    margin: 0 auto;
    display: block; /* Ensures images are centered */
}

/* Additional Modal Adjustments for Responsiveness */
@media (max-width: 768px) {
    .modal-content {
        width: 90% !important;
        padding: 20px;
    }
}

@media (min-width: 1024px) {
    .modal-content {
        width: 75% !important; /* Enforce width on larger screens */
    }
}