/* ============================================================
   Listing Sold Out — Global Styles v1.3.0
   Loaded on ALL frontend pages for the listing card badge.
   Prefixed .lso- throughout to avoid any theme collisions.
   ============================================================ */

/* ----------------------------------------------------------
   SOLD BADGE on listing cards
   Uses CSS ::before on the thumbnail wrapper so no template
   changes are needed — works on home, listings, and search.
   The .lso-is-soldout class is added via PHP post_class filter.

   IMPORTANT: uses the DIRECT CHILD combinator (>) not the
   descendant selector (space). This prevents the badge
   appearing on cards inside the "Similar Cars" section on
   a sold-out single listing page.

   Why: on a single page the main <article> gets lso-is-soldout,
   and the Similar Cars section is rendered inside that article.
   With a descendant selector every .listing-thumbnail-wrapper
   inside the page would show SOLD — including non-sold-out cars.
   With >, only a .listing-thumbnail-wrapper that is a DIRECT
   child of the article is targeted, which is only true for
   listing cards (home / archive / search), not nested content.
   ---------------------------------------------------------- */
article.lso-is-soldout > .listing-thumbnail-wrapper {
    position: relative;
}

article.lso-is-soldout > .listing-thumbnail-wrapper::before {
    content: 'SOLD';
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    /* Use system font stack — no external font dependency */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1.2;
    -webkit-box-shadow: 0 2px 6px rgba(220, 53, 69, 0.40);
            box-shadow: 0 2px 6px rgba(220, 53, 69, 0.40);
    pointer-events: none; /* badge should not intercept clicks on the card */
}
