/* ============================================================
   WHATSAPP CART — Styles
   ============================================================ */

/* ── Toolbar icon ── */
.wa-orders-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.wa-orders-icon .wa-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #25d366;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
    border: 2px solid #fff;
}

/* ── "Add" button on product cards ── */
.btn-wa-add {
    background-color: #128c7e !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
}

.btn-wa-add:hover {
    background-color: #075e54 !important;
    color: #fff !important;
}

/* ── Modal overlay ── */
#wa-cart-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    align-items: flex-start;
    justify-content: flex-end;
}

#wa-cart-modal.open {
    display: flex;
}

body.wa-modal-open {
    overflow: hidden;
}

/* ── Modal panel ── */
.wa-cart-panel {
    background: #fff;
    width: 100%;
    max-width: 420px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.18);
    animation: waSlideIn 0.25s ease;
}

@keyframes waSlideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

/* ── Modal header ── */
.wa-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: #25d366;
    color: #fff;
    flex-shrink: 0;
}

.wa-cart-header h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-cart-header h5 i {
    font-size: 22px;
}

.wa-cart-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.wa-cart-close:hover {
    opacity: 1;
}

/* ── Modal body ── */
.wa-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* ── Empty state ── */
.wa-cart-empty {
    text-align: center;
    padding: 48px 20px;
    color: #aaa;
}

.wa-cart-empty i {
    font-size: 52px;
    color: #25d366;
    opacity: 0.4;
    display: block;
    margin-bottom: 16px;
}

.wa-cart-empty p {
    font-size: 15px;
    line-height: 1.6;
}

/* ── Cart list ── */
.wa-cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wa-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.wa-cart-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}

.wa-cart-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #bbb;
    font-size: 22px;
}

.wa-cart-item-info {
    flex: 1;
    min-width: 0;
}

.wa-cart-item-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

/* ── Qty controls ── */
.wa-cart-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-qty-btn {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background 0.15s;
    padding: 0;
}

.wa-qty-btn:hover {
    background: #c8e6c9;
}

.wa-qty-val {
    font-size: 14px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    color: #333;
}

/* ── Remove button ── */
.wa-cart-remove {
    background: none;
    border: none;
    color: #e53935;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.wa-cart-remove:hover {
    opacity: 1;
}

/* ── Modal footer ── */
.wa-cart-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wa-cart-footer .btn-wa-proceed {
    background: #25d366;
    color: #fff;
    border: none;
    padding: 13px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: background 0.2s;
    text-decoration: none;
}

.wa-cart-footer .btn-wa-proceed:hover {
    background: #1ebe5d;
    color: #fff;
}

.wa-cart-footer .btn-wa-clear {
    background: none;
    border: 1px solid #ddd;
    color: #888;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    transition: border-color 0.15s, color 0.15s;
}

.wa-cart-footer .btn-wa-clear:hover {
    border-color: #e53935;
    color: #e53935;
}

/* ── Toast notification ── */
#wa-cart-toast {
    position: fixed;
    bottom: 90px;
    right: 24px;
    background: #075e54;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    max-width: 320px;
}

#wa-cart-toast.show {
    opacity: 1;
    transform: translateY(0);
}

#wa-cart-toast i {
    font-size: 18px;
    color: #25d366;
    flex-shrink: 0;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .wa-cart-panel {
        max-width: 100%;
    }
}
