/* ===================== MINI CART SIDEBAR ===================== */

/* Overlay */
.mini-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-bg, rgba(0, 0, 0, 0.6));
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mini-cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar */
.mini-cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 90vw;
    height: 100%;
    background: var(--bg-card, #1a1a2e);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
}

.mini-cart-sidebar.active {
    right: 0;
}

/* Header */
.mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-secondary, #252540);
    border-bottom: 1px solid var(--border-color, #333);
}

.mini-cart-header h5 {
    color: var(--text-primary, #fff);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.mini-cart-close {
    background: transparent;
    border: none;
    color: var(--text-muted, #888);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s;
    border-radius: 5px;
}

.mini-cart-close:hover {
    color: var(--text-primary, #fff);
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.1));
}

/* Body */
.mini-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Empty Cart */
.mini-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted, #888);
}

.mini-cart-empty i {
    font-size: 4rem;
    color: var(--text-muted, #444);
    margin-bottom: 15px;
}

.mini-cart-empty p {
    margin-bottom: 20px;
    font-size: 1rem;
}

/* Cart Item */
.mini-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--bg-secondary, #252540);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.mini-cart-item:hover {
    background: var(--bg-tertiary, #2a2a4a);
}

.mini-cart-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
}

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

.mini-cart-item-info h6 {
    color: var(--text-primary, #fff);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-cart-item-qty {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted, #888);
}

.mini-cart-item-price {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color, #00D2F2);
    margin-top: 3px;
}

.mini-cart-item-remove {
    background: transparent;
    border: none;
    color: #dc3545;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: all 0.3s;
}

.mini-cart-item-remove:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #ff4757;
}

/* Footer */
.mini-cart-footer {
    padding: 20px;
    background: var(--bg-secondary, #252540);
    border-top: 1px solid var(--border-color, #333);
}

.mini-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color, #00D2F2);
}

.mini-cart-total span {
    color: var(--text-secondary, #ccc);
    font-size: 1rem;
}

.mini-cart-total strong {
    color: var(--primary-color, #00D2F2);
    font-size: 1.4rem;
    font-weight: 700;
}

/* Buttons */
.mini-cart-footer .btn {
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
}

.mini-cart-footer .btn-outline-light {
    border-color: #444;
    color: #ccc;
}

.mini-cart-footer .btn-outline-light:hover {
    background: #333;
    border-color: #555;
    color: #fff;
}

.mini-cart-footer .btn-success {
    background: linear-gradient(135deg, #25d366, #128c7e);
    border: none;
}

.mini-cart-footer .btn-success:hover {
    background: linear-gradient(135deg, #128c7e, #075e54);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* Scrollbar */
.mini-cart-body::-webkit-scrollbar {
    width: 6px;
}

.mini-cart-body::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.mini-cart-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.mini-cart-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 400px) {
    .mini-cart-sidebar {
        width: 100%;
    }
}

/* Badge do carrinho */
.cart-badge {
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 5px;
}
