/* ============================================================
   Appraisal / Search Results Page — Apzl Images Style
   Masonry grid, hover overlays, tight gaps, clean toolbar
   ============================================================ */


/* === Page Layout === */

.apzl-results-section {
    padding: 0 var(--margin_left_on_page);
    background-color: #fff;
}
@media (max-width: 600px) {
    .apzl-results-section {
        padding-left: var(--margin_left_on_page_mobile);
        padding-right: var(--margin_left_on_page_mobile);
    }
}


/* === Related Search Tags === */

.apzl-related-searches {
    padding: 16px var(--margin_left_on_page);
    background-color: #fff;
    border-bottom: 1px solid var(--color-border);
}
@media (max-width: 600px) {
    .apzl-related-searches {
        padding-left: var(--margin_left_on_page_mobile);
        padding-right: var(--margin_left_on_page_mobile);
    }
}

.apzl-related-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.apzl-related-inner::-webkit-scrollbar {
    display: none;
}

.apzl-related-tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--color-light-bg);
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-family: var(--font-family-base);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-hover);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.apzl-related-tag:hover {
    background-color: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
    text-decoration: none;
}


/* === Results Toolbar === */

.apzl-results-toolbar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 20px 0 16px;
    gap: 16px;
}
@media (max-width: 600px) {
    .apzl-results-toolbar {
        flex-direction: column;
        gap: 8px;
        padding: 16px 0 12px;
    }
}

.apzl-results-title {
    font-family: var(--font-family-base);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
@media (max-width: 600px) {
    .apzl-results-title {
        font-size: 17px;
    }
}

/* === Masonry Grid — Apzl Style === */

.apzl-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
.apzl-grid::after {
    --width: 2;
    --height: 1;
    --ratio: calc(var(--width) / var(--height));
    --row-height: 14em;
    content: "";
    flex-basis: calc(var(--ratio) * var(--row-height));
    flex-grow: 1000000;
}

.apzl-grid-item {
    --ratio: calc(var(--width) / var(--height));
    --row-height: 14em;
    flex-basis: calc(var(--ratio) * var(--row-height));
    flex-grow: calc(var(--ratio) * 100);
    position: relative;
    overflow: hidden;
    background-color: var(--color-light-bg);
}

.apzl-grid-link {
    display: block;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}
.apzl-grid-link:hover {
    text-decoration: none;
}

.apzl-grid-img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 14em;
    object-fit: cover;
    transition: opacity 0.3s ease;
    border: none;
    border-radius: 0;
}


/* === Hover Overlay — Apzl Style === */

.apzl-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.0) 0%,
        rgba(0, 0, 0, 0.0) 40%,
        rgba(0, 0, 0, 0.55) 100%
    );
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.apzl-grid-item:hover .apzl-item-overlay {
    opacity: 1;
}

.apzl-item-overlay-top {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 10px 10px 0;
}

.apzl-item-overlay-bottom {
    padding: 0 12px 10px;
}

.apzl-item-price {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--overlay-dark);
    color: #fff;
    font-family: var(--font-family-base);
    font-size: 13px;
    font-weight: 600;
    border-radius: 0;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.apzl-item-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 0;
    color: #fff;
}

.apzl-item-title {
    display: block;
    font-family: var(--font-family-base);
    font-size: 12px;
    font-weight: 400;
    color: #fff;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}


/* === No Results === */

.apzl-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-secondary);
}
.apzl-no-results svg {
    margin-bottom: 16px;
    color: var(--color-border);
}
.apzl-no-results h3 {
    font-family: var(--font-family-base);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}
.apzl-no-results p {
    font-family: var(--font-family-base);
    font-size: 14px;
    color: var(--color-text-secondary);
    max-width: 400px;
    margin: 0 auto;
}
.apzl-no-results a {
    color: var(--color-link);
    text-decoration: underline;
}


/* === Results Footer === */

.apzl-results-footer {
    padding: 16px 0;
    font-family: var(--font-family-base);
    font-size: 13px;
    color: var(--color-text-secondary);
    text-align: center;
}


/* === SEO Text === */



/* === Pagination Wrapper === */

.apzl-pagination-wrap {
    display: flex;
    justify-content: center;
    padding: 24px 0 8px;
}


/* === Search Bar (Sticky) === */

.apzl-search-bar {
    background-color: #fff;
    padding: 12px var(--margin_left_on_page);
    border-bottom: 1px solid var(--color-border);
}
@media (max-width: 600px) {
    .apzl-search-bar {
        padding-left: var(--margin_left_on_page_mobile);
        padding-right: var(--margin_left_on_page_mobile);
    }
}

.apzl-search-bar-fixed {
    background: #fff;
    display: inline-block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 12;
    padding: 10px 32px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 8px var(--shadow-xs);
}


/* === Legacy form styles (sticky search bar) === */

