:root {
    --air-red: #ff385c;
    --air-red-dark: #e31c5f;
    --air-ink: #222222;
    --air-muted: #717171;
    --air-border: #dddddd;
    --air-soft: #f7f7f7;
    --air-shadow: 0 6px 18px rgba(34, 34, 34, 0.08);
    --air-shadow-strong: 0 12px 32px rgba(34, 34, 34, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--air-ink);
    background: #ffffff;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

::selection {
    background: rgba(255, 56, 92, 0.18);
}

a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(255, 56, 92, 0.45);
    outline-offset: 2px;
}

.air-nav {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.air-brand-mark {
    align-items: center;
    background: var(--air-red);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 1rem;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.air-auth-mark {
    align-items: center;
    background: #fff1f3;
    border: 1px solid rgba(255, 56, 92, 0.24);
    border-radius: 999px;
    color: var(--air-red);
    display: inline-flex;
    font-size: 1.75rem;
    height: 4.25rem;
    justify-content: center;
    margin-bottom: 1rem;
    width: 4.25rem;
}

.air-nav-link {
    position: relative;
}

.air-nav-link:hover {
    color: var(--air-ink);
}

.air-user-menu {
    background: #ffffff;
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.air-user-menu:hover {
    box-shadow: var(--air-shadow);
    transform: translateY(-1px);
}

.air-search-shell {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.air-search-bar {
    background: #ffffff;
}

.air-search-input,
[data-area-dropdown] input {
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.air-search-input:focus-within,
[data-area-dropdown] input:focus {
    border-color: var(--air-red) !important;
    box-shadow: 0 0 0 4px rgba(255, 56, 92, 0.10);
}

.air-category {
    border-bottom: 2px solid transparent;
    color: var(--air-muted);
    padding-bottom: 0.55rem;
    transition: border-color 160ms ease, color 160ms ease;
}

.air-category:hover {
    border-color: var(--air-ink);
    color: var(--air-ink);
}

.listing-card {
    background: transparent !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.listing-card > a,
.listing-card [data-card-gallery] > a {
    border-radius: 1rem;
    box-shadow: none;
    isolation: isolate;
}

.listing-card > a img,
.listing-card [data-card-gallery] > a img {
    border-radius: inherit;
}

.listing-card:hover > a,
.listing-card:hover [data-card-gallery] > a {
    box-shadow: var(--air-shadow);
}

.listing-card > div:last-child {
    border-top: 0 !important;
    padding-left: 0.125rem !important;
    padding-right: 0.125rem !important;
}

.listing-card h3 {
    color: var(--air-ink);
}

.listing-card [data-copy] {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
}

input,
select,
textarea {
    border-color: var(--air-border) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--air-red) !important;
    box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.12) !important;
}

form .rounded-sm,
form .rounded,
form .rounded-md,
.rounded-sm {
    border-radius: 0.75rem !important;
}

.bg-gray-50 {
    background-color: #f7f7f7;
}

.bg-gray-100 {
    background-color: #f2f2f2;
}

.border-gray-200,
.border-gray-300 {
    border-color: var(--air-border) !important;
}

.shadow-md,
.shadow-lg,
.shadow-xl {
    box-shadow: var(--air-shadow) !important;
}

.hover\:shadow-md:hover {
    box-shadow: var(--air-shadow) !important;
}

.bg-brand-600,
.bg-brand-700,
.bg-brand-800,
.bg-brand-900 {
    background-color: var(--air-red) !important;
}

.hover\:bg-brand-700:hover,
.hover\:bg-brand-800:hover,
.hover\:bg-brand-900:hover {
    background-color: var(--air-red-dark) !important;
}

.text-brand-600,
.text-brand-700,
.text-brand-800,
.hover\:text-brand-600:hover,
.hover\:text-brand-700:hover,
.hover\:text-brand-800:hover {
    color: var(--air-red) !important;
}

.border-brand-100,
.border-brand-300,
.border-brand-500,
.border-brand-600,
.border-brand-700 {
    border-color: rgba(255, 56, 92, 0.45) !important;
}

.bg-brand-50,
.bg-brand-100 {
    background-color: #fff1f3 !important;
}

.ring-brand-100,
.ring-brand-200,
.ring-brand-300 {
    --tw-ring-color: rgba(255, 56, 92, 0.22) !important;
}

.prose h2,
.prose h3,
h1,
h2,
h3 {
    letter-spacing: 0;
}

@media (max-width: 767px) {
    .air-nav .h-20 {
        height: 4.5rem;
    }

    .air-search-shell {
        top: 4.5rem;
    }

    .air-search-bar {
        gap: 0.75rem;
    }

    .listing-card > a,
    .listing-card [data-card-gallery] > a {
        border-radius: 0.875rem;
    }
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prose h2 {
    font-size: 1.5rem;
    line-height: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose h3 {
    font-size: 1.25rem;
    line-height: 1.75rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: 0.35rem;
}

/* Prevent text selection only on interactive UI controls */
button,
label,
.air-category,
nav a,
[data-toggle-value],
[data-feature],
[data-desc-tag],
.air-user-menu {
    user-select: none;
    -webkit-user-select: none;
}

/* Wishlist heart active state */
[data-wishlist-card].text-red-500 i,
[data-wishlist-toggle].text-red-500 {
    color: #ef4444;
}

/* Bulk select checkbox in admin */
.bulk-checkbox {
    accent-color: #e31c5f;
}

/* Market stats card pulse animation for fresh data */
@keyframes stat-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.market-stat {
    animation: stat-in 0.3s ease both;
}

/* Expired listing ribbon in admin */
.listing-expired-badge {
    background: repeating-linear-gradient(
        -45deg,
        #fef3c7,
        #fef3c7 6px,
        #fde68a 6px,
        #fde68a 12px
    );
}

/* ─── Listing image carousel ─────────────────────────────────────────────
   Self-contained styles so the gallery works regardless of which Tailwind
   utility classes survived the purge build. Loaded after tailwind.css, so
   these win on equal specificity. */

.no-scrollbar {
    -ms-overflow-style: none;      /* IE / old Edge */
    scrollbar-width: none;         /* Firefox */
}
.no-scrollbar::-webkit-scrollbar {
    display: none;                 /* Chrome / Safari */
}

/* Horizontal, swipeable, snap-to-image track */
[data-gallery-track] {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}
[data-gallery-track] > [data-gallery-slide] {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}
[data-gallery-track] img {
    -webkit-user-drag: none;
    user-select: none;
}

/* Thumbnail strip: horizontal scroll with snap */
[data-gallery-thumbs] {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
[data-gallery-thumb] {
    scroll-snap-align: start;
}

/* Prev / next controls: always usable on touch, reveal on hover for pointers */
[data-gallery-prev],
[data-gallery-next] {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 2.5rem;
    width: 2.5rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    z-index: 2;
}
[data-gallery-prev] { left: 0.75rem; }
[data-gallery-next] { right: 0.75rem; }
[data-gallery-prev]:hover,
[data-gallery-next]:hover { background: #ffffff; }
[data-gallery-prev]:active,
[data-gallery-next]:active { transform: translateY(-50%) scale(0.92); }
@media (hover: hover) and (pointer: fine) {
    [data-gallery-prev],
    [data-gallery-next] {
        opacity: 0;
    }
    [data-gallery]:hover [data-gallery-prev],
    [data-gallery]:hover [data-gallery-next],
    [data-gallery-prev]:focus-visible,
    [data-gallery-next]:focus-visible {
        opacity: 1;
    }
}

/* Photo counter pill */
[data-gallery-counter] {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.55);
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    z-index: 2;
}

/* Progress dots */
[data-gallery-dots] {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
[data-gallery-dot] {
    height: 0.375rem;
    width: 0.375rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.6);
    transition: width 0.3s ease, background-color 0.3s ease;
}
[data-gallery-dot][data-active] {
    width: 1rem;
    background: #ffffff;
}

/* Thumbnail strip items */
[data-gallery-thumb] {
    flex: 0 0 auto;
    height: 5rem;
    width: 7rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid transparent;
    background: #f3f4f6;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
[data-gallery-thumb]:hover { opacity: 1; }
[data-gallery-thumb][data-active] {
    opacity: 1;
    border-color: var(--air-red-dark, #e31c5f);
    box-shadow: 0 0 0 2px #ffe4e9;
}

/* Fade a slide's image in as it decodes for a smoother feel */
[data-gallery-slide] img {
    animation: gallery-fade 0.35s ease both;
}
@keyframes gallery-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ─── Card photo carousel ───────────────────────────────────────────────── */

[data-card-track] {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.card-gal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 1.75rem;
    width: 1.75rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    font-size: 0.65rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
}
.card-gal-prev { left: 0.5rem; }
.card-gal-next { right: 0.5rem; }
.card-gal-btn:hover { background: #ffffff; }
.card-gal-btn:active { transform: translateY(-50%) scale(0.9); }
@media (hover: hover) and (pointer: fine) {
    .card-gal-btn { opacity: 0; }
    [data-card-gallery]:hover .card-gal-btn,
    .card-gal-btn:focus-visible { opacity: 1; }
}

.card-gal-dots {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.25rem;
    z-index: 5;
    pointer-events: none;
}
[data-card-dot] {
    height: 0.3rem;
    width: 0.3rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: width 0.25s ease, background-color 0.25s ease;
}
[data-card-dot][data-active] {
    width: 0.8rem;
    background: #ffffff;
}

/* ─── Image shimmer placeholder (blur-up feel while photos decode) ──────── */

.img-shimmer {
    background: linear-gradient(100deg, #f2f2f2 40%, #e9e9e9 50%, #f2f2f2 60%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
    from { background-position: 130% 0; }
    to   { background-position: -30% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .img-shimmer { animation: none; }
}

/* ─── Toasts ─────────────────────────────────────────────────────────────── */

.lcc-toast-root {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
    padding-bottom: env(safe-area-inset-bottom);
}
.lcc-toast {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--air-ink);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.625rem 1rem;
    border-radius: 9999px;
    box-shadow: var(--air-shadow-strong);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: min(90vw, 24rem);
}
.lcc-toast i { color: var(--air-red); }
.lcc-toast-in {
    opacity: 1;
    transform: translateY(0);
}
/* Keep toasts above the sticky contact bar on listing pages */
@media (max-width: 1023px) {
    .lcc-contact-bar ~ * .lcc-toast-root,
    body:has(.lcc-contact-bar) .lcc-toast-root {
        bottom: 5.5rem;
    }
}

/* Push-notification opt-in prompt (uses the toast fade-in transition) */
.lcc-push-prompt {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: #ffffff;
    color: var(--air-ink);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.75rem 0.875rem 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--air-border);
    box-shadow: var(--air-shadow-strong);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: min(92vw, 26rem);
    pointer-events: auto;
}
.lcc-push-prompt > i { color: var(--air-red); font-size: 1rem; }
.lcc-push-prompt span { flex: 1; }
.lcc-push-prompt [data-push-yes] {
    background: var(--air-red);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.375rem 0.875rem;
    border: 0;
    border-radius: 9999px;
    cursor: pointer;
    white-space: nowrap;
}
.lcc-push-prompt [data-push-no] {
    background: transparent;
    border: 0;
    color: var(--air-muted);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

/* ─── Sticky mobile contact bar ──────────────────────────────────────────── */

.lcc-contact-bar {
    box-shadow: 0 -4px 16px rgba(34, 34, 34, 0.08);
}

/* ─── Mobile filter bottom sheet ─────────────────────────────────────────── */

.lcc-sheet {
    animation: sheet-up 0.28s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes sheet-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .lcc-sheet { animation: none; }
}

/* ─── Fullscreen lightbox ────────────────────────────────────────────────── */

.lcc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gallery-fade 0.2s ease both;
}
.lcc-lightbox img {
    max-width: 94vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 0.5rem;
    user-select: none;
    -webkit-user-drag: none;
}
.lcc-lb-close {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    right: 1rem;
    height: 2.75rem;
    width: 2.75rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background-color 0.2s ease;
}
.lcc-lb-close:hover { background: rgba(255, 255, 255, 0.24); }
.lcc-lb-count {
    position: absolute;
    top: max(1.6rem, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
    font-weight: 600;
    z-index: 2;
}
.lcc-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 3rem;
    width: 3rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background-color 0.2s ease;
}
.lcc-lb-nav:hover { background: rgba(255, 255, 255, 0.24); }
.lcc-lb-prev { left: 1rem; }
.lcc-lb-next { right: 1rem; }

/* ─── Recently viewed cards (rendered client-side) ───────────────────────── */

.rv-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-decoration: none;
    color: var(--air-ink);
}
.rv-img {
    display: block;
    border-radius: 0.875rem;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f2f2f2;
    margin-bottom: 0.35rem;
    transition: box-shadow 0.2s ease;
}
.rv-card:hover .rv-img { box-shadow: var(--air-shadow); }
.rv-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rv-price {
    font-weight: 700;
    font-size: 0.9375rem;
}
.rv-price small {
    font-weight: 400;
    color: var(--air-muted);
    font-size: 0.72rem;
}
.rv-title {
    font-size: 0.8125rem;
    color: #404040;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rv-loc {
    font-size: 0.75rem;
    color: var(--air-muted);
}

/* Listing gallery images invite fullscreen view */
[data-gallery-track] img { cursor: zoom-in; }

/* ─── Banner ad slots ────────────────────────────────────────────────────── */

.lcc-ad-slot {
    position: relative;
    width: 100%;
    line-height: 0;
}
.lcc-ad-slot img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--air-border);
}
.lcc-ad-tag {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    line-height: 1.2;
    pointer-events: none;
}

.lcc-ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 100%;
    border: 2px dashed var(--air-border);
    border-radius: 0.75rem;
    background: var(--air-soft);
    color: var(--air-muted);
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.lcc-ad-placeholder:hover {
    border-color: var(--air-red);
    color: var(--air-red);
    background: #fff8f9;
}
.lcc-ad-placeholder i {
    font-size: 1rem;
    opacity: 0.7;
}
.lcc-ad-placeholder span {
    font-size: 0.8125rem;
    font-weight: 700;
}
.lcc-ad-placeholder small {
    font-size: 0.6875rem;
    opacity: 0.75;
}
/* Tall sidebar rectangle gets a slightly larger icon */
.lcc-ad-placeholder[data-ad-slot="listing_sidebar"] i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}
