/**
 * Frontend CSS for Luxury Property Listings
 */

:root {
    --lpl-primary-color: #00b0e5;
    /* The bright blue from reference */
    --lpl-primary-hover: #008eb8;
    --lpl-text-color: #333333;
    --lpl-text-light: #666666;
    --lpl-bg-color: #f7f6f1;
    /* Warm off-white */
    --lpl-card-bg: #ffffff;
    --lpl-border-color: #e5e5e5;

    --lpl-font-serif: "Playfair Display", "Georgia", serif;
    /* Elegant serif */
    --lpl-font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

    --lpl-border-radius: 4px;
    --lpl-spacing: 40px;
}

/* Wrapper */
.lpl-wrapper {
    /* padding: 40px 0; */
    font-family: var(--lpl-font-sans);
    color: var(--lpl-text-color);
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
}

.lpl-wrapper * {
    box-sizing: border-box;
}

/* Card */
.lpl-property-card {
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid var(--lpl-border-color);
    display: flex;
    flex-direction: column;
    margin-bottom: var(--lpl-spacing);
    overflow: hidden;
    position: relative;
}

/* Responsive Grid / Alternating Layout (Desktop) */
@media (min-width: 992px) {
    .lpl-property-card {
        flex-direction: row;
        align-items: stretch;
    }

    /* Odd cards: Image Left, Content Right */
    .lpl-property-card:nth-child(odd) .lpl-property-gallery {
        order: 1;
        width: 50%;
        /* border-right: 1px solid var(--lpl-border-color); */
    }

    .lpl-property-card:nth-child(odd) .lpl-property-content {
        order: 2;
        width: 50%;
    }

    /* Even cards: Content Left, Image Right */
    .lpl-property-card:nth-child(even) .lpl-property-gallery {
        order: 2;
        width: 50%;
        /* border-left: 1px solid var(--lpl-border-color); */
    }

    .lpl-property-card:nth-child(even) .lpl-property-content {
        order: 1;
        width: 50%;
    }
}

/* Gallery Layout (Card Side) */
.lpl-property-gallery {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fdf9fa;
}

.lpl-main-image {
    position: relative;
    width: 100%;
    height: 288px;
    /* h-72 */
    overflow: hidden;
    cursor: pointer;
}

@media (min-width: 768px) {
    .lpl-main-image {
        height: 320px;
    }

    /* md:h-80 */
}

@media (min-width: 992px) {
    .lpl-main-image {
        height: 420px;
    }

    /* lg:h-[420px] */
}

.lpl-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: all 0.7s ease;
}

.lpl-image-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, transparent 50%, transparent 100%);
    pointer-events: none;
}

.lpl-property-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--lpl-primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3em;
    padding: 6px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    z-index: 10;
}

.lpl-image-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 9999px;
    z-index: 10;
}

/* Typography & Content Layout */
.lpl-property-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .lpl-property-content {
        padding: 40px;
    }
}

@media (min-width: 992px) {
    .lpl-property-content {
        padding: 48px;
    }
}

.lpl-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--lpl-primary-color);
    margin: 0 0 8px 0;
}

.lpl-title {
    font-family: var(--lpl-font-serif);
    font-size: 20px;
    font-weight: 300;
    line-height: 1.25;
    margin: 0 0 12px 0;
    color: #0a0a0a;
}

@media (min-width: 768px) {
    .lpl-title {
        font-size: 26px;
    }
}

@media (min-width: 992px) {
    .lpl-title {
        font-size: 30px;
    }
}

/* Specifications Pills */
.lpl-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.lpl-spec-pill {
    background: #eceadd;
    color: #334155;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 12px;
    border-radius: 9999px;
    font-weight: 500;
}

/* Descriptions */
.lpl-full-desc h3,
.lpl-full-desc h4,
.lpl-full-desc strong,
.lpl-full-desc b {
    color: #1f2937;
    margin: 24px 0 12px 0;
    font-family: var(--lpl-font-serif);
    font-weight: 400;
}

.lpl-full-desc ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 8px 0 16px 0 !important;
}

.lpl-full-desc ul li {
    list-style: none !important;
    position: relative;
    padding-left: 20px !important;
    margin-bottom: 4px !important;
    font-size: 14px;
}

.lpl-full-desc ul li::before {
    content: '\eb7b' !important;
    font-family: 'remixicon' !important;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
    color: var(--lpl-primary-color);
}

.lpl-description-area {
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.625;
    color: #374151;
}

.lpl-description-area p {
    margin-top: 0;
}

