/* ===== Cart Offcanvas Panel ===== */

#cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#cart-overlay.active { display: block; }

#kt_quick_cart {
    position: fixed !important;
    top: 0 !important;
    right: -420px !important;
    bottom: 0 !important;
    width: 380px !important;
    background: #fff !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: -8px 0 32px rgba(0,0,0,0.12) !important;
    transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
    left: auto !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#kt_quick_cart.active {
    right: 0 !important;
}

@media (max-width: 480px) {
    #kt_quick_cart { width: 100% !important; right: -100% !important; }
}

/* Header */
.cart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.cart-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.cart-panel-title i {
    color: #16a34a;
    font-size: 18px;
}

.cart-count-badge {
    background: #16a34a;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.cart-close-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-close-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Body */
.cart-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.cart-panel-body::-webkit-scrollbar { width: 4px; }
.cart-panel-body::-webkit-scrollbar-track { background: transparent; }
.cart-panel-body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* Empty state */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    gap: 12px;
    color: #94a3b8;
    text-align: center;
    padding: 40px 20px;
}

.cart-empty i {
    font-size: 48px;
    color: #e2e8f0;
}

.cart-empty p {
    font-size: 15px;
    font-weight: 500;
    color: #94a3b8;
    margin: 0;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #f1f5f9;
    transition: border-color 0.2s;
}

.cart-item:hover { border-color: #e2e8f0; }

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.cart-item-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    line-height: 1.3;
}

.cart-item-name:hover { color: #16a34a; }

.cart-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cart-item-qty {
    font-size: 12px;
    color: #94a3b8;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #16a34a;
}

.cart-item-remove {
    width: 30px;
    height: 30px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 13px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Footer */
.cart-panel-footer {
    border-top: 1px solid #f1f5f9;
    padding: 16px 20px;
    flex-shrink: 0;
    background: #fff;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cart-total-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.cart-total-amount {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
}

.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #16a34a;
    color: white;
    padding: 14px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border-radius: 10px;
    transition: all 0.25s;
    border: none;
    cursor: pointer;
}

.cart-checkout-btn:hover {
    background: #15803d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.25);
}

.cart-checkout-btn i { font-size: 16px;color: white; }

/* Qty control inside cart item */
.cart-item-qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-qty-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    flex-shrink: 0;
}

.cart-qty-btn:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.cart-item-qty {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    min-width: 18px;
    text-align: center;
    background: none;
    padding: 0;
}
