
/* Cart Overlay */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    display: none;
}

body:has(.cart-offcanvas.show) .cart-overlay,
body:has(.cart-offcanvas.showing) .cart-overlay {
    display: block;
}

/* Fonte Inter apenas para texto, não para ícones */
.cart-offcanvas {
    background: #000000;
    border-left: 1px solid rgba(219, 0, 0, 0.3);
    font-family: 'DIN Next', 'Roboto Condensed', sans-serif;
    width: 100%;
    max-width: 384px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
}

.cart-offcanvas i,
.cart-offcanvas [class^="ri-"],
.cart-offcanvas [class*=" ri-"] {
    font-family: 'remixicon' !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cart-offcanvas .offcanvas-header {
    background: linear-gradient(to right, rgba(127, 29, 29, 0.2), #000000);
    border-bottom: 1px solid rgba(219, 0, 0, 0.3);
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.cart-offcanvas .offcanvas-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'DIN Next', 'Roboto Condensed', sans-serif;
}

.cart-offcanvas .btn-close {
    background: transparent;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    opacity: 1;
    color: #ffffff;
    font-size: 1.25rem;
    transition: all 0.3s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-offcanvas .btn-close:hover {
    background: rgba(127, 29, 29, 0.3);
    color: #db0000;
}

.cart-offcanvas .offcanvas-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.cart-offcanvas .cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Empty State */
.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    background: rgba(127, 29, 29, 0.3);
    border: 1px solid rgba(219, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.empty-icon i {
    font-size: 32px;
    color: rgba(219, 0, 0, 0.5);
}

.empty-text {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-size: 1rem;
    font-family: 'DIN Next', 'Roboto Condensed', sans-serif;
}

.empty-subtext {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    font-family: 'DIN Next', 'Roboto Condensed', sans-serif;
}

/* Cart Items */
.cart-offcanvas .cart-product {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-offcanvas .cart-product li {
    margin-bottom: 0;
}

.cart-item-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(to bottom, rgba(127, 29, 29, 0.2), #000000);
    border: 1px solid rgba(219, 0, 0, 0.3);
    border-radius: 12px;
    transition: all 0.3s;
}

.cart-item-card:hover {
    border-color: rgba(219, 0, 0, 0.5);
}

.cart-item-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.cart-item-image:hover {
    border-color: rgba(219, 0, 0, 0.4);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-name {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
    font-family: 'DIN Next', 'Roboto Condensed', sans-serif;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.cart-item-price {
    color: #db0000;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'DIN Next', 'Roboto Condensed', sans-serif;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(127, 29, 29, 0.3);
    border: 1px solid rgba(219, 0, 0, 0.3);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.qty-btn:hover {
    background: rgba(127, 29, 29, 0.5);
    border-color: rgba(219, 0, 0, 0.5);
}

.qty-btn i {
    font-size: 0.75rem;
}

.qty-value {
    color: #ffffff;
    font-size: 0.875rem;
    min-width: 2rem;
    text-align: center;
    font-family: 'DIN Next', 'Roboto Condensed', sans-serif;
}

.delete-button {
    margin-left: auto;
    padding: 4px;
    background: transparent;
    border: none;
    color: rgba(219, 0, 0, 0.6);
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
}

.delete-button:hover {
    color: #db0000;
    background: rgba(219, 0, 0, 0.1);
}

.delete-button i {
    font-size: 1rem;
}

/* Cart Footer */
.cart-offcanvas .cart-footer {
    background: linear-gradient(to right, rgba(127, 29, 29, 0.2), #000000);
    border-top: 1px solid rgba(219, 0, 0, 0.3);
    padding: 16px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.cart-totals {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-family: 'DIN Next', 'Roboto Condensed', sans-serif;
}

.total-label {
    color: rgba(255, 255, 255, 0.6);
}

.delivery-free {
    color: #4ade80;
    font-weight: 600;
}

.total-final {
    padding-top: 8px;
    border-top: 1px solid rgba(219, 0, 0, 0.3);
}

.total-final .total-label {
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.total-amount {
    color: #db0000;
    font-size: 1.25rem;
    font-weight: 700;
}

#cart-subtotal {
    color: #ffffff;
    font-weight: 600;
}

/* Checkout Button */
.btn-checkout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(to right, #db0000, #b91c1c);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(219, 0, 0, 0.5);
    font-family: 'DIN Next', 'Roboto Condensed', sans-serif;
    font-size: 0.875rem;
}

.btn-checkout:hover {
    background: linear-gradient(to right, #b91c1c, #991b1b);
    box-shadow: 0 6px 20px rgba(219, 0, 0, 0.6);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-checkout i {
    font-size: 1.125rem;
}

/* Scrollbar customizada */
.cart-offcanvas .cart-content::-webkit-scrollbar {
    width: 6px;
}

.cart-offcanvas .cart-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.cart-offcanvas .cart-content::-webkit-scrollbar-thumb {
    background: rgba(219, 0, 0, 0.3);
    border-radius: 3px;
}

.cart-offcanvas .cart-content::-webkit-scrollbar-thumb:hover {
    background: rgba(219, 0, 0, 0.5);
}

/* Responsivo */
@media (max-width: 576px) {
    .cart-offcanvas {
        max-width: 100%;
    }
    
    .cart-offcanvas .offcanvas-header,
    .cart-offcanvas .cart-content,
    .cart-offcanvas .cart-footer {
        padding: 12px;
    }
}
