/**
 * Site Kit - Single Property Styles.
 *
 * @package CRM_IMOB\SiteKit
 * @since   3.0.0
 */

.single-imoveis {
    background: #f0f0f0;
}

.single-imoveis .imobcrm-container {
    max-width: none;
    width: 100%;
    padding-left: clamp(20px, 4vw, 56px);
    padding-right: clamp(20px, 4vw, 56px);
}

.imobcrm-breadcrumbs {
    padding: 14px 0;
    font-size: 0.85rem;
    color: #6d655f;
    background: #f0f0f0;
    border-bottom: 1px solid rgba(65, 49, 40, 0.08);
}

.imobcrm-breadcrumbs a,
.imobcrm-breadcrumbs__sep {
    color: #8d8279;
}

.imobcrm-breadcrumbs__current {
    color: #3e3028;
}

.imobcrm-single__layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    grid-template-areas: 'sidebar main';
    gap: clamp(24px, 3vw, 40px);
    padding: 34px 0 64px;
    align-items: start;
}

.imobcrm-single__main {
    grid-area: main;
    min-width: 0;
}

/* ── Hero Gallery (full-width, edge-to-edge, 3 images) ── */
.imobcrm-gallery {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 0;
    background: #1a1510;
    overflow: hidden;
}

.imobcrm-gallery__viewport {
    position: relative;
    overflow: hidden;
}

.imobcrm-gallery__track {
    display: flex;
    gap: 0;
    will-change: transform;
    transition: transform 420ms ease;
}

.imobcrm-gallery__slide {
    position: relative;
    flex: 0 0 calc(100% / 3);
    height: min(52vh, 480px);
    min-height: 280px;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    padding: 0;
    background: #2a2320;
    cursor: pointer;
}

.imobcrm-gallery__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 280ms ease;
}

.imobcrm-gallery__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 0;
    transition: border-color 180ms ease;
}

.imobcrm-gallery__slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.12) 100%);
    pointer-events: none;
}

.imobcrm-gallery__slide--active::after {
    border-bottom: 3px solid var(--imobcrm-primary, #a08b5a);
}

.imobcrm-gallery__slide:hover img {
    transform: scale(1.03);
}

.imobcrm-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #2f241d;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transition: transform 180ms ease, background 180ms ease;
}

.imobcrm-gallery__nav:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.06);
}

.imobcrm-gallery__nav--prev {
    left: 16px;
}

.imobcrm-gallery__nav--next {
    right: 16px;
}

.imobcrm-gallery__counter {
    position: absolute;
    right: 20px;
    bottom: 14px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
}

.imobcrm-gallery__counter-sep {
    opacity: 0.72;
    margin: 0 4px;
}


.imobcrm-single__header,
.imobcrm-specs-bar,
.imobcrm-single__description,
.imobcrm-single__features,
.imobcrm-single__details,
.imobcrm-single__map,
.imobcrm-single__video,
.imobcrm-single__share,
.imobcrm-sidebar-card {
    background: #fff;
    border: 1px solid rgba(62, 48, 40, 0.08);
    border-radius: 24px;
    box-shadow: 0 16px 42px rgba(65, 49, 40, 0.06);
}

.imobcrm-single__header {
    position: relative;
    overflow: hidden;
}

.imobcrm-single__header::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, color-mix(in srgb, var(--imobcrm-primary) 12%, transparent) 0%, transparent 70%);
    pointer-events: none;
}

.imobcrm-single__header,
.imobcrm-specs-bar,
.imobcrm-single__description,
.imobcrm-single__features,
.imobcrm-single__details,
.imobcrm-single__map,
.imobcrm-single__video,
.imobcrm-single__share {
    margin-bottom: 28px;
    padding: 30px;
}

.imobcrm-single__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.imobcrm-single__badges .imobcrm-badge {
    background: #f6efe4;
    color: #5e4732;
}

.imobcrm-single__title {
    font-size: clamp(1.5rem, 2.8vw, 2.4rem);
    color: #2e241d;
    margin-bottom: 10px;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.imobcrm-single__location,
.imobcrm-single__address,
.imobcrm-single__desc-text,
.imobcrm-single__share-label,
.imobcrm-detail-item__label,
.imobcrm-specs-bar__label,
.imobcrm-sidebar-card__sub,
.imobcrm-calc-result__item,
.imobcrm-checkbox,
.imobcrm-form__feedback {
    color: #6f655e;
}

.imobcrm-single__location {
    font-size: 1rem;
    max-width: 65ch;
}

.imobcrm-section-title,
.imobcrm-detail-item__value,
.imobcrm-specs-bar__value,
.imobcrm-sidebar-card__title {
    color: #2f241d;
}

.imobcrm-section-title {
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    letter-spacing: -0.02em;
}

.imobcrm-specs-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 18px;
}

.imobcrm-specs-bar__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 18px;
    background: #f8f6f3;
    border-radius: 18px;
}

