/* ============================================================
   Floor Plan Viewer v5 — fpv-style.css (Frontend)
   ============================================================ */

.fpv-wrapper { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0 auto 40px; }

.fpv-container {
    display: flex; gap: 32px; align-items: flex-start;
    padding: 28px; background: #fff; border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.09);
}

/* --- Sidebar --- */
.fpv-sidebar { width: 260px; flex-shrink: 0; }
.fpv-filter-group { margin-bottom: 18px; }
.fpv-filter-group:last-child { margin-bottom: 0; }
.fpv-filter-group label {
    display: block; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 7px; color: #444;
}
.fpv-filter-group select {
    width: 100%; padding: 10px 34px 10px 12px;
    border: 1.5px solid #ddd; border-radius: 7px;
    background: #fafafa; font-size: 14px; cursor: pointer;
    outline: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='%23888' d='M5 7L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center;
    transition: border-color 0.2s;
}
.fpv-filter-group select:hover,
.fpv-filter-group select:focus { border-color: #b58b4d; }

/* --- Main View --- */
.fpv-main-view {
    flex-grow: 1; text-align: center; min-height: 460px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: #f9f9f9; border: 1px solid #eee; border-radius: 10px;
    padding: 20px; position: relative;
}
.fpv-img-wrap { position: relative; display: inline-block; width: 100%; }
.fpv-plan-img {
    max-width: 100%; max-height: 62vh; height: auto;
    cursor: zoom-in; border-radius: 5px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.08); display: none;
}
.fpv-zoom-hint {
    display: none; position: absolute; bottom: 10px; right: 12px;
    background: rgba(0,0,0,0.52); color: #fff; font-size: 12px;
    padding: 4px 11px; border-radius: 20px; pointer-events: none;
}
.fpv-img-wrap:hover .fpv-zoom-hint { display: block; }
.fpv-caption { margin-top: 16px; font-size: 16px; font-weight: 500; color: #b58b4d; min-height: 24px; }

/* --- Lightbox --- */
.fpv-lightbox {
    display: none; position: fixed; z-index: 999999;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.92); justify-content: center; align-items: center;
}
.fpv-lightbox-img { max-width: 92%; max-height: 90vh; object-fit: contain; border-radius: 4px; }
.fpv-lightbox-close {
    position: absolute; top: 18px; right: 28px; background: transparent; border: none;
    color: #fff; font-size: 46px; font-weight: bold; cursor: pointer;
    line-height: 1; padding: 0; opacity: 0.8; transition: opacity 0.2s;
}
.fpv-lightbox-close:hover { opacity: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
    .fpv-container { flex-direction: column; gap: 16px; padding: 18px; }
    .fpv-sidebar {
        width: 100%; display: grid;
        /* จำนวน column = จำนวน step แต่ไม่เกิน 3 — JS จัดการได้ */
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }
    .fpv-filter-group { margin-bottom: 0; }
    .fpv-main-view    { min-height: 240px; }
}
@media (max-width: 480px) {
    .fpv-sidebar { grid-template-columns: 1fr; }
    .fpv-plan-img { max-height: 55vw; }
    .fpv-caption  { font-size: 14px; }
}
@media (max-width: 400px) {
    .fpv-container { padding: 12px; border-radius: 8px; }
}