.lpl-read-more {
    display: inline-block;
    margin-top: 8px;
    color: var(--lpl-primary-color);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 14px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lpl-read-more:hover,
.lpl-read-more:focus {
    color: var(--lpl-primary-hover);
    background-color: transparent;
    outline: none;
}

.lpl-extra-content {
    margin-top: 24px;
}

/* Features */
ul.lpl-features {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 16px;
    row-gap: 8px;
    margin: 0 0 32px 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 600px) {
    ul.lpl-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

li.lpl-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #374151;
}

.lpl-check-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.lpl-check-icon i {
    color: var(--lpl-primary-color);
    font-size: 14px;
}

/* Buttons */
.lpl-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

@media (min-width: 640px) {
    .lpl-actions {
        flex-direction: row;
    }
}

.lpl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: var(--lpl-font-sans);
    white-space: nowrap;
}

.lpl-btn i {
    font-size: 16px;
}

.lpl-btn-primary {
    background-color: var(--lpl-primary-color);
    color: #ffffff;
}

.lpl-btn-primary:hover {
    background-color: var(--lpl-primary-hover);
    color: #ffffff;
}

.lpl-btn-secondary {
    background-color: transparent;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.lpl-btn-secondary:hover,
.lpl-btn-secondary:focus {
    background-color: transparent;
    border-color: var(--lpl-primary-color);
    color: var(--lpl-primary-color);
    outline: none;
}

/* Thumbnail Strip */
.lpl-thumbnail-strip-wrapper {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: #f3f4f6;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.lpl-thumbnail-strip-wrapper::-webkit-scrollbar {
    height: 6px;
}

.lpl-thumbnail-strip-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.lpl-thumbnail-strip {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.lpl-thumbnail {
    flex-shrink: 0;
    width: 64px;
    height: 56px;
    padding: 0;
    border: 2px solid transparent;
    box-sizing: border-box;
    background: transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.lpl-thumbnail.lpl-thumbnail-last {
    opacity: 1;
}

@media (min-width: 768px) {
    .lpl-thumbnail {
        width: 80px;
        height: 64px;
    }
}

.lpl-thumbnail:hover,
.lpl-thumbnail:focus {
    opacity: 0.9;
    outline: none;
    border-color: transparent;
}

.lpl-thumbnail.lpl-thumbnail-last:hover {
    opacity: 1;
    border-color: transparent;
}

.lpl-thumbnail.active,
.lpl-thumbnail.active:hover,
.lpl-thumbnail.active:focus {
    opacity: 1;
    border-color: var(--lpl-primary-color);
}

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

.lpl-thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

.lpl-view-all-photos {
    padding: 0 8px 8px 8px;
    background: #f3f4f6;
}

.lpl-view-all-photos button {
    width: 100%;
    padding: 10px 0;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4b5563;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--lpl-font-sans);
}

.lpl-view-all-photos button:hover {
    color: var(--lpl-primary-color);
    border-color: var(--lpl-primary-color);
    background: transparent;
    box-shadow: none;
}


/* Modal & Lightbox Styles */
.lpl-enquiry-modal,
.lpl-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lpl-lightbox {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lpl-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.lpl-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111111;
}

/* Lightbox specific */
.lpl-lightbox-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 20;
    color: #e5e5e5;
}

.lpl-lightbox-title-area {
    display: flex;
    flex-direction: column;
}

#lpl-lightbox-title {
    margin: 0 0 10px 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #ccc;
    font-family: var(--lpl-font-sans);
}

.lpl-lightbox-counter {
    font-size: 14px;
    font-weight: 500;
}

.lpl-lightbox-close {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.lpl-lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lpl-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.lpl-lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lpl-lightbox-prev {
    left: 30px;
}

.lpl-lightbox-next {
    right: 30px;
}

.lpl-lightbox-content {
    position: relative;
    width: 80%;
    height: calc(100% - 220px);
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.lpl-lightbox-image-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lpl-lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--lpl-border-radius);
}

/* Lightbox Footer (Thumbnails) */
.lpl-lightbox-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0 40px;
    z-index: 20;
}

.lpl-lightbox-thumbnails-wrapper {
    display: flex;
    align-items: center;
    background: transparent;
    position: relative;
}

.lpl-lb-thumb-nav {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0 15px;
}

.lpl-lb-thumb-nav:hover {
    color: var(--lpl-primary-color);
}

.lpl-lightbox-thumbnails {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 10px;
    flex-grow: 1;
    padding-bottom: 10px;
    /* Space for scrollbar */
}

.lpl-lb-thumb {
    flex: 0 0 auto;
    width: 90px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s ease;
    border-radius: 4px;
    overflow: hidden;
}

.lpl-lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lpl-lb-thumb.active {
    border-color: var(--lpl-primary-color);
    opacity: 1;
}

.lpl-lb-thumb:hover {
    opacity: 1;
}

/* Enquiry Modal Specific */
.lpl-modal-content {
    position: relative;
    background: #fff;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    border-radius: var(--lpl-border-radius);
    z-index: 10;
    max-height: 90vh;
    overflow-y: auto;
}

.lpl-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.lpl-modal-content h3 {
    margin-top: 0;
    font-family: var(--lpl-font-serif);
}

/* Utilities */
.lpl-no-scroll {
    overflow: hidden !important;
}