/* =========================================================
   BLOOOW LISTING DETAIL
   Page-specific only. Keep the global theme and Business UI
   in theme.css / business.css.
========================================================= */

.listing-detail-page {
    --detail-max: 1280px;
}

.listing-detail-shell {
    width: min(calc(100% - 28px), var(--detail-max));
    margin: 0 auto;
    padding: 16px 0 54px;
    color: var(--page-text);
}

.listing-breadcrumbs {
    min-width: 0;
    margin: 0 0 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    color: var(--page-text);
    font-size: 0.72rem;
    font-weight: 750;
    white-space: nowrap;
}

.listing-breadcrumbs::-webkit-scrollbar {
    display: none;
}

.listing-breadcrumbs a {
    color: currentColor;
    text-decoration: none;
    opacity: 0.64;
}

.listing-breadcrumbs a:hover,
.listing-breadcrumbs a:focus-visible {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.listing-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.8fr);
    gap: 16px;
    align-items: start;
}

.listing-gallery-card,
.listing-summary-card,
.listing-description-panel,
.detail-side-card {
    min-width: 0;
    border: 1px solid var(--page-text);
    border-radius: 12px;
    background: var(--page-bg);
    color: var(--page-text);
}

.listing-gallery-card {
    overflow: hidden;
}

.listing-main-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #000000;
}

.listing-main-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    background: #000000;
}

.gallery-counter {
    position: absolute;
    right: 10px;
    bottom: 10px;
    min-height: 28px;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #ffffff;
    border-radius: 999px;
    background: #000000;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 850;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border-top: 1px solid var(--page-text);
    scrollbar-width: none;
}

.gallery-thumbnails::-webkit-scrollbar {
    display: none;
}

.gallery-thumbnail {
    width: 80px;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--page-text);
    border-radius: 8px;
    background: #000000;
    cursor: pointer;
    opacity: 0.52;
}

.gallery-thumbnail:hover,
.gallery-thumbnail:focus-visible,
.gallery-thumbnail.selected {
    outline: none;
    opacity: 1;
}