.imobcrm-specs-bar__value {
    font-size: 1.18rem;
    font-weight: 700;
}

.imobcrm-feature-group {
    margin-bottom: 18px;
}

.imobcrm-feature-group:last-child {
    margin-bottom: 0;
}

.imobcrm-feature-group__title {
    margin-bottom: 10px;
    color: #8f6b37;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

.imobcrm-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.imobcrm-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #faf8f5;
    color: #5c4738;
    border: 1px solid rgba(62, 48, 40, 0.1);
    font-size: 0.82rem;
    gap: 5px;
    transition: background 180ms ease;
}

.imobcrm-pill:hover {
    background: #f6efe4;
}

.imobcrm-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.imobcrm-detail-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8f6f3;
}

.imobcrm-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: #f2ece4;
    color: #5c4738;
}

.imobcrm-share-btn:hover {
    background: var(--imobcrm-primary);
    color: #fff;
}

.imobcrm-single__sidebar {
    grid-area: sidebar;
    position: sticky;
    top: 92px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.imobcrm-sidebar-card {
    padding: 22px;
}

.imobcrm-sidebar-card--price,
#imobcrm-contact-form {
    box-shadow: 0 18px 42px rgba(49, 39, 31, 0.08);
}

.imobcrm-sidebar-card--price {
    background: linear-gradient(180deg, #f9f4ec 0%, #ffffff 100%);
    border-color: color-mix(in srgb, var(--imobcrm-primary) 26%, transparent);
    text-align: left;
}

.imobcrm-sidebar-card__price {
    font-size: 1.8rem;
    color: #8b6838;
    letter-spacing: -0.04em;
}

.imobcrm-form-group label,
.imobcrm-single .imobcrm-form-group label {
    color: #5b4f47;
    font-weight: 700;
    letter-spacing: 0.01em;
    font-size: 0.84rem;
    text-transform: uppercase;
}

.imobcrm-single .imobcrm-input {
    min-height: 44px;
    border-radius: 12px;
    border-color: rgba(48, 36, 28, 0.12);
    background: #fcfbf9;
    color: #2f241d;
    font-size: 0.88rem;
}

.imobcrm-single .imobcrm-btn--primary,
.imobcrm-single .imobcrm-btn--outline,
.imobcrm-single .imobcrm-btn--whatsapp {
    min-height: 44px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    font-size: 0.88rem;
    width: 100%;
}

.imobcrm-single textarea.imobcrm-input {
    min-height: 72px;
}

.imobcrm-single .imobcrm-input:focus {
    background: #fff;
}

.imobcrm-form-group--checkbox {
    margin-top: 4px;
}

.imobcrm-single .imobcrm-form-group .imobcrm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.60rem;
    line-height: 1.3;
    font-weight: 400; /* Override the 700 bold from the label */
    text-transform: none; /* Override the uppercase from the label */
    letter-spacing: normal;
}

.imobcrm-checkbox input[type='checkbox'] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(48, 36, 28, 0.3);
    background-color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
    transition: all 180ms ease;
}

.imobcrm-checkbox input[type='checkbox']:checked {
    background-color: var(--imobcrm-primary, #8b6838);
    border-color: var(--imobcrm-primary, #8b6838);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 65%;
    background-position: center;
    background-repeat: no-repeat;
}

.imobcrm-checkbox input[type='checkbox']:focus {
    outline: 2px solid color-mix(in srgb, var(--imobcrm-primary) 40%, transparent);
    outline-offset: 2px;
}

.imobcrm-input--readonly {
    background: #f3f1ee;
    color: #625850;
}

.imobcrm-calc-result {
    padding: 16px;
    background: #f9f4ec;
    border-radius: 18px;
}

/* Sidebar cards: gold top accent on ALL cards */
.imobcrm-single__sidebar .imobcrm-sidebar-card {
    border-top: 3px solid var(--imobcrm-primary);
}

.imobcrm-sidebar-details {
    display: flex;
    flex-direction: column;
}

.imobcrm-sidebar-details__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 0.82rem;
}

.imobcrm-sidebar-details__row:nth-child(odd) {
    background: #f9f7f4;
    border-radius: 8px;
}

.imobcrm-sidebar-details__row span {
    color: #6f655e;
}

.imobcrm-sidebar-details__row strong {
    color: #2f241d;
    text-align: right;
    font-weight: 600;
}

/* Agent card layout: avatar + info row, WhatsApp below */
.imobcrm-sidebar-card--agent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.imobcrm-agent-avatar {
    flex-shrink: 0;
}

.imobcrm-agent-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    object-fit: cover;
}

.imobcrm-agent-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.imobcrm-agent-info__eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8d8279;
    font-weight: 600;
}

.imobcrm-agent-info strong {
    font-size: 0.92rem;
    color: #2f241d;
}

.imobcrm-agent-info__meta {
    font-size: 0.78rem;
    color: #6f655e;
}

