/* Work records use independent grid cells; long copy never changes reading order. */
#WorksCollection { width: min(1560px, 92%); margin: 0 auto; padding: 12px 0 100px; }
#WorksCollection * { box-sizing: border-box; }
#WorksCollection .works-intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px 40px; margin-bottom: 40px; }
#WorksCollection .works-intro h2 { margin: 0; font-size: var(--type-h2); }
#WorksCollection .works-intro p { margin: 0; color: #b9b4ad; font-size: var(--type-body); }
#WorksCollection .works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; }
#WorksCollection .work-item { min-width: 0; padding-bottom: 32px; border-bottom: 1px solid #36322d; }
#WorksCollection .work-gallery { position: relative; margin: 0 0 26px; }
#WorksCollection .work-images { position: relative; width: 100%; aspect-ratio: 3 / 2; margin: 0; overflow: hidden; background: #181818; border-radius: 5px; }
#WorksCollection .swiper-wrapper { width: 100%; height: 100%; padding: 0; margin: 0; }
#WorksCollection .swiper-slide { width: 100%; height: 100%; padding: 0; }
#WorksCollection .work-images img { display: block; width: 100%; height: 100%; margin: 0; border-radius: 5px; object-fit: cover; object-position: center; }
#WorksCollection .work-gallery-controls { position: absolute; z-index: 2; bottom: 12px; right: 12px; display: flex; align-items: center; gap: 2px; background: rgba(10,10,10,.82); color: #fff; }
#WorksCollection .work-gallery-controls button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: inherit; font: 20px/1 sans-serif; cursor: pointer; }
#WorksCollection .work-gallery-controls button:hover { color: #cfb58e; }
#WorksCollection .work-pagination { min-width: 48px; text-align: center; font: 12px/1.5 var(--font-body); letter-spacing: .04em; }
#WorksCollection .work-title { margin: 0 0 22px; font-size: var(--type-h3); font-weight: 400; line-height: 1.65; letter-spacing: .04em; overflow-wrap: anywhere; }
#WorksCollection .work-details { margin: 0; font-family: var(--font-body); font-size: var(--type-body); line-height: 1.85; letter-spacing: .015em; }
#WorksCollection .work-details > div { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 12px; margin-top: 9px; }
#WorksCollection .work-details > div:first-child { margin-top: 0; }
#WorksCollection .work-details dt { margin: 0; color: #a9a198; font-weight: 400; }
#WorksCollection .work-details dd { min-width: 0; margin: 0; color: #dedbd5; overflow-wrap: anywhere; }
#WorksCollection .works-more { margin-top: 56px; text-align: center; }
#WorksCollection .works-more a { display: inline-flex; align-items: center; gap: 24px; padding: 16px 0; border-bottom: 1px solid #8e7350; color: #eee8df; font: var(--type-ui)/1.8 var(--font-body); text-decoration: none; }
#WorksCollection .works-more a span:first-child { font-size: var(--type-meta); color: #bca17b; }
#WorksCollection :is(a, button, select):focus-visible { outline: 1px solid #c7aa81; outline-offset: 4px; }
@media (max-width: 1100px) {
    #WorksCollection .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
}
@media (max-width: 768px) {
    #WorksCollection { width: auto; margin: 0 24px; padding: 0 0 64px; }
    #WorksCollection .works-intro { margin-bottom: 30px; gap: 12px; }
    #WorksCollection .works-intro p { width: 100%; }
    #WorksCollection .works-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    #WorksCollection .work-gallery { margin-bottom: 20px; }
    #WorksCollection .work-title { margin-bottom: 18px; }
    #WorksCollection .work-item { padding-bottom: 28px; }
    #WorksCollection .works-more { margin-top: 36px; }
}

/* Product filters sit directly below the section heading, outside the record grid. */
#WorksCollection:has(.works-filters:not([hidden])) .works-intro { margin-bottom: 24px; }
#WorksCollection .works-filters { margin-bottom: 32px; font-family: var(--font-body); }
#WorksCollection .works-filter-mobile { display: none; }
#WorksCollection .works-filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }
#WorksCollection .works-filter-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #49423a;
    border-radius: 4px;
    background: transparent;
    color: #d6d0c7;
    font: var(--type-small)/1.6 var(--font-body);
    letter-spacing: .025em;
    text-align: left;
    cursor: pointer;
}
#WorksCollection .works-filter-tag:hover { border-color: #b5986e; color: #fff; }
#WorksCollection .works-filter-tag[aria-pressed="true"] { border-color: #9f7a46; background: #9f7a46; color: #fff; }
#WorksCollection .works-filter-count { font-size: var(--type-meta); opacity: .7; font-variant-numeric: tabular-nums; }
#WorksCollection .works-filter-status { margin: 18px 0 0; color: #a9a198; font-size: var(--type-small); line-height: 1.7; }
#WorksCollection .work-item[hidden], #WorksCollection .works-filters[hidden] { display: none; }
@media (max-width: 768px) {
    /* The document must remain the scroll container for the sticky filter. */
    body.works-page { overflow: visible; }
    body.works-page #GlobalHeaderInner { height: 100%; }
    #WorksCollection .works-filter-tags { display: none; }
    #WorksCollection .works-filter-mobile { display: block; }
    #WorksCollection .works-filter-mobile label { display: block; margin-bottom: 10px; color: #b9b4ad; font-size: var(--type-small); }
    #WorksCollection .works-select-wrap { position: relative; }
    #WorksCollection .works-select-wrap::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; border-right: 1px solid #c7aa81; border-bottom: 1px solid #c7aa81; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
    #WorksCollection .works-filter-mobile select { appearance: none; -webkit-appearance: none; display: block; width: 100%; min-width: 0; min-height: 54px; margin: 0; padding: 14px 42px 14px 14px; border: 1px solid #8e7350; border-radius: 4px; background: #151413; color: #f2efea; font: var(--type-input)/1.5 var(--font-body); color-scheme: dark; cursor: pointer; }
    #WorksCollection .works-filter-status { margin-top: 12px; }
    #WorksCollection .works-filters {
        position: sticky;
        top: 80px;
        z-index: 20;
        margin: 0 -24px 26px;
        padding: 12px 24px 16px;
        border-bottom: 1px solid #36322d;
        background: #000;
    }
}