.gallery-thumbnail.selected {
    border-width: 2px;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.detail-image-placeholder {
    min-height: 460px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    background: #000000;
    color: #ffffff;
}

.detail-image-placeholder span {
    font-size: 1rem;
    font-weight: 950;
    letter-spacing: 0.18em;
}

.detail-image-placeholder small {
    opacity: 0.6;
    font-size: 0.7rem;
}

.listing-summary-card {
    position: sticky;
    top: 12px;
    padding: 20px;
}

.listing-summary-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.listing-kind-pill {
    min-height: 27px;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: currentColor;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.listing-reference {
    color: currentColor;
    opacity: 0.48;
    font-size: 0.64rem;
    font-weight: 750;
}

.listing-summary-card h1 {
    margin: 0;
    color: currentColor;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: clamp(1.7rem, 2.7vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.02;
}

.detail-price {
    margin-top: 16px;
    color: currentColor;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.listing-meta-grid {
    margin-top: 20px;
    padding: 15px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border-top: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
}

.listing-meta-grid > div {
    min-width: 0;
}

.meta-label,
.detail-eyebrow {
    display: block;
    color: currentColor;
    opacity: 0.52;
    font-size: 0.61rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.listing-meta-grid strong {
    display: block;
    margin-top: 5px;
    color: currentColor;
    font-size: 0.79rem;
    font-weight: 800;
    line-height: 1.25;
}

.verification-panel {
    margin-top: 15px;
    padding: 12px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    border: 1px solid currentColor;
    border-radius: 9px;
}

.verification-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 950;
}

.verification-panel strong {
    display: block;
    margin-bottom: 4px;
    color: currentColor;
    font-size: 0.71rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.verification-panel p {
    margin: 0;
    color: currentColor;
    opacity: 0.68;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.35;
}

.engagement-row {
    padding: 15px 0 0;
    display: flex;
    align-items: center;
    gap: 18px;
    color: currentColor;
}

.engagement-row > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 750;
}

.engagement-row svg,
.detail-action-button svg,
.contact-button svg,
.sticky-contact-action svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.listing-action-row {
    margin-top: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.listing-like-form {
    margin: 0;
}

.detail-action-button {
    width: 100%;
    min-height: 43px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--page-text);
    border-radius: 9px;
    background: var(--page-bg);
    color: var(--page-text);
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 850;
}

.detail-action-button:hover,
.detail-action-button:focus-visible,
.detail-action-button.selected {
    outline: none;
    background: var(--page-text);
    color: var(--page-bg);
}

.desktop-contact-actions {
    margin-top: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.contact-button {
    min-height: 48px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--page-text);
    border-radius: 9px;
    background: var(--page-text);
    color: var(--page-bg);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 900;
}

.contact-button:hover,
.contact-button:focus-visible {
    outline: none;
    background: var(--page-bg);
    color: var(--page-text);
}

.listing-content-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.8fr);
    gap: 16px;
    align-items: start;
}

.listing-description-panel,
.detail-side-card {
    padding: 20px;
}

.listing-description-panel h2,
.detail-side-card h2,
.related-heading h2 {
    margin: 7px 0 0;
    color: currentColor;
    font-size: 1.05rem;
    font-weight: 900;
}

.listing-description {
    margin-top: 17px;
    color: currentColor;
    font-size: 0.88rem;
    font-weight: 520;
    line-height: 1.7;
}

.listing-side-stack {
    display: grid;
    gap: 16px;
}

.detail-side-card p {
    margin: 10px 0 0;
    color: currentColor;
    font-size: 0.78rem;
    line-height: 1.5;
}

.side-meta {
    display: block;
    margin-top: 10px;
    color: currentColor;
    opacity: 0.6;
    font-size: 0.69rem;
    font-weight: 700;
}

.seller-verification {
    margin-top: 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: currentColor;
    font-size: 0.7rem;
    font-weight: 900;
}

.seller-verification span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.seller-business-link {
    margin-top: 16px;
    min-height: 42px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid currentColor;
    border-radius: 9px;
    background: var(--page-bg);
    color: var(--page-text);
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 850;
}

.seller-business-link:hover,
.seller-business-link:focus-visible {
    outline: none;
    background: var(--page-text);
    color: var(--page-bg);
}

.related-section {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--page-text);
}

.related-heading {
    margin-bottom: 13px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.related-heading > a {
    flex: 0 0 auto;
    color: var(--page-text);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 800;
}

.related-heading > a:hover,
.related-heading > a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.related-listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sticky-contact-bar {
    display: none;
}

@media (max-width: 900px) {
    .listing-summary-card {
        position: static;
    }

    .listing-detail-layout,
    .listing-content-grid {
        grid-template-columns: 1fr;
    }

    .listing-summary-card {
        padding: 18px;
    }

    .listing-main-media {
        aspect-ratio: 4 / 3;
    }

    .related-listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .listing-detail-shell {
        width: calc(100% - 18px);
        padding-top: 10px;
        padding-bottom: 94px;
    }

    .listing-breadcrumbs {
        margin-bottom: 9px;
        font-size: 0.67rem;
    }

    .listing-detail-layout,
    .listing-content-grid {
        gap: 9px;
    }

    .listing-gallery-card,
    .listing-summary-card,
    .listing-description-panel,
    .detail-side-card {
        border-radius: 10px;
    }

    .listing-main-media {
        aspect-ratio: 1 / 1;
    }

    .listing-main-image {
        object-fit: cover;
    }

    .gallery-thumbnails {
        gap: 6px;
        padding: 7px;
    }

    .gallery-thumbnail {
        width: 64px;
        border-radius: 7px;
    }

    .listing-summary-card {
        padding: 15px;
    }

    .listing-summary-card h1 {
        font-size: clamp(1.45rem, 7vw, 2rem);
    }

    .detail-price {
        margin-top: 12px;
        font-size: 1.2rem;
    }

    .listing-meta-grid {
        margin-top: 15px;
        padding: 12px 0;
    }

    .desktop-contact-actions {
        display: none;
    }

    .listing-description-panel,
    .detail-side-card {
        padding: 15px;
    }

    .listing-description {
        font-size: 0.82rem;
    }

    .related-section {
        margin-top: 22px;
        padding-top: 15px;
    }

    .related-heading {
        align-items: flex-start;
    }

    .related-heading h2 {
        font-size: 0.95rem;
    }

    .related-heading > a {
        max-width: 48%;
        text-align: right;
        font-size: 0.67rem;
    }

    .related-listing-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sticky-contact-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 300;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1px;
        padding: 8px 9px max(8px, env(safe-area-inset-bottom));
        border-top: 1px solid var(--page-text);
        background: var(--page-bg);
        color: var(--page-text);
    }

    .sticky-contact-action {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid var(--page-text);
        border-radius: 8px;
        background: var(--page-text);
        color: var(--page-bg);
        text-decoration: none;
        font-size: 0.78rem;
        font-weight: 900;
    }

    .sticky-contact-action:hover,
    .sticky-contact-action:focus-visible {
        outline: none;
        background: var(--page-bg);
        color: var(--page-text);
    }

    .has-sticky-contact .site-footer {
        margin-bottom: 68px;
    }
}

@media (max-width: 380px) {
    .listing-meta-grid,
    .listing-action-row {
        grid-template-columns: 1fr;
    }

    .related-heading {
        flex-direction: column;
    }

    .related-heading > a {
        max-width: none;
        text-align: left;
    }
}
