/* Bộ sưu tập — diện mạo đã duyệt cho hoimehangcuugiup.com. */
body.page-template-page-gallery-masonry { background: #fff4d9; }
.hmhcg-collection { background: #fff4d9; padding: 22px 0 56px; min-height: 440px; }
.hmhcg-collection *,
.hmhcg-collection *::before,
.hmhcg-collection *::after { box-sizing: border-box; }
.hmhcg-collection-wrap { width: min(1320px, calc(100% - 36px)); margin: 0 auto; }
.hmhcg-collection-breadcrumb { display: flex; align-items: center; gap: 9px; color: #866a56; font-size: 13px; padding: 0 0 17px; }
.hmhcg-collection-breadcrumb a { color: #8d1d0a; text-decoration: none; }
.hmhcg-collection-breadcrumb a:hover { text-decoration: underline; }
.hmhcg-collection-header {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    background: #8d1d0a; color: #fff4d3;
    padding: 22px 28px; margin-bottom: 24px; border-bottom: 4px solid #c58a32;
}
.hmhcg-collection-header h1 { color: #fff4d3; font-size: 28px; margin: 0 0 6px; line-height: 1.2; letter-spacing: .4px; font-weight: 700; }
.hmhcg-collection-header p { color: #fff4d3; opacity: .92; font-size: 14px; margin: 0; }
.hmhcg-collection-total { color: #fff4d3; font-size: 13px; white-space: nowrap; }
.hmhcg-collection-grid { column-count: 4; column-gap: 16px; }
.hmhcg-collection-card {
    display: inline-block; vertical-align: top; width: 100%;
    break-inside: avoid; -webkit-column-break-inside: avoid;
    margin: 0 0 16px; padding: 0;
    overflow: hidden; border: 1px solid #e7d3ad; border-radius: 8px;
    background: #fffaf1;
    box-shadow: 0 3px 12px rgba(71,38,17,.075);
}
.hmhcg-collection-open { display: block; position: relative; color: #8d1d0a; text-decoration: none; overflow: hidden; }
.hmhcg-collection-open:hover { text-decoration: none; }
.hmhcg-collection-image {
    display: block; width: 100%; height: auto; max-width: 100%;
    object-fit: contain; border: 0; border-radius: 0; transform: translateZ(0);
    transition: transform .25s ease;
}
.hmhcg-collection-open:hover .hmhcg-collection-image,
.hmhcg-collection-open:focus-visible .hmhcg-collection-image { transform: scale(1.035); }
.hmhcg-collection-zoom {
    position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px;
    display: grid; place-items: center; background: rgba(141,29,10,.88);
    color: #fff4d3; border-radius: 50%; font-size: 16px;
    opacity: 0; transform: translateY(5px); transition: opacity .2s, transform .2s;
}
.hmhcg-collection-open:hover .hmhcg-collection-zoom,
.hmhcg-collection-open:focus-visible .hmhcg-collection-zoom { opacity: 1; transform: translateY(0); }
.hmhcg-collection-card figcaption { font-size: 13px; line-height: 1.5; padding: 10px 12px; color: #59402e; }
.hmhcg-collection-empty { padding: 64px 20px; text-align: center; border: 1px dashed #c58a32; background: #fffaf1; color: #59402e; }
.hmhcg-collection-empty i { font-size: 44px; color: #c58a32; }
.hmhcg-collection-empty h2 { margin: 16px 0 8px; color: #8d1d0a; font-size: 23px; }
.hmhcg-collection-empty p { font-size: 15px; }
.hmhcg-collection-empty a { color: #8d1d0a; text-decoration: underline; font-weight: 700; }
.hmhcg-collection-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 26px; }
.hmhcg-collection-pagination a { min-width: 38px; padding: 10px; text-align: center; background: #fffaf1; border: 1px solid #c58a32; color: #8d1d0a; text-decoration: none; border-radius: 4px; }
.hmhcg-collection-pagination a[aria-current="page"],
.hmhcg-collection-pagination a:hover { background: #8d1d0a; color: #fff4d3; }

.hmhcg-lightbox[hidden] { display: none !important; }
.hmhcg-lightbox { position: fixed; inset: 0; z-index: 99999; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 55px 24px 24px; background: rgba(13,9,8,.94); }
.hmhcg-lightbox figure { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; max-height: 100%; margin: 0; }
.hmhcg-lightbox-image { display: block; object-fit: contain; max-width: 100%; max-height: calc(100vh - 125px); width: auto; height: auto; }
.hmhcg-lightbox-caption { font-size: 13px; line-height: 1.4; color: #fff4d3; text-align: center; margin-top: 10px; }
.hmhcg-lightbox button { cursor: pointer; border: 0; border-radius: 4px; color: #fff4d3; background: rgba(141,29,10,.8); font-size: 26px; width: 44px; height: 44px; flex: 0 0 44px; }
.hmhcg-lightbox button:hover, .hmhcg-lightbox button:focus-visible { background: #8d1d0a; outline: 2px solid #c58a32; }
.hmhcg-lightbox-close { position: absolute; top: 12px; right: 22px; }
@media(max-width: 1050px) { .hmhcg-collection-grid { column-count: 3; } }
@media(max-width: 720px) { .hmhcg-collection-grid { column-count: 2; column-gap: 11px; }
    .hmhcg-collection-wrap { width: calc(100% - 20px); }
    .hmhcg-collection-header { padding: 17px 19px; }
    .hmhcg-collection-header h1 { font-size: 23px; }
    .hmhcg-collection-header p { font-size: 12px; }
    .hmhcg-collection-card { margin-bottom: 11px; border-radius: 6px; }
    .hmhcg-lightbox { gap: 4px; padding: 58px 4px 14px; }
    .hmhcg-lightbox button { width: 32px; height: 38px; flex: 0 0 32px; font-size: 18px; }
    .hmhcg-lightbox-close { right: 9px; width: 38px !important; }
}
@media(max-width: 360px) { .hmhcg-collection-grid { column-count: 1; } .hmhcg-collection-total { display: none; } }
@media(prefers-reduced-motion: reduce) { .hmhcg-collection-image, .hmhcg-collection-zoom { transition: none; } }
