/* =============================================================
   PROJECT_DETAIL.CSS — Project Detail Page Styles
   ADVIK GROUP Real Estate Website
   ============================================================= */


/* ── 1. PAGE HEADER ────────────────────────────────────────── */
.detail-header {
    background-color: #111009;
    padding: var(--space-lg) var(--space-md);
    position: relative;
    overflow: hidden;
}

.detail-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -55deg, transparent, transparent 60px,
        rgba(139, 105, 20, 0.04) 60px, rgba(139, 105, 20, 0.04) 61px
    );
    pointer-events: none;
}

.detail-header__container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.detail-header__back {
    display: inline-block;
    font-size: var(--text-sm);
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    transition: letter-spacing var(--transition-fast);
}
.detail-header__back:hover {
    letter-spacing: 0.02em;
}

.detail-header__label {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: var(--space-xs);
}

.detail-header__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.1;
}


/* ── 2. MAIN CONTAINER ─────────────────────────────────────── */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md) var(--space-xl);
}


/* ── 3. PROJECT SUMMARY (image + description) ──────────────── */
.detail-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.detail-summary__image-wrap {
    overflow: hidden;
    max-height: 380px;
    position: relative;
}

.detail-summary__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.5s ease;
    display: block;
}
.detail-summary__image-wrap:hover .detail-summary__image {
    transform: scale(1.03);
}

/* Zoom hint */
.detail-summary__image-wrap::after {
    content: '🔍 Click to enlarge';
    position: absolute;
    bottom: var(--space-sm);
    left: var(--space-sm);
    background-color: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}
.detail-summary__image-wrap:hover::after {
    opacity: 1;
}

.detail-summary__image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 280px;
    background-color: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.detail-summary__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.detail-summary__description {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

/* Stats row: available / unavailable count */
.detail-summary__stats {
    display: flex;
    gap: var(--space-md);
}

.detail-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    flex: 1;
    text-align: center;
}

.detail-stat__value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.detail-stat__label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* ── 4. LOGIN NOTICE ───────────────────────────────────────── */
.detail-notice {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background-color: #FFFBF0;
    border: 1px solid var(--color-primary);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-lg);
    font-size: var(--text-sm);
    color: var(--color-text-dark);
}

.detail-notice a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: underline;
}

.detail-notice__icon {
    font-size: var(--text-lg);
    flex-shrink: 0;
}


/* ── 5. PLOTS SECTION ──────────────────────────────────────── */
.plots-section {
    margin-bottom: var(--space-xl);
}

.plots-section__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--color-border);
}

.plots-section__title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: var(--color-text-dark);
}

.plots-section__count {
    font-size: var(--text-sm);
    font-weight: 500;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
}

.plots-section__count--available {
    background-color: #DCFCE7;
    color: #166534;
}

.plots-section__count--unavailable {
    background-color: #FEE2E2;
    color: #991B1B;
}


/* ── 6. PLOTS GRID ─────────────────────────────────────────── */
.plots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.plots-empty {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    font-style: italic;
    padding: var(--space-md) 0;
}


/* ── 7. PLOT CARD ──────────────────────────────────────────── */
.plot-card {
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.plot-card--available:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-card);
}

.plot-card--unavailable {
    opacity: 0.6;
    background-color: var(--color-background);
}

/* Card header: name + badge */
.plot-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-xs);
}

.plot-card__name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-text-dark);
    line-height: 1.2;
}

.plot-card__badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    flex-shrink: 0;
}

.plot-card__badge--available {
    background-color: #DCFCE7;
    color: #166534;
}

.plot-card__badge--unavailable {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Detail rows: area, dimensions */
.plot-card__details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.plot-card__detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
}

.plot-card__detail-label {
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
}

.plot-card__detail-value {
    font-weight: 500;
    color: var(--color-text-dark);
}

/* Action area (buttons) */
.plot-card__action {
    margin-top: auto;
}

.plot-card__action form {
    margin: 0;
}

/* Book button */
.btn--plot-book {
    width: 100%;
    padding: 0.6rem;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}
.btn--plot-book:hover {
    background-color: var(--color-primary-dark);
}

/* Request already sent */
.btn--plot-requested {
    width: 100%;
    padding: 0.6rem;
    background-color: #DCFCE7;
    color: #166534;
    border: 1px solid #86EFAC;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: default;
}

/* Login to book */
.btn--plot-login {
    display: block;
    width: 100%;
    padding: 0.6rem;
    text-align: center;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}
.btn--plot-login:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* Not available */
.btn--plot-unavailable {
    width: 100%;
    padding: 0.6rem;
    background-color: var(--color-background);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
    cursor: not-allowed;
}


/* ── 8. LIGHTBOX (same as projects page) ───────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.lightbox__image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: var(--text-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
    z-index: 10000;
}
.lightbox__close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox__hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.05em;
}


/* ── 9. RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 992px) {
    .detail-summary {
        grid-template-columns: 1fr;
    }

    .detail-summary__image-wrap {
        max-height: 300px;
    }

    /* Always show zoom hint on tablet */
    .detail-summary__image-wrap::after {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .plots-grid {
        grid-template-columns: 1fr;
    }

    .detail-summary__stats {
        flex-direction: column;
    }

    .lightbox__image {
        max-width: 95vw;
        max-height: 80vh;
    }
}