/* Floating CTA + Favorites + Compare + Toast — tách từ functions.php wp_footer (P2 2026-07-16) */
.ptbl-float-cta {
    position: fixed; bottom: 20px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
}
.ptbl-float-cta a {
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; text-decoration: none;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.ptbl-float-cta a:hover { transform: scale(1.1); color: #fff; }
.cta-phone { background: #27ae60; }
.cta-fb { background: #1877F2; }

/* ========== FAVORITES FAB ========== */
.fav-fab {
    position: fixed; bottom: 140px; right: 20px; z-index: 99998;
    width: 50px; height: 50px; border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B, #ee5a24);
    color: #fff; border: none; cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
    font-size: 20px; transition: transform 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.fav-fab:hover { transform: scale(1.1); }
.fav-fab-badge {
    position: absolute; top: -4px; right: -4px;
    background: #0a3b73; color: #fff; font-size: 11px; font-weight: 700;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* ========== FAVORITES DRAWER ========== */
.fav-backdrop {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.fav-backdrop.open { opacity: 1; pointer-events: auto; }

.fav-drawer {
    position: fixed; top: 0; right: -360px; z-index: 100000;
    width: 340px; max-width: 90vw; height: 100vh;
    background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column;
}
.fav-drawer.open { right: 0; }

.fav-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.fav-drawer-header h4 {
    margin: 0; font-size: 16px; color: #0a3b73;
    display: flex; align-items: center; gap: 8px;
}
.fav-drawer-close {
    background: #f5f5f5; border: none; width: 32px; height: 32px;
    border-radius: 50%; font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #666; transition: all 0.2s;
}
.fav-drawer-close:hover { background: #FF6B6B; color: #fff; }

.fav-drawer-body {
    flex: 1; overflow-y: auto; padding: 12px;
}
.fav-empty-msg {
    text-align: center; color: #999; font-size: 13px;
    padding: 40px 20px; line-height: 1.6;
}

/* Fav item card */
.fav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: 10px; margin-bottom: 8px;
    background: #f8f9fa; transition: background 0.2s;
}
.fav-item:hover { background: #eef3f8; }
.fav-item-thumb {
    width: 48px; height: 48px; border-radius: 8px;
    object-fit: cover; flex-shrink: 0; background: #e0e0e0;
}
.fav-item-placeholder {
    width: 48px; height: 48px; border-radius: 8px;
    background: linear-gradient(135deg, #e8eef5, #dfe6ed);
    display: flex; align-items: center; justify-content: center;
    color: #aaa; font-size: 18px; flex-shrink: 0;
}
.fav-item-info { flex: 1; min-width: 0; }
.fav-item-title {
    font-size: 13px; font-weight: 600; color: #0a3b73;
    text-decoration: none; display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fav-item-title:hover { color: #FF6B6B; }
.fav-item-actions {
    display: flex; gap: 4px; margin-top: 4px;
}
.fav-item-act {
    font-size: 11px; padding: 3px 8px; border-radius: 4px;
    text-decoration: none; color: #fff; border: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 3px;
}
.fav-item-act-call { background: #FF6B6B; }
.fav-item-act-map { background: #27ae60; }
.fav-item-act-del {
    background: none; color: #999; font-size: 16px;
    padding: 0 4px; margin-left: auto;
}
.fav-item-act-del:hover { color: #FF6B6B; }

/* ========== COMPARE BAR ========== */
.cbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 99999;
    background: rgba(10,59,115,0.97); backdrop-filter: blur(12px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
    transform: translateY(100%); animation: cbar-up 0.35s ease forwards;
}
@keyframes cbar-up { to { transform: translateY(0); } }
.cbar-inner {
    max-width: 1200px; margin: 0 auto; padding: 10px 20px;
    display: flex; align-items: center; gap: 14px;
}
.cbar-left {
    display: flex; align-items: center; gap: 8px;
    color: #fff; font-size: 14px; white-space: nowrap;
}
.cbar-left strong {
    background: #FF6B6B; color: #fff; width: 24px; height: 24px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.cbar-slots { display: flex; gap: 8px; flex: 1; overflow-x: auto; }
.cbar-slot {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.15); border-radius: 20px;
    padding: 4px 10px 4px 4px; color: #fff; font-size: 12px;
    white-space: nowrap; animation: slot-in 0.25s ease;
}
@keyframes slot-in { from { opacity:0; transform: scale(0.8); } to { opacity:1; transform: scale(1); } }
.cbar-slot img {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
}
.cbar-slot-placeholder {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.2); display: flex; align-items: center;
    justify-content: center; font-size: 12px; flex-shrink: 0;
}
.cbar-slot-x {
    background: none; border: none; color: rgba(255,255,255,0.6);
    cursor: pointer; font-size: 14px; padding: 0 2px; line-height: 1;
}
.cbar-slot-x:hover { color: #FF6B6B; }
.cbar-right { display: flex; gap: 8px; }
.cbar-btn-go {
    background: linear-gradient(135deg, #FF6B6B, #ee5a24); color: #fff;
    border: none; padding: 8px 18px; border-radius: 20px;
    font-weight: 700; font-size: 13px; cursor: pointer;
    transition: transform 0.15s; display: flex; align-items: center; gap: 6px;
}
.cbar-btn-go:hover { transform: scale(1.05); }
.cbar-btn-clear {
    background: rgba(255,255,255,0.15); color: #fff; border: none;
    padding: 8px 14px; border-radius: 20px; font-size: 12px; cursor: pointer;
}
.cbar-btn-clear:hover { background: rgba(255,255,255,0.25); }

/* ========== COMPARE MODAL ========== */
.cmodal {
    position: fixed; inset: 0; z-index: 999999;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 30px 20px; overflow-y: auto;
}
.cmodal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px); z-index: 1;
}
.cmodal-container {
    position: relative; z-index: 2; width: 100%; max-width: 1100px;
    background: #fff; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: cmodal-in 0.3s ease;
}
@keyframes cmodal-in { from { opacity:0; transform: translateY(30px); } }
.cmodal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; border-bottom: 1px solid #eee;
}
.cmodal-header h3 {
    margin: 0; font-size: 18px; color: #0a3b73;
    display: flex; align-items: center; gap: 8px;
}
.cmodal-close {
    background: #f5f5f5; border: none; width: 36px; height: 36px;
    border-radius: 50%; font-size: 22px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #666; transition: all 0.2s;
}
.cmodal-close:hover { background: #FF6B6B; color: #fff; }

/* Summary Box */
.cmodal-summary {
    margin: 16px 24px; padding: 18px 20px;
    background: linear-gradient(135deg, #f0f7ff, #fff5f0);
    border-radius: 12px; border-left: 4px solid #0a3b73;
}
.csum-row {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0; font-size: 14px; color: #333;
}
.csum-row i { width: 18px; text-align: center; }
.csum-row strong { color: #0a3b73; }
.csum-recommend {
    margin-top: 12px; padding-top: 12px;
    border-top: 1px dashed #ccc; font-size: 13px; color: #555;
}
.csum-recommend strong { color: #0a3b73; }

/* Cards Grid */
.cmodal-cards {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px; padding: 16px 24px 24px;
    align-items: stretch;
}
.ccard {
    border: 2px solid #eee; border-radius: 12px;
    overflow: hidden; transition: border-color 0.2s;
    position: relative;
    display: flex; flex-direction: column;
}
.ccard:hover { border-color: #0a3b73; }
.ccard-best { border-color: #27ae60; }
.ccard-badge {
    position: absolute; top: 10px; right: 10px;
    padding: 3px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 700; z-index: 2;
}
.badge-price { background: #27ae60; color: #fff; }
.badge-rating { background: #f39c12; color: #fff; }
.ccard-img {
    width: 100%; height: 140px; object-fit: cover;
    background: #f0f0f0;
}
.ccard-img-placeholder {
    width: 100%; height: 140px; background: linear-gradient(135deg, #e8eef5, #dfe6ed);
    display: flex; align-items: center; justify-content: center;
    color: #aaa; font-size: 36px;
}
.ccard-body { padding: 14px; flex: 1; }
.ccard-name {
    font-size: 15px; font-weight: 700; color: #0a3b73;
    margin-bottom: 4px;
}
.ccard-rating {
    font-size: 13px; color: #f39c12; margin-bottom: 10px;
}
.ccard-row {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 5px 0; font-size: 13px; color: #444;
    border-top: 1px solid #f5f5f5;
}
.ccard-row i { color: #0a3b73; width: 16px; margin-top: 2px; flex-shrink: 0; }
.ccard-row span { flex: 1; }

/* Pros / Cons */
.ccard-proscons { padding: 10px 14px; background: #fafafa; flex-shrink: 0; }
.ccard-pro, .ccard-con {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; padding: 3px 0;
}
.ccard-pro { color: #27ae60; }
.ccard-con { color: #e67e22; }

/* Action buttons in card */
.ccard-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    padding: 10px 14px 14px;
    margin-top: auto; flex-shrink: 0;
}
.ccard-act {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 8px; border-radius: 8px; font-size: 12px; font-weight: 600;
    text-decoration: none; color: #fff; border: none; cursor: pointer;
    transition: opacity 0.2s;
}
.ccard-act:hover { opacity: 0.85; color: #fff; }
.ccard-act-call { background: #FF6B6B; }
.ccard-act-map { background: #27ae60; }

/* Responsive */
@media (max-width: 768px) {
    .cmodal { padding: 10px; }
    .cmodal-cards { grid-template-columns: 1fr; gap: 12px; }
    .cbar-inner { padding: 8px 12px; gap: 8px; }
    .cbar-slots { display: none; }
    .cbar-left span { display: none; }
}
