/* ============================================================
   PAN ENGINEERS - B2B ENQUIRY CART & SLIDE DRAWER STYLES
============================================================ */

/* 1. Floating Cart Pill Button */
.pe-floating-cart-wrap {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99990;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pe-floating-cart-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 100%);
    color: #ffffff;
    border: 1.5px solid rgba(56, 189, 248, 0.4);
    border-radius: 50px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(12, 74, 110, 0.4), 0 0 20px rgba(14, 165, 233, 0.3);
    transition: all 0.3s ease;
}

.pe-floating-cart-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 40px rgba(12, 74, 110, 0.5), 0 0 30px rgba(14, 165, 233, 0.5);
    border-color: #38bdf8;
}

.cart-btn-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pe-cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #f97316;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    border: 2px solid #0c4a6e;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pe-floating-cart-btn.badge-pulse .pe-cart-badge {
    transform: scale(1.4);
}

/* 2. Drawer Backdrop */
.pe-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99995;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.pe-drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* 3. Slide-Out Drawer Panel */
.pe-inquiry-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 440px;
    max-width: 92vw;
    background: #ffffff;
    z-index: 99999;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.pe-inquiry-drawer.active {
    transform: translateX(0);
}

/* Drawer Header */
.drawer-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #071529 0%, #0c2340 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-icon {
    width: 40px;
    height: 40px;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(14, 165, 233, 0.4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    flex-shrink: 0;
}

.drawer-title-box h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.drawer-subtitle {
    margin: 3px 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
}

.drawer-close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-close-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: rotate(90deg);
}

/* Drawer Body */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Items List */
.drawer-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-item-row {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.drawer-item-row:hover {
    border-color: #cbd5e1;
}

.item-thumb {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-cat-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #0ea5e9;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
}

.item-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Quantity Stepper */
.item-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    overflow: hidden;
}

.step-btn {
    width: 26px;
    height: 26px;
    background: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.step-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.step-val {
    width: 32px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
}

.item-remove-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.item-remove-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Empty State */
.drawer-empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.8;
}

.drawer-empty-state h4 {
    font-size: 16px;
    color: #1e293b;
    margin: 0 0 8px;
}

.drawer-empty-state p {
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 20px;
}

.btn-browse-products {
    display: inline-block;
    padding: 10px 20px;
    background: #0ea5e9;
    color: #ffffff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-browse-products:hover {
    background: #0284c7;
    transform: translateY(-2px);
}

/* User Form Section */
.drawer-user-info {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.form-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.drawer-input,
.drawer-textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.drawer-input:focus,
.drawer-textarea:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

/* Drawer Footer */
.drawer-footer {
    padding: 18px 24px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.summary-label {
    color: #64748b;
    font-weight: 600;
}

.summary-count {
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
}

.btn-send-whatsapp-enquiry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    transition: all 0.25s ease;
}

.btn-send-whatsapp-enquiry:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
}

.btn-clear-cart {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    align-self: center;
    transition: color 0.2s ease;
}

.btn-clear-cart:hover {
    color: #ef4444;
    text-decoration: underline;
}

/* 4. Product Card "Add to Cart" Button States */
.pe-add-cart-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.25s ease;
    font-family: inherit;
}

.pe-add-cart-btn.added {
    background: #10b981 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.pe-add-cart-btn:hover {
    transform: translateY(-2px);
}

/* Quick Direct WhatsApp Icon on Card */
.product-direct-wa-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    color: #059669;
    border-radius: 8px;
    border: 1px solid #a7f3d0;
    transition: all 0.25s ease;
    flex-shrink: 0;
    text-decoration: none;
}

.product-direct-wa-btn:hover {
    background: #25d366;
    color: #ffffff;
    border-color: #25d366;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 600px) {
    .pe-floating-cart-wrap {
        bottom: 18px;
        right: 18px;
    }
    .pe-floating-cart-btn {
        padding: 12px 18px;
        font-size: 13px;
    }
    .pe-inquiry-drawer {
        width: 100vw;
        max-width: 100vw;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}
