/**
 * LPR Luxury Puerto Vallarta — Enhancement Layer
 * Add this via: WordPress Admin → Appearance → Customize → Additional CSS
 * OR paste into: wp-content/themes/enfold-child/style.css (after existing rules)
 *
 * Version: 1.0
 * Purpose: 16:9 image standardization, gallery polish, luxury feel
 */

/* ============================================================
   1. SPARK CDN — LISTING CARD IMAGES (feed / search results)
   Fix: square 1:1 → cinematic 16:9, cover not contain
   ============================================================ */

/* The listing card background-image divs currently use aspect-ratio: 1/1
   Override them to 16:9 */
.playus-flexmls-back-image,
.back-punta,
.back-flex-img {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;       /* kill the fixed 379px height */
    min-height: unset !important;
    max-height: unset !important;
    background-size: cover !important;
    background-position: center center !important;
    overflow: hidden;
    border-radius: 4px;
}

.playus-flexmls-back-image a {
    height: 100% !important;
    display: block;
    aspect-ratio: 16 / 9 !important;
}

/* ============================================================
   2. SPARK CDN — PROPERTY DETAIL SLIDER (Blaze Slider)
   Fix: mixed contain/cover → consistent 16:9 cover
   ============================================================ */

/* Container: use a clean vh height — no aspect-ratio here
   (aspect-ratio on the container breaks when 2 slides are shown side-by-side) */
.blaze-prop,
.blaze-prop.blaze-slider {
    background: #1a1a2e;  /* dark luxury background for letterbox fallback */
}

.blaze-prop .blaze-container {
    height: 65vh !important;
    max-height: 700px;
    min-height: 280px;
    margin-bottom: 0 !important;
    overflow: hidden;
}

.blaze-prop .blaze-track-container {
    height: 100%;
}

.blaze-prop .blaze-slide {
    height: 65vh !important;
    max-height: 700px;
    min-height: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The images: fill the slide height exactly, cover crops neatly */
.blaze-prop img {
    width: 100%;
    height: 65vh !important;
    max-height: 700px;
    object-fit: cover;
    object-position: center center;
    display: block;
    cursor: zoom-in;
}

/* ============================================================
   3. SWIPER SLIDER (legacy / mobile) — same fix
   ============================================================ */

.swiper-prop {
    background: #1a1a2e;
    max-height: 65vh !important;
}

.swiper-prop .swiper-slide {
    height: 65vh !important;
    max-height: 65vh !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-prop img {
    width: 100%;
    height: 65vh !important;
    max-height: 65vh !important;
    object-fit: var(--lpr-img-fit, cover);
    object-position: center center;
    display: block;
    cursor: zoom-in;
}

/* ============================================================
   4. ENFOLD NATIVE GALLERY (your professional photos)
   Fix: make thumbnails uniformly 16:9 with clean hover effect
   ============================================================ */

/* Already overridden to grid in style.css — enhance each thumb */
.avia-gallery-thumb a {
    display: block !important;
    height: auto !important;
    width: 100% !important;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.avia-gallery-thumb a img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.4s ease;
    display: block;
}

.avia-gallery-thumb a:hover img {
    transform: scale(1.04);
}

/* ============================================================
   5. LUXURY HOVER CARD (for map integration — future use)
   Pre-styled card for Mapbox hover popups
   ============================================================ */

.lpr-hover-card {
    background: rgba(15, 15, 30, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
    width: 300px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    font-family: 'Raleway', 'Open Sans', sans-serif;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lpr-hover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
}

.lpr-hover-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1a1a2e;
}

.lpr-hover-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.lpr-hover-card__body {
    padding: 14px 16px;
}

.lpr-hover-card__price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #a89060;
    letter-spacing: 0.02em;
    margin: 0 0 4px;
}

.lpr-hover-card__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lpr-hover-card__location {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.6);
    margin: 0 0 10px;
}

.lpr-hover-card__stats {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.75);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
}

.lpr-hover-card__stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   6. MAPBOX MAP PAGE (full-page map search — future use)
   ============================================================ */

#lpr-map-page {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

#lpr-map-container {
    width: 100%;
    height: 100%;
}

