/* Custom styles for the menu positioning */
#menu {
    width: 150px; /* Adjust menu width as needed */
    position: absolute; /* Positioned relative to the viewport by JS */
    z-index: 1000;
    list-style: none; /* Remove default list styling */
    padding: 0.5rem 0; /* Adjust padding for menu items */
    margin: 0;
    text-align: left;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0; /* light gray border */
}
#menu li {
    padding: 0; /* Remove default list item padding */
    margin: 0;
}
#menu li a {
    display: block;
    padding: 0.75rem 1rem; /* Padding inside each menu item link */
    text-decoration: none;
    color: #4a5568; /* Dark gray text */
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
#menu li a:hover,
#menu li a:focus {
    background-color: #f7fafc; /* Light gray on hover/focus */
    color: #2d3748; /* Slightly darker text on hover/focus */
    outline: none; /* Remove default focus outline */
}
#menu li a i {
    pointer-events: none;
}

#menuButton {
	margin-left: auto;
	margin-right: 1rem;
	padding: .25rem .5rem;
}

/* Utility class to hide the menu */
.hidden {
    display: none;
}

/* Styling for dynamically generated listing items */
/* These styles will apply to items inside #dynamicListingsContainer */
.dynamic-listing-item {
    background-color: #ffffff;
    border-radius: 0.75rem; /* rounded-lg */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    transition: all 0.3s ease-in-out;
    border: 1px solid #cbd5e0; /* slate-300 */
}

/* Common styles for image placeholder in dynamic listings */
.dynamic-listing-item .img-placeholder {
    background-color: #cbd5e0; /* slate-300 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem; /* text-sm */
    color: #64748b; /* slate-500 */
    overflow: hidden; /* Ensure image doesn't overflow rounded corners */
}
.dynamic-listing-item .img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, crop if needed */
}


/* Specific styles for different dynamic view modes */

/* List View for dynamic listings (Custom CSS Layout) */
.dynamic-listings-container.view-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Space between list items */
}
.dynamic-listings-container.view-list .dynamic-listing-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
}
.dynamic-listings-container.view-list .dynamic-listing-item .img-placeholder {
    width: 100px; /* Fixed width for list image */
    height: 100px;
    min-width: 100px; /* Prevent shrinking */
    margin-right: 1rem;
    border-radius: 0.5rem;
}
.dynamic-listings-container.view-list .dynamic-listing-item .content {
    flex-grow: 1;
}
.dynamic-listings-container.view-list .dynamic-listing-item h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    margin-bottom: 0.5rem;
}
.dynamic-listings-container.view-list .dynamic-listing-item p {
    font-size: 0.875rem; /* text-sm */
    color: #64748b; /* slate-500 */
}
.dynamic-listings-container.view-list .dynamic-listing-item .listing-attributes {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4a5568;
}
.dynamic-listings-container.view-list .dynamic-listing-item .listing-attribute-item {
    display: inline-block;
    margin-right: 1rem;
    white-space: nowrap;
}

/* Small Grid View for dynamic listings (Custom CSS Layout) */
.dynamic-listings-container.view-smallGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Use grid for columns */
    gap: 1rem; /* Smaller gap for small grid */
}
.dynamic-listings-container.view-smallGrid .dynamic-listing-item {
    text-align: center;
}
.dynamic-listings-container.view-smallGrid .dynamic-listing-item .img-placeholder {
    width: 100%; /* Image fills card width */
    height: 120px; /* Fixed height for small grid image */
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
}
.dynamic-listings-container.view-smallGrid .dynamic-listing-item h3 {
    font-size: 1rem; /* text-lg */
    font-weight: 500; /* font-medium */
    margin-bottom: 0.25rem;
    white-space: nowrap; /* Prevent title wrap */
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis */
}
.dynamic-listings-container.view-smallGrid .dynamic-listing-item p {
    font-size: 0.75rem; /* text-xs */
    color: #64748b; /* slate-500 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show only 2 lines */
    -webkit-box-orient: vertical;
}
.dynamic-listings-container.view-smallGrid .dynamic-listing-item .listing-attributes {
    display: none; /* Hide attributes in small grid for compactness */
}
.dynamic-listings-container.view-list p {
  margin: 0;
}

/* Ensure the body max-width for better content flow */
.w-full.max-w-5xl {
    width: 100%;
    max-width: 80rem; /* Adjusted for better responsiveness */
    margin-left: auto;
    margin-right: auto;
}