.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.carrinho-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.carrinho-overlay.active {
    display: block;
}

.carrinho-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background-color: #fff;
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.carrinho-drawer.active {
    right: 0;
}

.carrinho-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carrinho-titulo {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.carrinho-titulo svg {
    width: 24px;
    height: 24px;
}

.btn-fechar-carrinho {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    transition: color 0.3s;
}

.btn-fechar-carrinho:hover {
    color: #000;
}

.carrinho-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.carrinho-vazio {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 14px;
}

.carrinho-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.carrinho-item:last-child {
    border-bottom: none;
}

.carrinho-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.carrinho-item-info {
    flex: 1;
}

.carrinho-item-nome {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.carrinho-item-preco {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin: 0 0 10px 0;
}

.carrinho-item-acoes {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.quantidade-controle {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px;
}

.btn-quantidade {
    background-color: #f3f4f6;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.btn-quantidade:hover {
    background-color: #e5e7eb;
}

.quantidade-valor {
    min-width: 30px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.btn-remover {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #dc3545;
    transition: opacity 0.3s;
}

.btn-remover:hover {
    opacity: 0.7;
}

.carrinho-item-subtotal {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.carrinho-footer {
    border-top: 1px solid #e5e7eb;
    padding: 20px;
    background-color: #fff;
}

.carrinho-resumo {
    margin-bottom: 15px;
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.resumo-linha.envio {
    color: #666;
}

.resumo-linha.envio .valor {
    color: #10b981;
    font-weight: 600;
}

.resumo-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    margin-bottom: 15px;
}

.resumo-total .label {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

.resumo-total .valor {
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

.btn-finalizar {
    width: 100%;
    padding: 16px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-finalizar:hover {
    background-color: #333;
}

@media (max-width: 480px) {
    .carrinho-drawer {
        max-width: 100%;
    }
}
