/* --- 36. FULL JOURNEY --- */
:root {
    --accent: #345C6C;
}
.fj-container { background: #fff; border-radius: 0; box-shadow: 0 20px 50px rgba(0,0,0,0.1); overflow: hidden; width: 1200px; max-width: 95vw; margin: 20px auto; display: flex; flex-direction: column; height: 800px; max-height: 85vh; position: relative; }
.fj-header { background: var(--accent-teal); color: #fff; padding: 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.fj-progress { display: flex; gap: 5px; }
.fj-dot { width: 10px; height: 10px; background: rgba(255,255,255,0.3); border-radius: 0; }
.fj-dot.active { background: #fff; transform: scale(1.2); }

.fj-body { flex: 1; padding: 30px; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.fj-step { display: none; animation: fadeIn 0.5s; flex: 1; width: 100%; min-height: 0; }
.fj-step.active { display: flex; flex-direction: column; }
.ami { display: none; }

/* Grids inside steps fill available height */
.fj-step.active > div[style*="display: grid"] { flex: 1; min-height: 0; }
.fj-step.active .fj-style-grid { flex: 1; min-height: 0; }
.fj-step.active .fj-mode-selector { flex: 1; min-height: 0; }

/* Scrollbar for body */
.fj-body::-webkit-scrollbar { width: 6px; }
.fj-body::-webkit-scrollbar-track { background: #f1f1f1; }
.fj-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 0; }

/* Step 1: Floor & Rooms */
.fj-filters { display: flex; gap: 20px; margin-bottom: 30px; }
.fj-filter-group { flex: 1; }
.fj-label { display: block; font-size: 0.8rem; font-weight: 700; margin-bottom: 10px; color: #999; text-transform: uppercase; }
.fj-options { display: flex; gap: 10px; }
.fj-opt-btn { flex: 1; padding: 15px; border: 1px solid #eee; border-radius: 0; background: #f9f9f9; cursor: pointer; transition: 0.2s; text-align: center; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fj-opt-btn:hover { background: #eee; }
.fj-opt-btn.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.fj-opt-btn .fj-desc { font-size: 0.7rem; font-weight: 400; margin-top: 4px; color: #666; transition: 0.2s; }
.fj-opt-btn.selected .fj-desc { color: rgba(255,255,255,0.9); }

.fj-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; overflow-y: auto; max-height: 400px; padding: 5px; }
.fj-results::-webkit-scrollbar { width: 6px; }
.fj-results::-webkit-scrollbar-track { background: #f1f1f1; }
.fj-results::-webkit-scrollbar-thumb { background: #ccc; border-radius: 0; }

.fj-unit-card { border: 1px solid #bbb; padding: 15px; border-radius: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.fj-unit-card:hover { border-color: var(--accent); background: #fffcf5; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.fj-unit-card.selected { border: 3px solid var(--accent-teal, #2a9d8f); background: rgba(42, 157, 143, 0.05); box-shadow: 0 0 0 1px var(--accent-teal, #2a9d8f); }
.fj-unit-card.sold { opacity: 0.4; cursor: not-allowed; background: #f5f5f5; border-color: #eee; box-shadow: none; filter: grayscale(100%); }
.fj-unit-card.sold:hover { border-color: #eee; background: #f5f5f5; transform: none; box-shadow: none; }

/* Step 2: Finish Style */
.fj-mode-card { flex: 1; border: 3px solid #eee; padding: 20px; border-radius: 0; cursor: pointer; text-align: center; transition: 0.2s; }
.fj-mode-card:hover { border-color: #ddd; }
.fj-mode-card.selected { border-color: var(--accent-teal, #2a9d8f); box-shadow: 0 0 0 1px var(--accent-teal, #2a9d8f); }

/* Styles for Step 2 (Turnkey) */
.fj-style-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0;
    border: 3px solid transparent;
    transition: 0.2s;
    min-height: 0;
}
.fj-style-card:hover img {
    transform: none;
}
.fj-style-card.selected {
    border-color: var(--accent-teal, #2a9d8f);
    box-shadow: 0 0 0 1px var(--accent-teal, #2a9d8f);
}

.fj-card-image-wrapper {
    height: 100%;
    width: 100%;
    margin: 0;
    position: relative;
}

.fj-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fj-style-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    color: #333;
    text-align: center;
    transition: 0.3s;
    border-top: 1px solid rgba(255,255,255,0.5);
}

/* Large Preview Popup */
#fj-style-preview-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: #fff;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    z-index: 9999;
    visibility: hidden;
    border: 5px solid #fff;
    pointer-events: none; /* Prevent flickering */
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
}
#fj-style-preview-popup.visible {
    visibility: visible;
    opacity: 1;
}
#fj-style-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Error Tooltip */
.fj-error-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 15px;
    background: #e74c3c;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 100;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.fj-error-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    border-width: 8px;
    border-style: solid;
    border-color: #e74c3c transparent transparent transparent;
}
.fj-error-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

/* Hotspots */
.fj-hotspot { position: absolute; width: 30px; height: 30px; cursor: pointer; z-index: 10; transform: translate(-50%, -50%); }
.fj-hotspot-dot { width: 12px; height: 12px; background: var(--accent); border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; box-shadow: 0 0 0 2px #fff; }
.fj-hotspot-pulse { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; border-radius: 50%; background: rgba(192, 160, 128, 0.5); animation: pulse 2s infinite; z-index: 1; }
.fj-tooltip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 5px 10px; font-size: 0.75rem; white-space: nowrap; border-radius: 4px; opacity: 0; pointer-events: none; transition: 0.2s; margin-bottom: 8px; }
.fj-hotspot:hover .fj-tooltip { opacity: 1; transform: translateX(-50%) translateY(-5px); }

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

.fj-footer { padding: 20px; border-top: 1px solid #eee; display: flex; justify-content: space-between; background: #fff; }

/* Scroll hint — hidden on desktop */
.fj-scroll-hint { display: none; }

/* Summary Card (Step 9) */
.fj-summary-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.fj-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    flex: 1;
}
.fj-summary-grid h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    margin-top: 0;
    color: #111;
}
.fj-summary-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.fj-summary-grid li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #222;
}
.fj-summary-grid li span.sum-label {
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.fj-summary-grid li strong {
    color: #222;
}

/* Button Styles */
.tk-btn-next, .tk-btn-prev, .tk-btn-outline {
    padding: 12px 30px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.tk-btn-next { 
    background: var(--accent); 
    color: #fff; 
    border: 1px solid var(--accent);
}
.tk-btn-next:hover {
    background: #2c4b5a;
    border-color: #2c4b5a;
    color: #fff;
}

.tk-btn-prev, .tk-btn-outline { 
    background: #fff; 
    color: #000; 
    border: 1px solid #000; 
}
.tk-btn-prev:hover, .tk-btn-outline:hover { 
    background: #f0f0f0; 
    color: #000;
}

.tk-btn-cta {
    padding: 12px 30px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    transition: all 0.3s;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tk-btn-cta:hover {
    background: #2c4b5a;
    border-color: #2c4b5a;
    color: #fff;
}

/* ========== MOBILE ========== */
@media (max-width: 640px) {
    .fj-container {
        width: 100%;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        border-radius: 0;
    }
    .fj-header { padding: 14px 16px; }
    .fj-body { padding: 16px; flex: 1; min-height: 0; overflow-y: auto; }
    .fj-footer { padding: 14px 16px; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }

    /* Allow steps to grow naturally so body scrolls */
    .fj-step { min-height: auto; flex: none; }
    .fj-step.active > div[style*="display: grid"],
    .fj-step.active .fj-style-grid,
    .fj-step.active .fj-mode-selector { flex: none; min-height: auto; }

    /* Step 1 filters — stack */
    .fj-filters { flex-direction: column; gap: 12px; }
    .fj-options { flex-wrap: wrap; }
    .fj-opt-btn { padding: 10px 8px; font-size: 0.85rem; }

    /* Results grid → 1 col */
    .fj-results { grid-template-columns: 1fr; max-height: none; }

    /* Mode selector → stack */
    .fj-mode-selector,
    [class*="fj-mode-selector"] { flex-direction: column !important; }
    .fj-mode-card { padding: 14px; }

    /* Style grid → 2 col, natural height so scrollable */
    .fj-style-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        overflow: visible !important;
    }

    /* Step 3: bathroom — stack vertically, horizontal images */
    #fj-step-3 > div {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        flex: none !important;
    }
    #fj-step-3 .fj-style-card {
        height: auto;
        max-height: none;
        display: flex;
        flex-direction: column;
    }
    #fj-step-3 .fj-card-image-wrapper {
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
    #fj-step-3 .fj-card-image {
        object-position: center 40%;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Step 4: amenity info — stack name + price in 2 lines */
    .amenity-name {
        bottom: 28px !important;
        right: 16px !important;
        font-size: 0.8rem !important;
    }
    .amenity-price {
        left: 16px !important;
        right: auto !important;
        font-size: 0.7rem !important;
    }

    /* Summary grid → 1 col */
    .fj-summary-grid { grid-template-columns: 1fr; gap: 20px; }

    /* Contact form: stack on mobile */
    #fj-step-card > div:first-child { flex-direction: column !important; gap: 12px !important; }
    #fj-step-card > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 16px !important; }
    #fj-step-card > div[style*="grid-template-columns"] > div:first-child { display: none !important; }
    #fj-step-card h3 { flex: none !important; font-size: 1.4rem !important; }

    /* Preview popup — fill screen */
    #fj-style-preview-popup {
        width: 90vw;
        height: 60vw;
    }

    /* Buttons — full width */
    .tk-btn-next, .tk-btn-prev, .tk-btn-cta, .tk-btn-outline {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Scroll hint visible on mobile */
    .fj-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 0 4px;
        color: #aaa;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    /* Summary scroll hint: sticky at bottom */
    #fj-scroll-hint-summary,
    #fj-scroll-hint {
        position: sticky;
        bottom: 0;
        z-index: 5;
        background: linear-gradient(to top, #fff 60%, transparent);
        padding: 16px 0 8px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
        transition: opacity 0.3s;
    }
    .fj-scroll-hint-icon {
        display: inline-block;
        font-size: 1rem;
        animation: scrollBounce 1.5s ease-in-out infinite;
    }
    @keyframes scrollBounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(6px); }
    }
}

@media (max-width: 400px) {
    .fj-style-grid { grid-template-columns: 1fr !important; }
    .fj-body { padding: 12px; }
    .fj-opt-btn { font-size: 0.8rem; padding: 8px 6px; }
}
