/**
 * Property Listing - Frontend Grid Styles
 * Supports two layouts: default (image top, icons) and home (title top, image bottom, + button)
 */

/* ========================================
   Grid Layout
   ======================================== */

.pl-property-grid {
    display: grid;
    gap: 30px;
    margin: 0 auto;
    padding: 20px 0;
    max-width: 1300px;
}



.pl-property-grid.pl-columns-1 {
    grid-template-columns: 1fr;
    max-width: 500px;
}

.pl-property-grid.pl-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pl-property-grid.pl-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pl-property-grid.pl-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ========================================
   Shared Card Base
   ======================================== */

.pl-property-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pl-property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.pl-property-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.pl-property-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    border-radius: 8px;
}

.pl-property-image img.pl-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
	
}
.homee img.pl-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
	padding: 20px;
    border-radius: 30px;
}

.pl-property-card:hover .pl-property-image img.pl-thumbnail {
    transform: scale(1.03);
}

.pl-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    border-radius: 8px;
}

.pl-property-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #000;
}

.pl-property-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pl-property-title a:hover {
    color: #555;
}

/* ========================================
   DEFAULT LAYOUT (image top, icons below)
   ======================================== */

.pl-card-default .pl-property-content {
    padding: 16px 4px 8px;
}

.pl-property-price {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.pl-property-location {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
}

.pl-property-details {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pl-detail-item {
    display: flex;
    align-items: center;
    gap:3px;
    color: #666;
    font-size:37px;
    line-height: 1;
    white-space: nowrap;
}

.pl-detail-item span {
    color: #555;
    font-size: 16px;
    font-weight: 400;
}

/* ========================================
   HOME LAYOUT (Crea style: coverflow cards, middle overlaps sides)
   ======================================== */

/* Override grid to flexbox for home layout coverflow effect */
.pl-property-grid.pl-layout-home {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pl-card-home {
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    padding: 0;
    position: relative;
    z-index: 1;
    flex: 0 0 33%;
    margin: 0 -8px;
}

/* Middle card: taller, overlaps top and bottom, higher z-index */
.pl-layout-home .pl-card-home:nth-child(3n+2) {
    z-index: 2;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin-top: -30px;
    margin-bottom: -30px;
}

/* Middle card has a taller image */
.pl-layout-home .pl-card-home:nth-child(3n+2) .pl-property-image {
    padding-top: 110%;
}

.pl-card-home:hover {
    z-index: 3;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

/* Text area gets its own padding */
.pl-card-home .pl-property-content {
    padding: 28px 28px 20px;
}

.pl-card-home .pl-property-title {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.pl-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.pl-card-text {
    flex: 1;
    min-width: 0;
}

.pl-property-excerpt {
    margin: 0 0 2px;
    font-size: 15px;
    line-height: 1.5;
    color: #6c757d;
}

/* + Button (Crea style: black circle, white plus) */
.pl-card-plus {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #c5a05f;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    margin-top: 2px;
}

.pl-card-plus:hover {
    background: #333;
    transform: scale(1.08);
}

.pl-card-plus svg {
    width: 20px;
    height: 20px;
	color:#fff;
}

/* Image goes edge-to-edge with rounded top corners, card overflow:hidden clips bottom corners */
.pl-card-home .pl-property-image {
    padding-top: 85%;
    border-radius: 12px 12px 0 0;
}

.pl-card-home .pl-no-image {
    border-radius: 0;
}

/* Image link fills remaining card space */
.pl-card-home .pl-property-link {
    flex: 1;
}

/* ========================================
   SVG Icons
   ======================================== */

.pl-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #777;
}

/* ========================================
   No Properties Message
   ======================================== */

.pl-no-properties {
    text-align: center;
    color: #777;
    font-size: 16px;
    padding: 40px 20px;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .pl-property-grid.pl-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .pl-property-grid.pl-columns-3,
    .pl-property-grid.pl-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .pl-property-grid {
        gap: 20px;
    }

    .pl-property-title {
        font-size: 16px;
    }

    .pl-property-details {
        gap: 14px;
    }

    .pl-detail-item span,
    .pl-detail-item {
        font-size: 13px;
    }

    .pl-icon {
        width: 16px;
        height: 16px;
    }

    .pl-card-home {
        border-radius: 16px;
    }

    .pl-card-home .pl-property-content {
        padding: 18px 18px 12px;
    }

    .pl-card-home .pl-property-title {
        font-size: 18px;
    }

    /* Reduce coverflow overlap on tablet */
    .pl-property-grid.pl-layout-home {
        flex-wrap: wrap;
        gap: 20px;
    }

    .pl-card-home {
        flex: 0 0 calc(50% - 20px);
        margin: 0;
    }

    .pl-layout-home .pl-card-home:nth-child(3n+2) {
        margin-top: 0;
        margin-bottom: 0;
    }

    .pl-layout-home .pl-card-home:nth-child(3n+2) .pl-property-image {
        padding-top: 85%;
    }
}

@media (max-width: 480px) {
    .pl-property-grid.pl-columns-2,
    .pl-property-grid.pl-columns-3,
    .pl-property-grid.pl-columns-4 {
        grid-template-columns: 1fr;
    }

    .pl-property-grid {
        gap: 25px;
    }

    .pl-card-default .pl-property-content {
        padding: 12px 2px 6px;
    }

    .pl-card-home {
        border-radius: 16px;
    }

    .pl-card-home .pl-property-content {
        padding: 18px 18px 14px;
    }

    /* Stack cards on mobile */
    .pl-property-grid.pl-layout-home {
        flex-direction: column;
        gap: 25px;
    }

    .pl-card-home {
        flex: 0 0 auto;
        width: 100%;
        margin: 0;
    }

    .pl-layout-home .pl-card-home:nth-child(3n+2) {
        margin-top: 0;
        margin-bottom: 0;
    }

    .pl-layout-home .pl-card-home:nth-child(3n+2) .pl-property-image {
        padding-top: 85%;
    }
}
