body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
}

footer,header {
    background-color: #4b8a9f;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

footer p {
    text-align: center;
}

header a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

header form {
    display: flex;
}

header input[type="text"] {
    padding: 10px;
    border-radius: 5px;
    border: none;
    margin-right: 5px;
}

header button[type="submit"] {
    padding: 10px 15px;
    border-radius: 5px;
    border: none;
    background-color: #3b7a8c; /* Tông màu tối hơn */
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.container {
    padding: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-item h3 {
    margin: 10px 0;
    padding: 0 10px;
    font-size: 1.1em;
}

.gallery-item a {
    text-decoration: none;
    color: #333;
}

.detail-pics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.detail-pics img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Breadcrumb */
.breadcrumb {
    padding: 10px 20px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #4b8a9f;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span.separator {
    margin: 0 5px;
    color: #6c757d;
}

.breadcrumb .current {
    color: #333;
    font-weight: bold;
}

/* Lazy Loading */
.lazy {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.lazy.loaded {
    opacity: 1;
}

.lazy-placeholder {
    background-color: #f0f0f0;
    animation: 1.5s infinite pulse;
}

@keyframes pulse {
    0%,
    100% {
        background-color: #f0f0f0;
    }
    50% {
        background-color: #e0e0e0;
    }
}

/* Listing style for Detail page */
.listing {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.listing-item {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.listing-item .item-image {
    flex-shrink: 0; /* Prevents image from shrinking */
    width: 150px;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-right: 20px;
}

.listing-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-item .item-info {
    flex-grow: 1;
}

.item-title {
    text-decoration: none;
    color: #4b8a9f;
}

.item-title:hover {
    text-decoration: underline;
}

.buy-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #4b8a9f;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
    font-weight: bold;
}

.item-date {
    font-size: 0.9em;
    color: #6c757d;
}