.imobcrm-agent-info a {
    font-size: 0.78rem;
    color: #6f655e;
    word-break: break-all;
}

/* WhatsApp button inside agent card — full width below */
.imobcrm-sidebar-card--agent .imobcrm-btn--whatsapp {
    flex-basis: 100%;
    color: #fff;
    margin-top: 4px;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    min-height: 38px;
    padding: 8px 16px;
    text-align: center;
    justify-content: center;
}

/* Compact form spacing (SGL-04) */
.imobcrm-sidebar-card .imobcrm-form-group {
    margin-bottom: 10px;
}

.imobcrm-sidebar-card .imobcrm-form-group:last-of-type {
    margin-bottom: 0;
}

.imobcrm-sidebar-card__text {
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 14px;
    color: #6f655e;
}

.imobcrm-sidebar-card__title {
    font-size: 1rem;
    margin-bottom: 12px;
}

/* Single page prose (SGL-05) */
.imobcrm-single-prose {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #4a3f38;
}

.imobcrm-single-prose p {
    margin-bottom: 0.8em;
}

.imobcrm-single-prose ul,
.imobcrm-single-prose ol {
    margin: 0.25em 0;
    padding-left: 1.6em;
}

.imobcrm-single-prose ul {
    list-style-type: disc;
}

.imobcrm-single-prose ol {
    list-style-type: decimal;
}

.imobcrm-single-prose li {
    margin-bottom: 0.35em;
    line-height: 1.55;
}

/* Single specs bar refined */
.imobcrm-single-spec {
    font-size: 0.88rem;
}

.imobcrm-single-spec__content strong {
    font-size: 1.05rem;
}

/* Feature group headings refined (SGL-07) */
.imobcrm-single-feature-group h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8f6b37;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Single pill refined styles (SGL-07) */
.imobcrm-single-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    background: #faf8f5;
    color: #5c4738;
    border: 1px solid rgba(62, 48, 40, 0.08);
    font-size: 0.8rem;
    transition: background 180ms ease;
}

.imobcrm-single-pill:hover {
    background: #f6efe4;
}

.imobcrm-single-pill__icon {
    display: flex;
    color: #a08b5a;
    flex-shrink: 0;
}

.imobcrm-single-pill__icon svg {
    width: 14px;
    height: 14px;
}

/* Single address text */
.imobcrm-single-address {
    font-size: 0.9rem;
    color: #6f655e;
    margin-bottom: 16px;
}

/* Hero price refined */
.imobcrm-single-hero__price {
    font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.imobcrm-single-hero__price-meta {
    font-size: 0.82rem;
}

.imobcrm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.imobcrm-lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
}

.imobcrm-lightbox__close,
.imobcrm-lightbox__nav {
    position: absolute;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    cursor: pointer;
}

.imobcrm-lightbox__close {
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    font-size: 1.8rem;
}

.imobcrm-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    font-size: 1.8rem;
}

.imobcrm-lightbox__nav--prev {
    left: 20px;
}

.imobcrm-lightbox__nav--next {
    right: 20px;
}

@media (max-width: 1024px) {
    .imobcrm-single__layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            'main'
            'sidebar';
    }

    .imobcrm-single__sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .imobcrm-gallery {
        margin-left: 0;
        margin-right: 0;
        border-radius: 24px;
    }

    .imobcrm-gallery__viewport {
        padding: 0 16px 22px;
    }

    .imobcrm-gallery__track {
        gap: 10px;
    }

    .imobcrm-gallery__slide {
        flex-basis: 100%;
        height: 44vh;
        min-height: 250px;
    }

    .imobcrm-gallery__nav--prev {
        left: 8px;
    }

    .imobcrm-gallery__nav--next {
        right: 8px;
    }

    .imobcrm-details-grid {
        grid-template-columns: 1fr;
    }

    .imobcrm-single__header,
    .imobcrm-specs-bar,
    .imobcrm-single__description,
    .imobcrm-single__features,
    .imobcrm-single__details,
    .imobcrm-single__map,
    .imobcrm-single__video,
    .imobcrm-single__share,
    .imobcrm-sidebar-card {
        padding: 22px;
        border-radius: 20px;
    }
}

/* ── Hero Gallery: hide thumbs (not needed in hero mode) ── */
.imobcrm-gallery--hero .imobcrm-gallery__thumbs {
    display: none;
}

/* ── Hero Gallery: responsive ── */
@media (max-width: 900px) {
    .imobcrm-gallery__slide {
        flex: 0 0 50%;
        height: min(40vh, 340px);
        min-height: 220px;
    }
}

@media (max-width: 600px) {
    .imobcrm-gallery__slide {
        flex: 0 0 100%;
        height: min(50vh, 380px);
        min-height: 200px;
    }

    .imobcrm-gallery__nav {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }

    .imobcrm-gallery__nav--prev {
        left: 8px;
    }

    .imobcrm-gallery__nav--next {
        right: 8px;
    }
}