/* Custom Mapbox price-tag markers */
.lpr-map-marker {
    background: rgba(15, 15, 30, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(168, 144, 96, 0.6);
    border-radius: 20px;
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.lpr-map-marker:hover,
.lpr-map-marker.active {
    background: #a89060;
    border-color: #a89060;
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(168,144,96,0.4);
}

/* ============================================================
   7. GENERAL LUXURY POLISH
   ============================================================ */

/* Smooth image loading — prevent layout shift */

/* Price color — dark navy, almost black */
.flexmls-pricing {
    color: #12122e !important;
    font-weight: 700;
}

/* Price block vertical alignment fix — switch floats to flexbox */
.grid-flexmls-initial-block {
    display: flex !important;
    align-items: center !important;
    width: 100%;
}

.grid-flexmls-initial-block .initial-block {
    float: none !important;
    width: auto !important;
    flex: 1 1 70%;
    padding-right: 30px;
}

.grid-flexmls-initial-block .initial-block:nth-child(2) {
    float: none !important;
    width: auto !important;
    flex: 0 0 auto;
    padding-right: 0;
    text-align: right;
}

.grid-flexmls-initial-block .initial-block .text-right {
    margin: 0;
}

@media (max-width: 768px) {
    .grid-flexmls-initial-block {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .grid-flexmls-initial-block .initial-block,
    .grid-flexmls-initial-block .initial-block:nth-child(2) {
        width: 100% !important;
        text-align: left;
        padding-right: 0;
    }
}

/* Blaze/Swiper pagination dots — luxury white style */
.flexmls-area-feed__blaze-pagination.blaze-pagination button {
    background: rgba(255,255,255,0.4) !important;
    opacity: 1 !important;
}

.flexmls-area-feed__blaze-pagination.blaze-pagination button.active {
    background: #fff !important;
}

/* Smooth transitions on all interactive elements */
.playus-flexmls-back-image a,
.blaze-prop .blaze-slide img,
.swiper-prop img {
    transition: transform 0.4s ease;
}

/* Responsive: compact on mobile */
@media (max-width: 767px) {
    .blaze-prop .blaze-container,
    .blaze-prop .blaze-slide,
    .blaze-prop img {
        height: 55vw !important;  /* ~16:9 ratio based on viewport width */
        max-height: 400px;
    }
    .swiper-prop,
    .swiper-prop .swiper-slide,
    .swiper-prop img {
        height: 55vw !important;
        max-height: 400px !important;
    }
}

/* Redesigned Property Details Section CSS */
.lpr-details-section {
    font-family: 'Inter', -apple-system, sans-serif;
    color: #111;
    margin-top: 48px;
}

.lpr-details-title {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #111;
    border-bottom: 2px solid #111;
    padding-bottom: 12px;
    margin-bottom: 32px;
}

.lpr-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.lpr-spec-cell {
    border: 1px solid #eaeaea;
    padding: 16px 20px;
    background: #fff;
    transition: background-color 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lpr-spec-cell:hover {
    background-color: #faf8f5; /* Muted gold/beige tint */
}

.lpr-spec-cell-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #888;
    margin-bottom: 6px;
}

.lpr-spec-cell-value {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.lpr-amenities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
}

.lpr-amenity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    letter-spacing: 0.03em;
}

.lpr-amenity-marker {
    color: #c5a880; /* Elegant gold diamond marker */
    font-size: 14px;
}

.lpr-utility-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 13px;
    color: #666;
    background: #fafafa;
    padding: 12px 20px;
    border: 1px solid #eaeaea;
}

.lpr-utility-divider {
    color: #c5a880;
    font-weight: 300;
}

.lpr-utility-val {
    font-weight: 500;
}

@media (max-width: 991px) {
    .lpr-specs-grid,
    .lpr-amenities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .lpr-specs-grid,
    .lpr-amenities-grid {
        grid-template-columns: 1fr;
    }
    .lpr-spec-cell {
        padding: 12px 16px;
    }
}

/* Luxury Property Tabs Styling */
.lpr-tab-header,
.lpr-desc-tab-header {
    display: flex !important;
    gap: 24px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin-bottom: 32px !important;
    padding-bottom: 0 !important;
}

.lpr-tab-btn,
.lpr-desc-tab-btn {
    background: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    color: #718096 !important;
    padding: 10px 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: -1px !important;
    outline: none !important;
}

.lpr-tab-btn:hover,
.lpr-desc-tab-btn:hover {
    color: #1a202c !important;
}

.lpr-tab-btn.active,
.lpr-desc-tab-btn.active {
    color: #1a202c !important;
    border-bottom: 2px solid #1a202c !important;
    font-weight: 600 !important;
}

.lpr-tab-content,
.lpr-desc-tab-content {
    display: none;
    animation: lprFadeIn 0.3s ease;
}

.lpr-tab-content.active,
.lpr-desc-tab-content.active {
    display: block !important;
}

@keyframes lprFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* LPR Editorial Description Typography Flow */
.lpr-editorial-description {
    font-family: 'Inter', -apple-system, sans-serif !important;
    line-height: 1.8 !important;
    color: #333 !important;
}

.lpr-editorial-hook {
    font-family: inherit !important;
    font-size: 20px !important;
    font-weight: 300 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    line-height: 1.5 !important;
    color: #111 !important;
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    border: none !important;
    padding: 0 !important;
}

.lpr-editorial-intro {
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.7 !important;
    color: #222 !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    border: none !important;
    padding: 0 !important;
}

.lpr-editorial-body {
    font-family: inherit !important;
    font-size: 14.5px !important;
    font-weight: 400 !important;
    color: #4a5568 !important;
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    line-height: 1.75 !important;
}