form#basicSrchFrm input.sch {
    font-size: 1rem;
    height: 52px;
    border: 1px solid var(--color-border);
    margin: 0 0 0 -1px;
    border-radius: 0;
    padding: 0 20px;
    font-family: var(--font-family-base);
}
.img-search-btn {
    margin-left: -1px;
    border: 1px solid var(--color-border);
    border-radius: 0;
    border-left: 1px solid var(--color-border);
    background-color: #fff;
    padding: 2px 12px 2px 4px;
}
.img-search-btn i {
    color: var(--color-accent);
    padding: 0 0 0 10px;
}
form#basicSrchFrm .search-btn {
    margin-left: -1px;
    border: 1px solid var(--color-border);
    border-radius: 0;
    border-left: 1px solid var(--color-border);
    background-color: #fff;
    padding: 2px 12px 2px 4px;
}
form#basicSrchFrm .search-btn i {
    color: var(--color-accent);
    padding: 0 0 0 10px;
}


/* === Responsive Grid === */

@media (max-width: 768px) {
    .apzl-grid {
        gap: 1px;
    }
    .apzl-grid-item {
        --row-height: 10em;
    }
    .apzl-grid::after {
        --row-height: 10em;
    }
    .apzl-grid-img {
        max-height: 10em;
    }
    .apzl-item-overlay {
        opacity: 1;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.0) 0%,
            rgba(0, 0, 0, 0.0) 50%,
            rgba(0, 0, 0, 0.45) 100%
        );
    }
    .apzl-item-overlay-bottom {
        padding: 0 8px 6px;
    }
    .apzl-item-title {
        font-size: 11px;
    }
    .apzl-item-price {
        font-size: 11px;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .apzl-grid-item {
        --row-height: 8em;
    }
    .apzl-grid::after {
        --row-height: 8em;
    }
    .apzl-grid-img {
        max-height: 8em;
    }
}


/* === Legacy Section Styles (for valuables, demo, valuation pages) === */

section.filter-bar,
section.suggested-carousel,
section.search-results {
    padding: 0 var(--margin_left_on_page);
    background-color: #fff;
}
@media (max-width: 600px) {
    section.filter-bar,
    section.suggested-carousel,
    section.search-results {
        padding-left: var(--margin_left_on_page_mobile);
        padding-right: var(--margin_left_on_page_mobile);
    }
}


/* === Legacy Class Aliases (for valuation page etc.) === */

.gallery-items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
.gallery-items-container::after {
    --width: 2;
    --height: 1;
    --ratio: calc(var(--width) / var(--height));
    --row-height: 14em;
    content: "";
    flex-basis: calc(var(--ratio) * var(--row-height));
    flex-grow: 1000000;
}
.antique-item {
    --ratio: calc(var(--width) / var(--height));
    --row-height: 14em;
    flex-basis: calc(var(--ratio) * var(--row-height));
    flex-grow: calc(var(--ratio) * 100);
    position: relative;
    overflow: hidden;
    background-color: var(--color-light-bg);
}
.antique-item a {
    cursor: pointer;
}
.antique-item img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 14em;
    object-fit: cover;
    border: none;
    border-radius: 0;
}
.f99nDs22XTHDErPs {
    position: absolute;
    display: flex;
    bottom: 10px;
    width: 100%;
    justify-content: center;
}
.item-overlay-label {
    color: white;
    justify-content: center;
    background-color: var(--overlay-dark);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 0;
    font-size: 13px;
    font-family: var(--font-family-base);
}
.item-meta-text {
    padding: 16px 0;
    font-family: var(--font-family-base);
    font-size: 13px;
    color: var(--color-text-secondary);
    text-align: center;
}


/* === Legacy suggested words & headline (valuation page) === */

.suggested-words {
    margin: 0;
    width: 100%;
    padding-top: 10px;
}
.suggested-words li {
    display: inline-block;
    margin-right: 4px;
}
.suggested-words a {
    border: 1px solid var(--color-border);
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 0;
    background-color: var(--color-light-bg);
    text-decoration: none;
    line-height: 2.5em;
    white-space: nowrap;
    color: var(--color-text-hover);
    font-family: var(--font-family-base);
    transition: all 0.15s ease;
}
.suggested-words a:hover {
    background-color: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
}
.item-inline-muted {
    font-size: 1em;
    display: inline;
    color: var(--color-text-muted);
}
.section-heading-lg {
    padding: 0;
    font-size: 1.4em;
    line-height: normal;
}
.section-subtitle {
    padding: 0;
    font-size: 1em;
    font-weight: normal;
}
.section-desc-muted {
    font-size: 0.8em;
    font-family: var(--font-family-base);
    color: var(--color-text-muted);
}
.caption-search-result {
    padding: 10px 0;
}


/* === General resets for this page === */

ol, ul {
    list-style-type: none;
    padding: 0;
}
a:focus {
    color: var(--color-link);
    text-decoration: underline;
}
