/* 
   =========================================
   BENJA PREMIUM UI SYSTEM v12.0 (Professional Calibration)
   ========================================= 
*/

:root {
    --p-primary: #0071e3;
    --p-bg-glass: rgba(255, 255, 255, 0.75);
    --p-bg-dark: rgba(29, 29, 31, 1);
    --p-blur: saturate(180%) blur(20px);
    --p-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    --p-radius: 22px;
    --p-transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. BUTTON CORE STYLES */
.p-btn {
    position: fixed;
    z-index: 9000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--p-shadow);
    transition: var(--p-transition);
}

.p-btn-dark {
    background: #000;
    color: #fff;
}

.p-btn-whatsapp {
    background: #25D366;
    color: #fff;
}

.p-btn:hover {
    transform: scale(1.1);
}

.p-btn svg {
    width: 26px;
    height: 26px;
}

/* 2. POSITIONING */
/* Logic: Bottom=Phone, Mid=Assistant, Top=Scroll (Landing only) */
.is-landing .p-btn-call {
    bottom: 32px;
    right: 32px;
    display: flex;
}

.is-landing .p-btn-assistant {
    bottom: 108px;
    right: 32px;
}

.is-landing .p-btn-scroll {
    bottom: 108px;
    right: 32px;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.is-landing .p-btn-scroll.visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* Index: Only Assistant (Bottom Left), No Phone, No Scroll */
.is-index .p-btn-assistant {
    bottom: 32px;
    left: 32px;
}

.is-index .p-btn-call {
    display: none;
}

.is-index .p-btn-scroll {
    display: none;
}

/* 3. ASSISTANT TRIGGER (Expanding) */
.p-btn-assistant {
    width: auto;
    padding: 0 24px;
    background: #000;
    border-radius: 40px;
    gap: 12px;
}

.p-btn-assistant.collapsed {
    padding: 0;
    width: 60px;
    border-radius: 50%;
}

.p-btn-assistant .p-btn-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    white-space: nowrap;
}

.p-btn-assistant.collapsed .p-btn-text {
    display: none;
}

/* 4. WINDOWS */
.p-window {
    position: fixed;
    z-index: 10000;
    background: var(--p-bg-glass);
    backdrop-filter: var(--p-blur);
    -webkit-backdrop-filter: var(--p-blur);
    border-radius: var(--p-radius);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: var(--p-transition);
    overflow: hidden;
}

.p-window.active {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.p-window-assistant {
    width: 420px;
    max-width: calc(100vw - 40px);
}

.is-landing .p-window-assistant {
    right: 32px;
    bottom: 100px;
    transform: translateY(30px) scale(0.95);
}

.is-index .p-window-assistant {
    left: 32px;
    bottom: 108px;
    transform: translateY(30px) scale(0.95);
}

/* Contact Menu Window */
.p-window-contact {
    width: 250px;
    bottom: 100px;
    right: 32px;
    padding: 12px;
    transform: translateY(20px);
}

.p-window-contact.active {
    transform: translateY(0);
}

/* Window Header */
.p-win-header {
    background: #000;
    color: #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.p-win-header h3 {
    color: #fff !important;
    margin: 0;
    font-weight: 700;
    font-size: 1.2rem;
}

.p-win-header p {
    color: rgba(255, 255, 255, 0.6) !important;
    margin: 0;
    font-size: 0.75rem;
}

.p-win-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* 5. COMPONENTS (Professional Look - No Emojis in CSS) */
.p-opt {
    background: #fff;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    text-align: left;
}

.p-opt:hover {
    transform: translateY(-3px);
    border-color: var(--p-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.p-opt-label {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 1rem;
}

.p-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    border-radius: 12px;
    transition: 0.3s;
    color: #1d1d1f;
}

.p-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.p-res-card {
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.p-res-img {
    width: 80px;
    height: 80px;
    background: #f5f5f7;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.p-res-img img {
    max-width: 80%;
}

.p-res-info h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.p-res-price {
    color: var(--p-primary);
    font-weight: 700;
    margin: 4px 0;
    font-size: 0.9rem;
}

.p-res-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.p-res-badge {
    font-size: 0.65rem;
    background: #f0f7ff;
    color: #0071e3;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Animation */
.p-step-animate {
    animation: pFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pFadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .p-btn {
        width: 56px !important;
        height: 56px !important;
        border-radius: 50% !important;
        padding: 0 !important;
    }

    .p-btn .p-btn-text {
        display: none !important;
    }

    .is-landing .p-btn-assistant {
        bottom: 84px;
        right: 16px;
    }

    .is-landing .p-btn-call {
        bottom: 16px;
        right: 16px;
    }

    .is-landing .p-btn-scroll {
        bottom: 152px;
        right: 16px;
    }

    .is-index .p-btn-assistant {
        bottom: 16px;
        left: 16px;
    }

    .p-window-assistant {
        width: calc(100vw - 20px);
        bottom: 80px;
    }
}